Sun May 5 15:25:31 2024 UTC (28d)
mesa: Build with -Wno-error=typedef-redefinition.

While here, use CWARNFLAGS.clang instead of an explicit conditional.

In file included from 110_blorp_exec.c:33:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_genX_exec.h:27:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_priv.h:30:
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir.h:3840:3: error: redefinition of typedef 'nir_shader' is a C11 feature [-Werror,-Wtypedef-redefinition]
} nir_shader;
  ^
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_compiler.h:41:27: note: previous definition is here
typedef struct nir_shader nir_shader;
                          ^


(riastradh)
diff -r1.41 -r1.42 src/external/mit/xorg/lib/dri/Makefile
diff -r1.8 -r1.9 src/external/mit/xorg/lib/dri.old/Makefile

cvs diff -r1.41 -r1.42 src/external/mit/xorg/lib/dri/Makefile (expand / switch to unified diff)

--- src/external/mit/xorg/lib/dri/Makefile 2024/04/26 17:22:26 1.41
+++ src/external/mit/xorg/lib/dri/Makefile 2024/05/05 15:25:31 1.42
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.41 2024/04/26 17:22:26 rillig Exp $ 1# $NetBSD: Makefile,v 1.42 2024/05/05 15:25:31 riastradh Exp $
2 2
3# Link the mesa_dri_drivers mega driver. 3# Link the mesa_dri_drivers mega driver.
4 4
5NOLINT= # Lots of "Unsupported platform" due to undefined __GNUC__ 5NOLINT= # Lots of "Unsupported platform" due to undefined __GNUC__
6 6
7.include <bsd.own.mk> 7.include <bsd.own.mk>
8 8
9.include "../mesa-which.mk" 9.include "../mesa-which.mk"
10 10
11.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ 11.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
12 ${MACHINE} == "evbarm" 12 ${MACHINE} == "evbarm"
13 13
14LIBISMODULE= yes 14LIBISMODULE= yes
@@ -475,27 +475,28 @@ LIBDPLIBS+= drm_intel ${.CURDIR}/../lib @@ -475,27 +475,28 @@ LIBDPLIBS+= drm_intel ${.CURDIR}/../lib
475.endif 475.endif
476LIBDPLIBS+= drm_radeon ${.CURDIR}/../libdrm_radeon 476LIBDPLIBS+= drm_radeon ${.CURDIR}/../libdrm_radeon
477 477
478MESA_SRC_MODULES= main math math_xform vbo tnl swrast ss common asm_c program asm_s 478MESA_SRC_MODULES= main math math_xform vbo tnl swrast ss common asm_c program asm_s
479.include "../libmesa.mk" 479.include "../libmesa.mk"
480.include "../libglsl.mk" 480.include "../libglsl.mk"
481 481
482.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 482.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
483SRCS+= streaming-load-memcpy.c 483SRCS+= streaming-load-memcpy.c
484CPPFLAGS.streaming-load-memcpy.c+= -msse4.1 484CPPFLAGS.streaming-load-memcpy.c+= -msse4.1
485CPPFLAGS.isl_tiled_memcpy_sse41.c+= -msse4.1 485CPPFLAGS.isl_tiled_memcpy_sse41.c+= -msse4.1
486.endif 486.endif
487 487
488CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=atomic-alignment :} 488CWARNFLAGS.clang+= -Wno-error=atomic-alignment
 489CWARNFLAGS.clang+= -Wno-error=typedef-redefinition
489 490
490.include "../driver.mk" 491.include "../driver.mk"
491 492
492.for _d in ${DRIVERS} 493.for _d in ${DRIVERS}
493SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.${SHLIB_MAJOR}  494SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.${SHLIB_MAJOR}
494SYMLINKS+= ${_d}_dri.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so 495SYMLINKS+= ${_d}_dri.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so
495.if ${MKDEBUG} != "no" 496.if ${MKDEBUG} != "no"
496SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHLIB_MAJOR}.debug 497SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHLIB_MAJOR}.debug
497.endif 498.endif
498.endfor 499.endfor
499 500
500.endif 501.endif
501 502

