Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/lib/libdtrace Make cddl/osnet/lib/libdtr...



details:   https://anonhg.NetBSD.org/src/rev/0945940e8152
branches:  trunk
changeset: 833029:0945940e8152
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 06 14:18:39 2018 +0000

description:
Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes

Clang/LLVM does not recognize:
 - -Wno-maybe-uninitialized
 - -Wno-unused-but-set-variable

MKGCC=yes still builds the distribution.

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

Sponsored by <The NetBSD Foundation>

diffstat:

 external/cddl/osnet/lib/libdtrace/Makefile |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r e5df87ab881b -r 0945940e8152 external/cddl/osnet/lib/libdtrace/Makefile
--- a/external/cddl/osnet/lib/libdtrace/Makefile        Wed Jun 06 13:18:44 2018 +0000
+++ b/external/cddl/osnet/lib/libdtrace/Makefile        Wed Jun 06 14:18:39 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2018/05/28 21:05:09 chs Exp $
+#      $NetBSD: Makefile,v 1.18 2018/06/06 14:18:39 kamil Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -86,9 +86,14 @@
 COPTS.dt_provider.c    += -Wno-stack-protector
 COPTS.dt_subr.c                += -Wno-stack-protector
 
-COPTS.dt_consume.c     += -Wno-parentheses -Wno-maybe-uninitialized
+COPTS.dt_consume.c     += -Wno-parentheses
+.if defined(HAVE_GCC)
+COPTS.dt_consume.c     += -Wno-maybe-uninitialized
+.endif
 COPTS.dt_options.c     += -Wno-parentheses
+.if defined(HAVE_GCC)
 COPTS.dt_pid.c         += -Wno-unused-but-set-variable
+.endif
 COPTS.dt_isadep.c      += -Wno-unused-variable
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
@@ -96,7 +101,10 @@
 CPPFLAGS+=     -I${.CURDIR}/../../dev/dtrace/x86
 .PATH:         ${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/x86
 SRCS+=         dis_tables.c
-COPTS.dis_tables.c     += -Wno-parentheses -Wno-maybe-uninitialized
+COPTS.dis_tables.c     += -Wno-parentheses
+.if defined(HAVE_GCC)
+COPTS.dis_tables.c     += -Wno-maybe-uninitialized
+.endif
 .elif ${MACHINE_ARCH} == "sparc64"
 CPPFLAGS+=     -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
 .elif ${MACHINE_CPU} == "arm"



Home | Main Index | Thread Index | Old Index