On Fri, Apr 22, 2016 at 10:50:33AM -0700, Jason Ekstrand wrote: > On Fri, Apr 22, 2016 at 10:15 AM, Jonathan Gray <j...@jsg.id.au> wrote: > > > On Fri, Apr 22, 2016 at 05:31:29PM +0100, Emil Velikov wrote: > > > On 22 April 2016 at 16:08, Jonathan Gray <j...@jsg.id.au> wrote: > > > > It is worth noting that the isl code extensively requires designated > > > > initialisers on anonymous structs. It isn't clear to me when gcc > > introduced > > > > support for this but it isn't in 4.2. > > > > > > > I think it should work for GCC 4.2 with -fms-extensions. We used to > > > set -std=gnu99 for pre 4.6 which effectively enables it the extension. > > > Can you double-check ? > > > > The part that sets gnu99 for < gcc 4.6 is still there, using > > -fms-extensions > > does not help for these. > > > > libtool: compile: gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" > > -DPACKAGE_VERSION=\"11.3.0-devel\" "-DPACKAGE_STRING=\"Mesa 11.3.0-devel\"" > > "-DPACKAGE_BUGREPORT=\" > > https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" > > -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"11.3.0-devel\" > > -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 > > -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 > > -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" > > -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 > > -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 > > -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 > > -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 > > -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 > > -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 > > -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 > > -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_DLADDR=1 > > -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 > > -DHAVE_SHA1_IN_LIBC=1 -DHAVE_VALGRIND=1 -I. -I/usr/X11R6/include > > -I/usr/X11R6/include/libdrm -I/usr/local/include/valgrind > > -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DDEBUG > > -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF > > -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM > > -DHAVE_SHA1 -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING > > -DHAVE_ALIAS -DHAVE_MINCORE -I../../../include -I../../../src > > -I../../../src/intel -I../../../src/mapi -I../../../src/mesa > > -I../../../src/mesa/drivers/dri/common -I../../../src/mesa/drivers/dri/i965 > > -I../../../src/gallium/auxiliary -I../../../src/gallium/include > > -I../../../src -I../../../src/intel -g -O2 -Wall -std=gnu99 > > -Werror=implicit-function-declaration -Werror=missing-prototypes > > -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp > > -Wno-override-init -DGEN_VERSIONx10=70 -g -O2 -Wall -std=gnu99 > > -Werror=implicit-function-declaration -Werror=missing-prototypes > > -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp > > -MT libisl_gen7_la-isl_gen7.lo -MD -MP -MF > > .deps/libisl_gen7_la-isl_gen7.Tpo -c isl_gen7.c -fPIC -DPIC -o > > .libs/libisl_gen7_la-isl_gen7.o > > In file included from isl_gen7.h:26, > > from isl_gen7.c:24: > > isl_priv.h: In function 'isl_extent3d_sa_to_el': > > isl_priv.h:119: error: unknown field 'w' specified in initializer > > isl_priv.h:119: warning: missing braces around initializer > > isl_priv.h:119: warning: (near initialization for > > '(anonymous).<anonymous>') > > isl_priv.h:120: error: unknown field 'h' specified in initializer > > isl_priv.h:121: error: unknown field 'd' specified in initializer > > isl_priv.h: In function 'isl_extent3d_el_to_sa': > > isl_priv.h:131: error: unknown field 'w' specified in initializer > > isl_priv.h:131: warning: missing braces around initializer > > isl_priv.h:131: warning: (near initialization for > > '(anonymous).<anonymous>') > > isl_priv.h:132: error: unknown field 'h' specified in initializer > > isl_priv.h:133: error: unknown field 'd' specified in initializer > > isl_gen7.c: In function 'gen7_choose_image_alignment_el': > > isl_gen7.c:391: error: unknown field 'w' specified in initializer > > isl_gen7.c:391: warning: missing braces around initializer > > isl_gen7.c:391: warning: (near initialization for > > '(anonymous).<anonymous>') > > isl_gen7.c:392: error: unknown field 'h' specified in initializer > > isl_gen7.c:393: error: unknown field 'd' specified in initializer > > *** Error 1 in src/intel/isl (Makefile:744 'libisl_gen7_la-isl_gen7.lo') > > > > At least for the errors you're seeing there, I see two options: 1) Use the > isl_extentNd constructor functions in isl.h. 2) Stop making isl_extentNd > have anonymous unions. I'm not sure how much the anonymous unions are > really doing for us but I'd like chad to chip in before we throw them out. > > Here's another question: I know BSD doesn't ship gcc newer than 4.2 for > license issues, but do you have a recent version of clang available? > --Jason >
For OpenBSD there are three source trees src kernel, libc, posix utilities, gcc, binutils, etc xenocara xserver, Mesa, libdrm, pixman, xterm etc ports recipes to fetch and build external sources with patches The src and xenocara trees include full source and are not able to use external dependencies. ports/packages is more like the model Linux distributions use for everything. Moving the compiler in src to clang for some platforms will likely happen at some point in the future but llvm is not in either src or xenocara currently. The Mesa distributed as part of the installation media isn't built against llvm (so no radeonsi). Clang and newer gcc are available in ports but we can't build releases with those. With clang I have to add some strings.h includes for ffs() and then it seems to stumble with: libtool: compile: /usr/local/bin/clang -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"11.3.0-devel\" "-DPACKAGE_STRING=\"Mesa 11.3.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"11.3.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_SHA1_IN_LIBC=1 -DHAVE_VALGRIND=1 -I. -I/usr/X11R6/include -I/usr/X11R6/include/libdrm -I/usr/local/include/valgrind -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUSE_SSE41 -DDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_SHA1 -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=1 -I../../../include -I../../../src -I../../../src/intel -I../../../src/mapi -I../../../src/mesa -I../../../src/mesa/drivers/dri/common -I../../../src/mesa/drivers/dri/i965 -I../../../src/gallium/auxiliary -I../../../src/gallium/include -I../../../src -I../../../src/intel -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp -Qunused-arguments -Wno-override-init -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp -Qunused-arguments -MT libisl_la-isl_format_layout.lo -MD -MP -MF .deps/libisl_la-isl_format_layout.Tpo -c isl_format_layout.c -fPIC -DPIC -o .libs/libisl_la-isl_format_layout.o warning: unknown warning option '-Wno-override-init'; did you mean '-Wno-override-module'? [-Wunknown-warning-option] isl_format_layout.c:34:18: error: use of undeclared identifier 'SF32' .g = { SF32 }, ^ isl_format_layout.c:36:18: error: use of undeclared identifier 'SF32' .a = { SF32 }, ^ isl_format_layout.c:51:18: error: use of undeclared identifier 'SI32' .g = { SI32 }, ^ isl_format_layout.c:53:18: error: use of undeclared identifier 'SI32' .a = { SI32 }, ^ isl_format_layout.c:68:18: error: use of undeclared identifier 'UI32' .g = { UI32 }, ^ isl_format_layout.c:70:18: error: use of undeclared identifier 'UI32' .a = { UI32 }, ^ isl_format_layout.c:85:18: error: use of undeclared identifier 'UN32' .g = { UN32 }, ^ isl_format_layout.c:87:18: error: use of undeclared identifier 'UN32' .a = { UN32 }, ^ isl_format_layout.c:102:18: error: use of undeclared identifier 'SN32' .g = { SN32 }, ^ isl_format_layout.c:104:18: error: use of undeclared identifier 'SN32' .a = { SN32 }, ^ isl_format_layout.c:119:18: error: use of undeclared identifier 'SF64' .g = { SF64 }, ^ isl_format_layout.c:136:18: error: use of undeclared identifier 'SF32' .g = { SF32 }, ^ isl_format_layout.c:153:18: error: use of undeclared identifier 'SS32' .g = { SS32 }, ^ isl_format_layout.c:155:18: error: use of undeclared identifier 'SS32' .a = { SS32 }, ^ isl_format_layout.c:170:18: error: use of undeclared identifier 'US32' .g = { US32 }, ^ isl_format_layout.c:172:18: error: use of undeclared identifier 'US32' .a = { US32 }, ^ isl_format_layout.c:187:18: error: use of undeclared identifier 'SX32' .g = { SX32 }, ^ isl_format_layout.c:189:18: error: use of undeclared identifier 'SX32' .a = { SX32 }, ^ isl_format_layout.c:204:18: error: use of undeclared identifier 'R64' .g = { R64 }, ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. *** Error 1 in src/intel/isl (Makefile:807 'libisl_la-isl_format_layout.lo') Which seems to be a problem with the shell script that generates it isl_format_layout.c: isl_format_layout_gen.bash \ isl_format_layout.csv $(AM_V_GEN)$(srcdir)/isl_format_layout_gen.bash \ <$(srcdir)/isl_format_layout.csv >$@ _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev