Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pf adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
details: https://anonhg.NetBSD.org/src/rev/0e3849880f42
branches: trunk
changeset: 376181:0e3849880f42
user: lukem <lukem%NetBSD.org@localhost>
date: Sat Jun 03 21:26:27 2023 +0000
description:
adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
which works for both clang and gcc, and remove compiler-specific
equivalents.
diffstat:
external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile | 6 +++---
external/bsd/ipf/Makefile.inc | 7 +++----
external/bsd/tcpdump/bin/Makefile | 5 ++---
sbin/fsck_udf/Makefile | 5 ++---
sbin/newfs_udf/Makefile | 5 ++---
share/mk/bsd.kmodule.mk | 5 ++---
sys/arch/i386/stand/efiboot/bootx64/Makefile | 5 ++---
sys/arch/macppc/stand/Makefile.inc | 5 ++---
sys/arch/sparc/stand/boot/Makefile | 5 ++---
sys/arch/sparc/stand/bootxx/Makefile | 5 ++---
sys/arch/sparc/stand/ofwboot/Makefile | 5 ++---
sys/arch/zaurus/stand/Makefile.inc | 5 ++---
sys/conf/Makefile.kern.inc | 6 +++---
sys/rump/fs/lib/libudf/Makefile | 6 +++---
sys/rump/net/lib/Makefile.inc | 6 +++---
sys/stand/efiboot/Makefile.efiboot | 5 ++---
usr.sbin/fstyp/Makefile | 6 +++---
usr.sbin/installboot/Makefile | 5 ++---
usr.sbin/makefs/udf/Makefile.inc | 6 +++---
usr.sbin/pf/Makefile.inc | 5 ++---
20 files changed, 47 insertions(+), 61 deletions(-)
diffs (truncated from 364 to 300 lines):
diff -r 5821c0fd5fe3 -r 0e3849880f42 external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
--- a/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2023/06/03 09:09:02 lukem Exp $
+# $NetBSD: Makefile,v 1.17 2023/06/03 21:26:27 lukem Exp $
PROG= mdnsd
@@ -17,8 +17,8 @@ COPTS.uds_daemon.c += -Wno-stack-protect
MAN= mdnsd.8
-CWARNFLAGS.clang+= -Wno-unused-value -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS.clang+= -Wno-unused-value
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.DNSCommon.c+= ${CC_WNO_RETURN_LOCAL_ADDR}
diff -r 5821c0fd5fe3 -r 0e3849880f42 external/bsd/ipf/Makefile.inc
--- a/external/bsd/ipf/Makefile.inc Sat Jun 03 21:24:57 2023 +0000
+++ b/external/bsd/ipf/Makefile.inc Sat Jun 03 21:26:27 2023 +0000
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.8 2023/06/03 09:09:03 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.9 2023/06/03 21:26:27 lukem Exp $
WARNS?= 1 # XXX -Wcast-qual -Wshadow
CWARNFLAGS.clang+= -Wno-format -Wno-tautological-compare \
-Wno-self-assign -Wno-array-bounds \
- -Wno-error=unused-const-variable \
- -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+ -Wno-error=unused-const-variable
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include <bsd.own.mk>
diff -r 5821c0fd5fe3 -r 0e3849880f42 external/bsd/tcpdump/bin/Makefile
--- a/external/bsd/tcpdump/bin/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/external/bsd/tcpdump/bin/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2023/06/03 09:09:05 lukem Exp $
+# $NetBSD: Makefile,v 1.25 2023/06/03 21:26:27 lukem Exp $
WARNS?= 1 # XXX: need to cleanup later
@@ -205,8 +205,7 @@ tcpdump.8: tcpdump.1.in
@rm -f ${.TARGET}
cp ${.ALLSRC} ${.TARGET}
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.print-bgp.c+= ${CC_WNO_FORMAT_TRUNCATION}
COPTS.signature.c+= -Wno-error=deprecated-declarations
COPTS.print-tcp.c+= -Wno-error=deprecated-declarations
diff -r 5821c0fd5fe3 -r 0e3849880f42 sbin/fsck_udf/Makefile
--- a/sbin/fsck_udf/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sbin/fsck_udf/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2023/06/03 08:52:55 lukem Exp $
+# $NetBSD: Makefile,v 1.3 2023/06/03 21:26:27 lukem Exp $
.include <bsd.own.mk>
@@ -17,7 +17,6 @@ CPPFLAGS+= -I${FSCK} -I${KUDF} -I${NEWFS
DPADD+=${LIBUTIL}
LDADD+=-lutil -lprop
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 5821c0fd5fe3 -r 0e3849880f42 sbin/newfs_udf/Makefile
--- a/sbin/newfs_udf/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sbin/newfs_udf/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2023/06/03 08:52:55 lukem Exp $
+# $NetBSD: Makefile,v 1.10 2023/06/03 21:26:28 lukem Exp $
.include <bsd.own.mk>
@@ -15,7 +15,6 @@ CPPFLAGS+= -I${MOUNT} -I${KUDF} -I${NETB
DPADD+=${LIBUTIL}
LDADD+=-lutil -lprop
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 5821c0fd5fe3 -r 0e3849880f42 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk Sat Jun 03 21:24:57 2023 +0000
+++ b/share/mk/bsd.kmodule.mk Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.kmodule.mk,v 1.83 2023/06/03 08:52:56 lukem Exp $
+# $NetBSD: bsd.kmodule.mk,v 1.84 2023/06/03 21:26:28 lukem Exp $
# We are not building this with PIE
MKPIE=no
@@ -38,8 +38,7 @@ CWARNFLAGS.clang+= -Wno-error=constant-c
CFLAGS+= -fno-strict-aliasing
CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
CWARNFLAGS+= -Wno-type-limits
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
# XXX This is a workaround for platforms that have relative relocations
# that, when relocated by the module loader, result in addresses that
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/i386/stand/efiboot/bootx64/Makefile
--- a/sys/arch/i386/stand/efiboot/bootx64/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/i386/stand/efiboot/bootx64/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2023/06/03 08:52:56 lukem Exp $
+# $NetBSD: Makefile,v 1.6 2023/06/03 21:26:28 lukem Exp $
PROG= bootx64.efi
OBJFMT= pei-x86-64
@@ -12,7 +12,6 @@ CPPFLAGS+= -DEFI_FUNCTION_WRAPPER
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include "${.CURDIR}/../Makefile.efiboot"
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/macppc/stand/Makefile.inc
--- a/sys/arch/macppc/stand/Makefile.inc Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/macppc/stand/Makefile.inc Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.8 2023/06/03 08:52:57 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.9 2023/06/03 21:26:28 lukem Exp $
BINDIR= /usr/mdec
@@ -10,5 +10,4 @@ LINKFLAGS_UNWIND= --no-ld-generated-unwi
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/sparc/stand/boot/Makefile
--- a/sys/arch/sparc/stand/boot/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/sparc/stand/boot/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2023/06/03 08:52:57 lukem Exp $
+# $NetBSD: Makefile,v 1.46 2023/06/03 21:26:28 lukem Exp $
STRIPFLAG=
PROGSOURCE= boot.c net.c netif_sun.c conf.c openfirm.c bootinfo.c \
@@ -17,8 +17,7 @@ SAMISCMAKEFLAGS= SA_USE_CREAD=yes
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include "../Makefile.buildboot"
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/sparc/stand/bootxx/Makefile
--- a/sys/arch/sparc/stand/bootxx/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/sparc/stand/bootxx/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2023/06/03 08:52:57 lukem Exp $
+# $NetBSD: Makefile,v 1.21 2023/06/03 21:26:28 lukem Exp $
PROG= bootxx
PROGSOURCE= bootxx.c
@@ -13,8 +13,7 @@ CLEANFILES+= ${PROG}.sym
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/sparc/stand/ofwboot/Makefile
--- a/sys/arch/sparc/stand/ofwboot/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/sparc/stand/ofwboot/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2023/06/03 08:52:57 lukem Exp $
+# $NetBSD: Makefile,v 1.42 2023/06/03 21:26:28 lukem Exp $
.include <bsd.init.mk>
@@ -41,8 +41,7 @@ CPPFLAGS+= -DSUPPORT_DHCP
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
LINKS+= ${BINDIR}/ofwboot ${BINDIR}/ofwboot.net
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/arch/zaurus/stand/Makefile.inc
--- a/sys/arch/zaurus/stand/Makefile.inc Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/arch/zaurus/stand/Makefile.inc Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.9 2023/06/03 08:52:57 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.10 2023/06/03 21:26:28 lukem Exp $
BINDIR= /usr/mdec
KLINK_MACHINE= zaurus
@@ -6,5 +6,4 @@ KLINK_MACHINE= zaurus
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/conf/Makefile.kern.inc Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.296 2023/06/03 08:52:58 lukem Exp $
+# $NetBSD: Makefile.kern.inc,v 1.297 2023/06/03 21:26:29 lukem Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -95,9 +95,9 @@ CWARNFLAGS+= -Wold-style-definition
CWARNFLAGS+= -Wno-sign-compare
CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \
- -Wno-self-assign -Wno-error=address-of-packed-member \
+ -Wno-self-assign \
-Wno-error=constant-conversion
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":? \
-Wno-shift-count-negative -Wno-shift-count-overflow:}
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/rump/fs/lib/libudf/Makefile
--- a/sys/rump/fs/lib/libudf/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/rump/fs/lib/libudf/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2023/06/03 08:52:59 lukem Exp $
+# $NetBSD: Makefile,v 1.13 2023/06/03 21:26:29 lukem Exp $
#
.PATH: ${.CURDIR}/../../../../fs/udf
@@ -11,8 +11,8 @@ SRCS= udf_osta.c udf_vfsops.c udf_vnops.
udf_strat_direct.c udf_strat_sequential.c udf_strat_rmw.c \
udf_rename.c
-CWARNFLAGS.clang+= -Wno-self-assign -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS.clang+= -Wno-self-assign
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/rump/net/lib/Makefile.inc
--- a/sys/rump/net/lib/Makefile.inc Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/rump/net/lib/Makefile.inc Sat Jun 03 21:26:27 2023 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.9 2023/06/03 08:52:59 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.10 2023/06/03 21:26:29 lukem Exp $
#
RUMPTOP= ${.CURDIR}/../../..
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member -Werror=constant-conversion
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS.clang+= -Werror=constant-conversion
+CWARNFLAGS= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include "${RUMPTOP}/Makefile.rump"
diff -r 5821c0fd5fe3 -r 0e3849880f42 sys/stand/efiboot/Makefile.efiboot
--- a/sys/stand/efiboot/Makefile.efiboot Sat Jun 03 21:24:57 2023 +0000
+++ b/sys/stand/efiboot/Makefile.efiboot Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.27 2023/06/03 08:52:59 lukem Exp $
+# $NetBSD: Makefile.efiboot,v 1.28 2023/06/03 21:26:29 lukem Exp $
S= ${.CURDIR}/../../..
@@ -106,8 +106,7 @@ CPPFLAGS+= -DDEFAULT_TIMEOUT=5
# Follow the suit of Makefile.kern.inc; needed for the lfs64 union
# accessors -- they don't actually dereference the resulting pointer,
# just use it for type-checking.
-CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
-CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
+CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
SAMISCCPPFLAGS+= -DLIBSA_PRINTF_LONGLONG_SUPPORT
SAMISCCPPFLAGS+= -DLIBSA_PRINTF_WIDTH_SUPPORT
diff -r 5821c0fd5fe3 -r 0e3849880f42 usr.sbin/fstyp/Makefile
--- a/usr.sbin/fstyp/Makefile Sat Jun 03 21:24:57 2023 +0000
+++ b/usr.sbin/fstyp/Makefile Sat Jun 03 21:26:27 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2023/06/03 08:53:00 lukem Exp $
Home |
Main Index |
Thread Index |
Old Index