cvs diff -r1.8 -r1.9 src/external/mit/xorg/lib/dri.old/Makefile (expand / switch to unified diff)

--- src/external/mit/xorg/lib/dri.old/Makefile 2023/08/08 06:27:31 1.8
+++ src/external/mit/xorg/lib/dri.old/Makefile 2024/05/05 15:25:31 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.8 2023/08/08 06:27:31 mrg Exp $ 1# $NetBSD: Makefile,v 1.9 2024/05/05 15:25:31 riastradh Exp $
2 2
3# Link the mesa_dri_drivers mega driver. 3# Link the mesa_dri_drivers mega driver.
4 4
5# Uses 'assert(cond)' in a comma expression, leading to a syntax error because 5# Uses 'assert(cond)' in a comma expression, leading to a syntax error because
6# in lint mode, 'assert(cond)' expands to an empty string, and '(, expr)' is 6# in lint mode, 'assert(cond)' expands to an empty string, and '(, expr)' is
7# not an expression. 7# not an expression.
8NOLINT= 8NOLINT=
9 9
10LINTFLAGS+= -X 213 # void function '%s' cannot return value 10LINTFLAGS+= -X 213 # void function '%s' cannot return value
11LINTFLAGS+= -Ac23 # allow C23, for empty initializer braces 11LINTFLAGS+= -Ac23 # allow C23, for empty initializer braces
12 12
13# When build_id.c expands the macro invocation 'ElfW(Nhdr)', the result is 13# When build_id.c expands the macro invocation 'ElfW(Nhdr)', the result is
14# 'Elf64 /* MD native binary size */ _Nhdr'. The comment prevents the two 14# 'Elf64 /* MD native binary size */ _Nhdr'. The comment prevents the two
@@ -448,27 +448,28 @@ LIBDPLIBS+= drm_intel ${.CURDIR}/../lib @@ -448,27 +448,28 @@ LIBDPLIBS+= drm_intel ${.CURDIR}/../lib
448.endif 448.endif
449LIBDPLIBS+= drm_radeon ${.CURDIR}/../libdrm_radeon 449LIBDPLIBS+= drm_radeon ${.CURDIR}/../libdrm_radeon
450 450
451MESA_SRC_MODULES= main math math_xform vbo tnl swrast ss common asm_c program asm_s 451MESA_SRC_MODULES= main math math_xform vbo tnl swrast ss common asm_c program asm_s
452.include "../libmesa${OLD_SUFFIX}.mk" 452.include "../libmesa${OLD_SUFFIX}.mk"
453.include "../libglsl${OLD_SUFFIX}.mk" 453.include "../libglsl${OLD_SUFFIX}.mk"
454 454
455.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 455.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
456SRCS+= streaming-load-memcpy.c 456SRCS+= streaming-load-memcpy.c
457CPPFLAGS.streaming-load-memcpy.c+= -msse4.1 457CPPFLAGS.streaming-load-memcpy.c+= -msse4.1
458CPPFLAGS.isl_tiled_memcpy_sse41.c+= -msse4.1 458CPPFLAGS.isl_tiled_memcpy_sse41.c+= -msse4.1
459.endif 459.endif
460 460
461CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=atomic-alignment :} 461CWARNFLAGS.clang+= -Wno-error=atomic-alignment
 462CWARNFLAGS.clang+= -Wno-error=typedef-redefinition
462 463
463.include "../driver${OLD_SUFFIX}.mk" 464.include "../driver${OLD_SUFFIX}.mk"
464 465
465.for _d in ${DRIVERS} 466.for _d in ${DRIVERS}
466SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.${SHLIB_MAJOR}  467SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.${SHLIB_MAJOR}
467SYMLINKS+= ${_d}_dri.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so 468SYMLINKS+= ${_d}_dri.so.${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so
468.if ${MKDEBUG} != "no" 469.if ${MKDEBUG} != "no"
469SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHLIB_MAJOR}.debug 470SYMLINKS+= mesa_dri_drivers.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHLIB_MAJOR}.debug
470.endif 471.endif
471.endfor 472.endfor
472 473
473.endif 474.endif
474 475