Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/libexec/ld.elf_so adapt to ${CC_WNO_MAYBE_UNINITIALIZED}



details:   https://anonhg.NetBSD.org/src/rev/7980cbb30fe8
branches:  trunk
changeset: 376186:7980cbb30fe8
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Jun 03 21:31:45 2023 +0000

description:
adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.

diffstat:

 external/bsd/atf/lib/tools/Makefile            |   6 ++----
 external/bsd/file/lib/Makefile                 |   4 +---
 external/bsd/ipf/bin/ipsend/Makefile           |   4 +---
 external/bsd/ntp/bin/ntpd/Makefile             |   4 ++--
 external/cddl/osnet/lib/libdtrace/Makefile     |  12 +++---------
 external/gpl3/gcc.old/usr.bin/backend/Makefile |   4 ++--
 external/gpl3/gcc/lib/libubsan/Makefile        |   4 ++--
 external/gpl3/gcc/usr.bin/backend/Makefile     |   4 ++--
 sys/external/bsd/drm2/i915drm/files.i915drmkms |   6 +++---
 sys/external/bsd/drm2/radeon/files.radeon      |   4 ++--
 sys/modules/i915drmkms/Makefile                |   4 ++--
 tests/libexec/ld.elf_so/Makefile               |   4 ++--
 12 files changed, 24 insertions(+), 36 deletions(-)

diffs (235 lines):

diff -r 3934fe5957a8 -r 7980cbb30fe8 external/bsd/atf/lib/tools/Makefile
--- a/external/bsd/atf/lib/tools/Makefile       Sat Jun 03 21:30:20 2023 +0000
+++ b/external/bsd/atf/lib/tools/Makefile       Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2019/09/29 23:44:58 mrg Exp $
+# $NetBSD: Makefile,v 1.8 2023/06/03 21:31:45 lukem Exp $
 
 NOLINT=                # defined
 
@@ -36,8 +36,6 @@ SRCS=         application.cpp \
                ui.cpp \
                user.cpp
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.parser.cpp += -Wno-error=maybe-uninitialized
-.endif
+COPTS.parser.cpp += ${CC_WNO_MAYBE_UNINITIALIZED}
 
 .include <bsd.lib.mk>
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/bsd/file/lib/Makefile
--- a/external/bsd/file/lib/Makefile    Sat Jun 03 21:30:20 2023 +0000
+++ b/external/bsd/file/lib/Makefile    Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.15 2019/12/17 18:59:39 christos Exp $
+#      $NetBSD: Makefile,v 1.16 2023/06/03 21:31:45 lukem Exp $
 #
 
 USE_FORT?= yes # data driven bugs?
@@ -42,6 +42,4 @@ magic.h:        magic.h.in
        ${TOOL_SED} -e "s/X.YY/${VERSION:S/.//g}/" < ${.ALLSRC} > ${.TARGET}
 CLEANFILES+=   magic.h
 
-CFLAGS+=       ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-maybe-uninitialized :}
-
 .include <bsd.lib.mk>
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/bsd/ipf/bin/ipsend/Makefile
--- a/external/bsd/ipf/bin/ipsend/Makefile      Sat Jun 03 21:30:20 2023 +0000
+++ b/external/bsd/ipf/bin/ipsend/Makefile      Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2020/02/12 00:30:48 fox Exp $
+#      $NetBSD: Makefile,v 1.6 2023/06/03 21:31:45 lukem Exp $
 
 .include <bsd.own.mk>
 .include "../Makefile.inc"
@@ -25,8 +25,6 @@ DPSRCS+=      iplang_y.h
 .PATH:         ${UDIST}/ipsend \
                ${UDIST}/iplang
 
