Source-Changes-HG archive

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

[src/trunk]: src bsd.own.mk: rename NO_ADDR_OF_PACKED_MEMBER to CC_NO_ADDR_OF...



details:   https://anonhg.NetBSD.org/src/rev/2ce255514720
branches:  trunk
changeset: 376061:2ce255514720
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon May 29 20:31:09 2023 +0000

description:
bsd.own.mk: rename NO_ADDR_OF_PACKED_MEMBER to CC_NO_ADDR_OF_PACKED_MEMBER

Add "CC_" prefix to NO_ADDR_OF_PACKED_MEMBER.

We now have the following convention:
GCC_NO_*: Disable specific warnings from GCC.
CLANG_NO_*: Disable specific warnings from Clang.
CC_NO_*: Disable specific warnings from both Clang and GCC.

This reserves "NO_*" Makefile variables to disable other features.

Some space->tab fixes.

diffstat:

 share/mk/bsd.own.mk             |  18 +++++++++++++-----
 sys/modules/ffs/Makefile        |   4 ++--
 sys/modules/ipl/Makefile        |  16 ++++++++--------
 sys/modules/npf/Makefile        |   4 ++--
 sys/modules/pf/Makefile         |  10 +++++-----
 sys/modules/slcompress/Makefile |   4 ++--
 sys/modules/udf/Makefile        |   8 ++++----
 sys/modules/v7fs/Makefile       |   4 ++--
 8 files changed, 38 insertions(+), 30 deletions(-)

diffs (197 lines):

diff -r aceebbbb4a86 -r 2ce255514720 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Mon May 29 18:25:52 2023 +0000
+++ b/share/mk/bsd.own.mk       Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.1328 2023/05/29 17:35:11 lukem Exp $
+#      $NetBSD: bsd.own.mk,v 1.1329 2023/05/29 20:31:09 lukem Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -872,8 +872,9 @@ NOPROFILE=  # defined
 .endif
 
 #
-# GCC warnings with simple disables.  Use these with eg
-# COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}.
+# GCC_NO_*: Disable specific warnings from GCC.
+# Use these with e.g.
+#      COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}
 #
 GCC_NO_FORMAT_TRUNCATION=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :}
 GCC_NO_FORMAT_OVERFLOW=                ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :}
@@ -886,11 +887,18 @@ GCC_NO_MAYBE_UNINITIALIZED=       ${${ACTIVE_C
 GCC_NO_RETURN_LOCAL_ADDR=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :}
 
 #
-# Clang warnings
+# CLANG_NO_*: Disable specific warnings from Clang.
+# Use these with e.g.
+#      COPTS.foo.c+= ${CLANG_NO_ADDR_OF_PACKED_MEMBER}
 #
 CLANG_NO_ADDR_OF_PACKED_MEMBER=        ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :}
 
-NO_ADDR_OF_PACKED_MEMBER=      ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+#
+# CC_NO_*: Disable specific warnings from both Clang and GCC.
+# Use these with e.g.
+#      COPTS.foo.c+= ${CC_NO_ADDR_OF_PACKED_MEMBER}
+#
+CC_NO_ADDR_OF_PACKED_MEMBER=   ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER}
 
 #
 # The ia64 port is incomplete.
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/ffs/Makefile
--- a/sys/modules/ffs/Makefile  Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/ffs/Makefile  Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2022/08/09 20:05:14 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.23 2023/05/29 20:31:10 lukem Exp $
 
 .include "../Makefile.inc"
 
@@ -9,7 +9,7 @@ CPPFLAGS+=      -DFFS_EI -DWAPBL -DAPPLE_UFS 
 CPPFLAGS+=     -DUFS_EXTATTR -DUFS_ACL -DUFS_DIRHASH
 
 CWARNFLAGS.clang=      -Wno-conversion
-COPTS.ffs_appleufs.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ffs_appleufs.c+= ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 SRCS+= ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c \
        ffs_vfsops.c ffs_vnops.c ffs_snapshot.c ffs_extattr.c \
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/ipl/Makefile
--- a/sys/modules/ipl/Makefile  Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/ipl/Makefile  Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2020/10/18 19:56:42 christos Exp $
+#      $NetBSD: Makefile,v 1.7 2023/05/29 20:31:10 lukem Exp $
 #
 
 .include "../Makefile.inc"
@@ -57,12 +57,12 @@ SRCS+=      radix_ipf.c
 WARNS= 3
 
 CWARNFLAGS.clang+=     -Wno-self-assign
