Source-Changes-HG archive

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

[src/trunk]: src/share/mk Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno...



details:   https://anonhg.NetBSD.org/src/rev/383467c86944
branches:  trunk
changeset: 778065:383467c86944
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Mar 15 02:00:52 2012 +0000

description:
Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.

diffstat:

 share/mk/bsd.kmodule.mk |  4 ++--
 share/mk/bsd.sys.mk     |  7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r 6e2eed34307e -r 383467c86944 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk   Thu Mar 15 01:44:44 2012 +0000
+++ b/share/mk/bsd.kmodule.mk   Thu Mar 15 02:00:52 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kmodule.mk,v 1.35 2012/02/19 23:19:37 matt Exp $
+#      $NetBSD: bsd.kmodule.mk,v 1.36 2012/03/15 02:00:52 joerg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -18,7 +18,7 @@
 CPPFLAGS+=     -D_KERNEL -D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR
 
 # XXX until the kernel is fixed again...
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
+.if defined(HAVE_GCC) || defined(HAVE_PCC) || defined(HAVE_LLVM)
 CFLAGS+=       -fno-strict-aliasing -Wno-pointer-sign
 .endif
 
diff -r 6e2eed34307e -r 383467c86944 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Thu Mar 15 01:44:44 2012 +0000
+++ b/share/mk/bsd.sys.mk       Thu Mar 15 02:00:52 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.211 2012/01/28 21:32:14 christos Exp $
+#      $NetBSD: bsd.sys.mk,v 1.212 2012/03/15 02:00:52 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -13,7 +13,7 @@
 # Enable c99 mode by default.
 # This has the side effect of complaining for missing prototypes
 # implicit type declarations and missing return statements.
-.if defined(HAVE_GCC)
+.if defined(HAVE_GCC) || defined(HAVE_LLVM)
 CFLAGS+=       -std=gnu99
 .endif
 
@@ -59,8 +59,9 @@
                -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
 CXXFLAGS+=     ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
 .endif
-.if ${WARNS} > 3 && defined(HAVE_GCC)
+.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM))
 CFLAGS+=       -Wsign-compare -Wformat=2
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :}
 .endif
 .if ${WARNS} > 3 && defined(HAVE_LLVM)
 CFLAGS+=       ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}



Home | Main Index | Thread Index | Old Index