Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Replace HAVE_GCC with ACTIVE_CC == gcc checks
details: https://anonhg.NetBSD.org/src/rev/a5f3b1c34bc4
branches: trunk
changeset: 319689:a5f3b1c34bc4
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Jun 07 13:21:44 2018 +0000
description:
Replace HAVE_GCC with ACTIVE_CC == gcc checks
Kernel modules build with GCC and Clang/LLVM.
Requested by <joerg>
diffstat:
external/cddl/osnet/Makefile.zfs | 6 ++----
external/cddl/osnet/lib/libdtrace/Makefile | 14 ++++----------
external/cddl/osnet/usr.sbin/dtrace/Makefile | 8 +++-----
sys/modules/dtrace/dtrace/Makefile | 9 ++-------
sys/modules/dtrace/linux32_syscall/Makefile | 4 +---
sys/modules/dtrace/linux_syscall/Makefile | 4 +---
sys/modules/dtrace/netbsd32_syscall/Makefile | 4 +---
sys/modules/dtrace/profile/Makefile | 6 ++----
sys/modules/dtrace/syscall/Makefile | 4 +---
9 files changed, 17 insertions(+), 42 deletions(-)
diffs (175 lines):
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 external/cddl/osnet/Makefile.zfs
--- a/external/cddl/osnet/Makefile.zfs Thu Jun 07 12:36:45 2018 +0000
+++ b/external/cddl/osnet/Makefile.zfs Thu Jun 07 13:21:44 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.zfs,v 1.7 2018/06/06 15:01:13 kamil Exp $
+# $NetBSD: Makefile.zfs,v 1.8 2018/06/07 13:21:44 kamil Exp $
.include <bsd.own.mk>
@@ -42,9 +42,7 @@
CWARNFLAGS+= -Wno-missing-field-initializers
CWARNFLAGS+= -Wno-strict-prototypes
CWARNFLAGS+= -Wno-cast-qual
-.if defined(HAVE_GCC)
-CWARNFLAGS+= -Wno-discarded-qualifiers
-.endif
+CWARNFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
CWARNFLAGS+= -Wno-switch
CWARNFLAGS+= -Wno-missing-prototypes
CWARNFLAGS+= -Wno-unused-variable
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 external/cddl/osnet/lib/libdtrace/Makefile
--- a/external/cddl/osnet/lib/libdtrace/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/external/cddl/osnet/lib/libdtrace/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/06/06 14:18:39 kamil Exp $
+# $NetBSD: Makefile,v 1.19 2018/06/07 13:21:44 kamil Exp $
# $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
@@ -87,13 +87,9 @@
COPTS.dt_subr.c += -Wno-stack-protector
COPTS.dt_consume.c += -Wno-parentheses
-.if defined(HAVE_GCC)
-COPTS.dt_consume.c += -Wno-maybe-uninitialized
-.endif
+COPTS.dt_consume.c += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
COPTS.dt_options.c += -Wno-parentheses
-.if defined(HAVE_GCC)
-COPTS.dt_pid.c += -Wno-unused-but-set-variable
-.endif
+COPTS.dt_pid.c += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
COPTS.dt_isadep.c += -Wno-unused-variable
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
@@ -102,9 +98,7 @@
.PATH: ${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/x86
SRCS+= dis_tables.c
COPTS.dis_tables.c += -Wno-parentheses
-.if defined(HAVE_GCC)
-COPTS.dis_tables.c += -Wno-maybe-uninitialized
-.endif
+COPTS.dis_tables.c += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
.elif ${MACHINE_ARCH} == "sparc64"
CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
.elif ${MACHINE_CPU} == "arm"
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 external/cddl/osnet/usr.sbin/dtrace/Makefile
--- a/external/cddl/osnet/usr.sbin/dtrace/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/external/cddl/osnet/usr.sbin/dtrace/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2018/06/06 14:31:45 kamil Exp $
+# $NetBSD: Makefile,v 1.12 2018/06/07 13:21:44 kamil Exp $
# $FreeBSD: head/cddl/usr.sbin/dtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
@@ -32,10 +32,8 @@
COPTS.dtrace.c += -Wno-format-extra-args
COPTS.dtrace.c += -Wno-shadow
-.if defined(HAVE_GCC)
-COPTS.dtrace.c += -Wno-discarded-qualifiers
-COPTS.dtrace.c += -Wno-unused-but-set-variable
-.endif
+COPTS.dtrace.c += ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+COPTS.dtrace.c += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
COPTS.dtrace.c += -Wno-missing-field-initializers
COPTS.dtrace.c += -Wno-format
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/dtrace/Makefile
--- a/sys/modules/dtrace/dtrace/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/dtrace/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -44,9 +44,7 @@
-Wno-unused-variable \
-Wno-unused-function
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
COPTS.dis_tables.c+= \
-Wno-missing-field-initializers \
@@ -54,10 +52,7 @@
-Wno-parentheses \
-Wno-uninitialized
-.if defined(HAVE_GCC)
-COPTS.dtrace.c+= \
- -Wno-unused-but-set-variable
-.endif
+COPTS.dtrace.c+= ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
COPTS.dtrace_subr.c+= \
-Wno-unused-value
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/linux32_syscall/Makefile
--- a/sys/modules/dtrace/linux32_syscall/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/linux32_syscall/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -13,8 +13,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
.include <bsd.kmodule.mk>
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/linux_syscall/Makefile
--- a/sys/modules/dtrace/linux_syscall/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/linux_syscall/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -13,8 +13,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
.include <bsd.kmodule.mk>
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/netbsd32_syscall/Makefile
--- a/sys/modules/dtrace/netbsd32_syscall/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/netbsd32_syscall/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -13,8 +13,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
.include <bsd.kmodule.mk>
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/profile/Makefile
--- a/sys/modules/dtrace/profile/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/profile/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/06/06 15:01:13 kamil Exp $
+# $NetBSD: Makefile,v 1.6 2018/06/07 13:21:44 kamil Exp $
.include "../../Makefile.inc"
@@ -13,8 +13,6 @@
CPPFLAGS+= -Wno-unknown-pragmas -Wno-cast-qual
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
.include <bsd.kmodule.mk>
diff -r 0dd7f9a1792c -r a5f3b1c34bc4 sys/modules/dtrace/syscall/Makefile
--- a/sys/modules/dtrace/syscall/Makefile Thu Jun 07 12:36:45 2018 +0000
+++ b/sys/modules/dtrace/syscall/Makefile Thu Jun 07 13:21:44 2018 +0000
@@ -13,8 +13,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
-.if defined(HAVE_GCC)
-CPPFLAGS+= -Wno-discarded-qualifiers
-.endif
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
.include <bsd.kmodule.mk>
Home |
Main Index |
Thread Index |
Old Index