-COPTS.ipsopt.c+=       ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=maybe-uninitialized :}
-
 iplang_y.c: iplang_y.y
        ${_MKTARGET_CREATE}
        ${YACC} -d ${.ALLSRC}
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/bsd/ntp/bin/ntpd/Makefile
--- a/external/bsd/ntp/bin/ntpd/Makefile        Sat Jun 03 21:30:20 2023 +0000
+++ b/external/bsd/ntp/bin/ntpd/Makefile        Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.31 2023/06/03 09:09:04 lukem Exp $
+#      $NetBSD: Makefile,v 1.32 2023/06/03 21:31:46 lukem Exp $
 
 .include <bsd.own.mk>
 
@@ -87,7 +87,7 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 .PATH: ${DIST}
 YHEADER=1
 
-COPTS.ntp_control.c+=          ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-error=maybe-uninitialized :}
+COPTS.ntp_control.c+=          ${CC_WNO_MAYBE_UNINITIALIZED}
 COPTS.ntp_loopfilter.c+=       ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-error=restrict :}
 COPTS.ntp_loopfilter.c+=       ${CC_WNO_FORMAT_TRUNCATION}
 COPTS.ntp_crypto.c+=           ${CC_WNO_FORMAT_TRUNCATION}
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/cddl/osnet/lib/libdtrace/Makefile
--- a/external/cddl/osnet/lib/libdtrace/Makefile        Sat Jun 03 21:30:20 2023 +0000
+++ b/external/cddl/osnet/lib/libdtrace/Makefile        Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.31 2023/06/03 09:09:05 lukem Exp $
+#      $NetBSD: Makefile,v 1.32 2023/06/03 21:31:46 lukem Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -89,24 +89,18 @@ COPTS.dt_lex.c              += ${CC_WNO_STRINGOP_TRU
 COPTS.dt_pid.c         += ${CC_WNO_STRINGOP_TRUNCATION}
 
 COPTS.dt_consume.c     += -Wno-parentheses
-COPTS.dt_consume.c     += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
+COPTS.dt_consume.c     += ${CC_WNO_MAYBE_UNINITIALIZED}
 COPTS.dt_options.c     += -Wno-parentheses
 COPTS.dt_pid.c         += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
 COPTS.dt_isadep.c      += -Wno-unused-variable
 