-COPTS.fil.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_fil_netbsd.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_htable.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_nat.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_nat6.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_proxy.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.ip_state.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.fil.c+=          ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_fil_netbsd.c+=        ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_htable.c+=    ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_nat.c+=       ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_nat6.c+=      ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_proxy.c+=     ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ip_state.c+=     ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 .include <bsd.kmodule.mk>
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/npf/Makefile
--- a/sys/modules/npf/Makefile  Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/npf/Makefile  Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2020/10/18 19:56:42 christos Exp $
+# $NetBSD: Makefile,v 1.29 2023/05/29 20:31:10 lukem Exp $
 #
 # Public Domain.
 #
@@ -21,7 +21,7 @@ SRCS+=                nvlist.c nvpair.c nv_kern_netbsd
 CPPFLAGS+=     -DINET6
 CPPFLAGS+=     -I${S}/external/bsd/libnv/dist
 
-COPTS.npf_inet.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.npf_inet.c+=     ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 
 .include <bsd.kmodule.mk>
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/pf/Makefile
--- a/sys/modules/pf/Makefile   Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/pf/Makefile   Mon May 29 20:31:09 2023 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.15 2020/10/18 19:56:42 christos Exp $
+# $NetBSD: Makefile,v 1.16 2023/05/29 20:31:10 lukem Exp $
 
 .include "../Makefile.inc"
 
 .PATH: ${S}/dist/pf/net ${S}/dist/pf/netinet
 
-KMOD=   pf
+KMOD=  pf
 IOCONF=        pf.ioconf
 SRCS=  if_compat.c
 SRCS+= if_pflog.c
@@ -25,8 +25,8 @@ WARNS=        3
 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
 COPTS.pf.c+=   -Wno-error=implicit-fallthrough
 .endif
-COPTS.pf.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.pf_norm.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.pf_table.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.pf.c+=           ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.pf_norm.c+=      ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.pf_table.c+=     ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 .include <bsd.kmodule.mk>
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/slcompress/Makefile
--- a/sys/modules/slcompress/Makefile   Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/slcompress/Makefile   Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2020/10/18 19:56:42 christos Exp $
+#      $NetBSD: Makefile,v 1.5 2023/05/29 20:31:10 lukem Exp $
 
 .include "../Makefile.inc"
 
@@ -9,7 +9,7 @@ SRCS=   slcompress.c
 
 CPPFLAGS+=     -DINET
 
-COPTS.slcompress.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.slcompress.c+=   ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 
 WARNS= 3
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/udf/Makefile
--- a/sys/modules/udf/Makefile  Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/udf/Makefile  Mon May 29 20:31:09 2023 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.6 2020/10/18 19:56:42 christos Exp $
+#      $NetBSD: Makefile,v 1.7 2023/05/29 20:31:10 lukem Exp $
 
 .include "../Makefile.inc"
 
 .PATH: ${S}/fs/udf
 
-KMOD=          udf
+KMOD=  udf
 SRCS=  udf_allocation.c udf_osta.c udf_readwrite.c udf_strat_bootstrap.c \
        udf_strat_direct.c udf_strat_rmw.c udf_strat_sequential.c udf_subr.c \
        udf_vnops.c udf_vfsops.c udf_rename.c
@@ -13,7 +13,7 @@ WARNS=        3
 
 CWARNFLAGS.clang=      -Wno-self-assign
 
-COPTS.udf_allocation.c+=       ${NO_ADDR_OF_PACKED_MEMBER}
-COPTS.udf_subr.c+=     ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.udf_allocation.c+=       ${CC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.udf_subr.c+=             ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 .include <bsd.kmodule.mk>
diff -r aceebbbb4a86 -r 2ce255514720 sys/modules/v7fs/Makefile
--- a/sys/modules/v7fs/Makefile Mon May 29 18:25:52 2023 +0000
+++ b/sys/modules/v7fs/Makefile Mon May 29 20:31:09 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2020/10/18 19:56:42 christos Exp $
+#      $NetBSD: Makefile,v 1.4 2023/05/29 20:31:09 lukem Exp $
 
 .include "../Makefile.inc"
 
@@ -22,7 +22,7 @@ SRCS+=        v7fs_extern.c
 SRCS+= v7fs_vnops.c
 SRCS+= v7fs_vfsops.c
 
-COPTS.v7fs_superblock.c += ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.v7fs_superblock.c += ${CC_NO_ADDR_OF_PACKED_MEMBER}
 
 WARNS= 3
 



Home | Main Index | Thread Index | Old Index