Source-Changes-HG archive

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

[src/trunk]: src/sys/modules/dtrace Restrict -Wno-discarded-qualifiers in sys...



details:   https://anonhg.NetBSD.org/src/rev/96ac9773cd9c
branches:  trunk
changeset: 362377:96ac9773cd9c
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 06 14:57:38 2018 +0000

description:
Restrict -Wno-discarded-qualifiers in sys/modules/dtrace/* to GCC

Clang/LLVM does not recognize it.

This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.

Sponsored by <The NetBSD Foundation>

diffstat:

 sys/modules/dtrace/dtrace/Makefile           |  5 ++++-
 sys/modules/dtrace/linux32_syscall/Makefile  |  7 +++++--
 sys/modules/dtrace/linux_syscall/Makefile    |  4 ++++
 sys/modules/dtrace/netbsd32_syscall/Makefile |  7 +++++--
 sys/modules/dtrace/profile/Makefile          |  8 ++++++--
 sys/modules/dtrace/syscall/Makefile          |  7 +++++--
 6 files changed, 29 insertions(+), 9 deletions(-)

diffs (98 lines):

diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/dtrace/Makefile
--- a/sys/modules/dtrace/dtrace/Makefile        Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/dtrace/Makefile        Wed Jun 06 14:57:38 2018 +0000
@@ -42,9 +42,12 @@
 CPPFLAGS+=     -Wno-unknown-pragmas \
                -Wno-shadow \
                -Wno-unused-variable \
-               -Wno-discarded-qualifiers \
                -Wno-unused-function
 
+.if defined(HAVE_LLVM)
+CPPFLAGS+=      -Wno-discarded-qualifiers
+.endif
+
 COPTS.dis_tables.c+= \
                -Wno-missing-field-initializers \
                -Wno-cast-qual \
diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/linux32_syscall/Makefile
--- a/sys/modules/dtrace/linux32_syscall/Makefile       Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/linux32_syscall/Makefile       Wed Jun 06 14:57:38 2018 +0000
@@ -11,7 +11,10 @@
                -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common \
                -I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace
 
-CPPFLAGS+=     -Wno-unknown-pragmas \
-               -Wno-discarded-qualifiers
+CPPFLAGS+=     -Wno-unknown-pragmas
+
+.if defined(HAVE_LLVM)
+CPPFLAGS+=     -Wno-discarded-qualifiers
+.endif
 
 .include <bsd.kmodule.mk>
diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/linux_syscall/Makefile
--- a/sys/modules/dtrace/linux_syscall/Makefile Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/linux_syscall/Makefile Wed Jun 06 14:57:38 2018 +0000
@@ -14,4 +14,8 @@
 CPPFLAGS+=     -Wno-unknown-pragmas \
                -Wno-discarded-qualifiers
 
+.if defined(HAVE_LLVM)
+CPPFLAGS+=     -Wno-discarded-qualifiers
+.endif
+
 .include <bsd.kmodule.mk>
diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/netbsd32_syscall/Makefile
--- a/sys/modules/dtrace/netbsd32_syscall/Makefile      Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/netbsd32_syscall/Makefile      Wed Jun 06 14:57:38 2018 +0000
@@ -11,7 +11,10 @@
                -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common \
                -I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace
 
-CPPFLAGS+=     -Wno-unknown-pragmas \
-               -Wno-discarded-qualifiers
+CPPFLAGS+=     -Wno-unknown-pragmas
+
+.if defined(HAVE_LLVM)
+CPPFLAGS+=     -Wno-discarded-qualifiers
+.endif
 
 .include <bsd.kmodule.mk>
diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/profile/Makefile
--- a/sys/modules/dtrace/profile/Makefile       Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/profile/Makefile       Wed Jun 06 14:57:38 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/05/28 21:05:01 chs Exp $
+# $NetBSD: Makefile,v 1.4 2018/06/06 14:57:38 kamil Exp $
 
 .include "../../Makefile.inc"
 
@@ -11,6 +11,10 @@
                -I${NETBSDSRCDIR}/external/cddl/osnet/dev/profile \
                -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
 
-CPPFLAGS+=     -Wno-unknown-pragmas -Wno-cast-qual -Wno-discarded-qualifiers
+CPPFLAGS+=     -Wno-unknown-pragmas -Wno-cast-qual
+
+.if defined(HAVE_LLVM)
+CPPFLAGS+=     -Wno-discarded-qualifiers
+.endif
 
 .include <bsd.kmodule.mk>
diff -r ddba96b0c1f2 -r 96ac9773cd9c sys/modules/dtrace/syscall/Makefile
--- a/sys/modules/dtrace/syscall/Makefile       Wed Jun 06 14:47:54 2018 +0000
+++ b/sys/modules/dtrace/syscall/Makefile       Wed Jun 06 14:57:38 2018 +0000
@@ -11,7 +11,10 @@
                -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common \
                -I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace
 
-CPPFLAGS+=     -Wno-unknown-pragmas \
-               -Wno-discarded-qualifiers
+CPPFLAGS+=     -Wno-unknown-pragmas
+
+.if defined(HAVE_LLVM)
+CPPFLAGS+=     -Wno-discarded-qualifiers
+.endif
 
 .include <bsd.kmodule.mk>



Home | Main Index | Thread Index | Old Index