-.if (${MKLIBCSANITIZER:Uno} == "yes")
-.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8)
-COPTS.dt_proc.c+=      -Wno-error=maybe-uninitialized
-.endif
-.endif
-
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 CPPFLAGS+=     -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
 CPPFLAGS+=     -I${.CURDIR}/../../dev/dtrace/x86
 .PATH:         ${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/x86
 SRCS+=         dis_tables.c
 COPTS.dis_tables.c     += -Wno-parentheses
-COPTS.dis_tables.c     += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
+COPTS.dis_tables.c     += ${CC_WNO_MAYBE_UNINITIALIZED}
 .elif ${MACHINE_ARCH} == "sparc64"
 CPPFLAGS+=     -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
 .elif ${MACHINE_ARCH} == "aarch64"
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/gpl3/gcc.old/usr.bin/backend/Makefile
--- a/external/gpl3/gcc.old/usr.bin/backend/Makefile    Sat Jun 03 21:30:20 2023 +0000
+++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile    Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2023/05/19 23:28:21 lukem Exp $
+#      $NetBSD: Makefile,v 1.18 2023/06/03 21:31:46 lukem Exp $
 
 HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
@@ -601,7 +601,7 @@ COPTS.tree.c=       ${${ACTIVE_CC} == "clang" 
 
 CFLAGS+=       -Wno-stack-protector
 
-COPTS.dwarf2out.c+=-Wno-error=maybe-uninitialized
+COPTS.dwarf2out.c+=${CC_WNO_MAYBE_UNINITIALIZED}
 
 .if ${GCC_MACHINE_ARCH} == "m68000" || ${GCC_MACHINE_ARCH} == "m68k" || \
        ${GCC_MACHINE_ARCH} == "coldfire"
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/gpl3/gcc/lib/libubsan/Makefile
--- a/external/gpl3/gcc/lib/libubsan/Makefile   Sat Jun 03 21:30:20 2023 +0000
+++ b/external/gpl3/gcc/lib/libubsan/Makefile   Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.19 2021/04/12 00:05:56 mrg Exp $
+#      $NetBSD: Makefile,v 1.20 2023/06/03 21:31:46 lukem Exp $
 
 UNSUPPORTED_COMPILER.clang=    # defined
 LIBISCXX = yes
@@ -38,6 +38,6 @@ LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/
 CPPFLAGS+=-DCAN_SANITIZE_UB=1
 
 # XXX
-COPTS.ubsan_handlers.cc+=-Wno-error=maybe-uninitialized
+COPTS.ubsan_handlers.cc+=${CC_WNO_MAYBE_UNINITIALIZED}
 
 .include <bsd.lib.mk>
diff -r 3934fe5957a8 -r 7980cbb30fe8 external/gpl3/gcc/usr.bin/backend/Makefile
--- a/external/gpl3/gcc/usr.bin/backend/Makefile        Sat Jun 03 21:30:20 2023 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile        Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.67 2023/05/19 23:28:20 lukem Exp $
+#      $NetBSD: Makefile,v 1.68 2023/06/03 21:31:46 lukem Exp $
 
 HOSTPROG_CXX=  1
 LIBISPRIVATE=  yes
@@ -601,7 +601,7 @@ COPTS.tree.c=       ${${ACTIVE_CC} == "clang" 
 
 CFLAGS+=       -Wno-stack-protector
 
-COPTS.dwarf2out.c+=-Wno-error=maybe-uninitialized
+COPTS.dwarf2out.c+=${CC_WNO_MAYBE_UNINITIALIZED}
 
 .if ${GCC_MACHINE_ARCH} == "m68000" || ${GCC_MACHINE_ARCH} == "m68k" || \
        ${GCC_MACHINE_ARCH} == "coldfire"
diff -r 3934fe5957a8 -r 7980cbb30fe8 sys/external/bsd/drm2/i915drm/files.i915drmkms
--- a/sys/external/bsd/drm2/i915drm/files.i915drmkms    Sat Jun 03 21:30:20 2023 +0000
+++ b/sys/external/bsd/drm2/i915drm/files.i915drmkms    Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i915drmkms,v 1.89 2023/06/03 21:30:22 lukem Exp $
+#      $NetBSD: files.i915drmkms,v 1.90 2023/06/03 21:31:46 lukem Exp $
 
 version        20180827
 
@@ -48,9 +48,9 @@ makeoptions   i915drmkms      "CWARNFLAGS.i91
 makeoptions    i915drmkms      "CWARNFLAGS.i915_pci.c"+="${${ACTIVE_CC} == clang:? -Wno-initializer-overrides :}"
 makeoptions    i915drmkms      "CWARNFLAGS.i915_sw_fence.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}"
 
-makeoptions    i915drmkms      "CWARNFLAGS.intel_sprite.c"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}"
+makeoptions    i915drmkms      "CWARNFLAGS.intel_sprite.c"+="${CC_WNO_MAYBE_UNINITIALIZED}"
 
-makeoptions    i915drmkms      "CWARNFLAGS.intel_ddi.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} ${CC_WNO_IMPLICIT_FALLTHROUGH}"
+makeoptions    i915drmkms      "CWARNFLAGS.intel_ddi.c"+="${CC_WNO_MAYBE_UNINITIALIZED} ${CC_WNO_IMPLICIT_FALLTHROUGH}"
 makeoptions    i915drmkms      "CWARNFLAGS.intel_display.c"+="${CC_WNO_IMPLICIT_FALLTHROUGH}"
 makeoptions    i915drmkms      "CWARNFLAGS.intel_guc_submission.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}"
 makeoptions    i915drmkms      "CWARNFLAGS.intel_hdmi.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}"
diff -r 3934fe5957a8 -r 7980cbb30fe8 sys/external/bsd/drm2/radeon/files.radeon
--- a/sys/external/bsd/drm2/radeon/files.radeon Sat Jun 03 21:30:20 2023 +0000
+++ b/sys/external/bsd/drm2/radeon/files.radeon Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.radeon,v 1.38 2023/06/03 21:30:22 lukem Exp $
+#      $NetBSD: files.radeon,v 1.39 2023/06/03 21:31:47 lukem Exp $
 
 version        20180827
 
@@ -34,7 +34,7 @@ makeoptions   radeon  "CWARNFLAGS.radeon"+=
 makeoptions    radeon  "CWARNFLAGS.radeon"+="-Wno-shadow"
 makeoptions    radeon  "CWARNFLAGS.radeon"+="-Wno-unused-const-variable"
 
-makeoptions    radeon  "CWARNFLAGS.radeon"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}"
+makeoptions    radeon  "CWARNFLAGS.radeon"+="${CC_WNO_MAYBE_UNINITIALIZED}"
 
 #makeoptions   radeon  "CWARNFLAGS.radeon_cs.c"+="${CC_WNO_IMPLICIT_FALLTHROUGH}"
 makeoptions    radeon  "CWARNFLAGS.radeon_evergreen_cs.c"+="${CC_WNO_IMPLICIT_FALLTHROUGH}"
diff -r 3934fe5957a8 -r 7980cbb30fe8 sys/modules/i915drmkms/Makefile
--- a/sys/modules/i915drmkms/Makefile   Sat Jun 03 21:30:20 2023 +0000
+++ b/sys/modules/i915drmkms/Makefile   Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2023/06/03 09:09:14 lukem Exp $
+# $NetBSD: Makefile,v 1.22 2023/06/03 21:31:47 lukem Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -59,7 +59,7 @@ CWARNFLAGS+=  -Wno-shadow
 COPTS.i915_pci.c+=     ${${ACTIVE_CC} == "gcc":? -Wno-override-init :}
 COPTS.i915_pci.c+=     ${${ACTIVE_CC} == "clang":? -Wno-initializer-overrides :}
 COPTS.i915_sw_fence.c+=        ${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
-COPTS.intel_sprite.c+= ${${ACTIVE_CC} == "gcc":? -Wno-maybe-uninitialized :}
+COPTS.intel_sprite.c+= ${CC_WNO_MAYBE_UNINITIALIZED}
 COPTS.intel_ddi.c+=    ${CC_WNO_MAYBE_UNINITIALIZED}
 COPTS.intel_ddi.c+=    ${CC_WNO_IMPLICIT_FALLTHROUGH}
 COPTS.intel_display.c+=        ${CC_WNO_IMPLICIT_FALLTHROUGH}
diff -r 3934fe5957a8 -r 7980cbb30fe8 tests/libexec/ld.elf_so/Makefile
--- a/tests/libexec/ld.elf_so/Makefile  Sat Jun 03 21:30:20 2023 +0000
+++ b/tests/libexec/ld.elf_so/Makefile  Sat Jun 03 21:31:45 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2023/06/02 19:09:11 riastradh Exp $
+# $NetBSD: Makefile,v 1.20 2023/06/03 21:31:47 lukem Exp $
 #
 
 NOMAN=         # defined
@@ -31,7 +31,7 @@ TESTS_C+=     t_dlerror-cleared t_dlerror-fa
 TESTS_C+=      t_rtld_r_debug
 TESTS_C+=      t_tls_extern
 
-COPTS.t_rtld_r_debug.c += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
+COPTS.t_rtld_r_debug.c += ${CC_WNO_MAYBE_UNINITIALIZED}
 
 LDADD.t_dlerror-false= -Wl,-rpath,/var/nonexistent/lib
 LDADD.t_dlvsym=                -Wl,-rpath,${TESTSDIR}/h_helper_symver_dso2



Home | Main Index | Thread Index | Old Index