Module Name:    src
Committed By:   christos
Date:           Sat Jan 27 23:59:18 UTC 2018

Modified Files:
        src/share/mk: bsd.own.mk

Log Message:
explain how to allow coverity to use sysroot


To generate a diff of this commit:
cvs rdiff -u -r1.1028 -r1.1029 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1028 src/share/mk/bsd.own.mk:1.1029
--- src/share/mk/bsd.own.mk:1.1028	Wed Jan 24 04:04:42 2018
+++ src/share/mk/bsd.own.mk	Sat Jan 27 18:59:17 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1028 2018/01/24 09:04:42 skrll Exp $
+#	$NetBSD: bsd.own.mk,v 1.1029 2018/01/27 23:59:17 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -312,15 +312,17 @@ TOOL_CXX.pcc=		${TOOLDIR}/bin/${MACHINE_
 #
 DESTDIR?=
 
-# Coverity does not like --sysroot
+# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.
+# because it confuses Coverity. Still we need to cov-configure specially
+# for each specific sysroot argument.
 .if !defined(HOSTPROG) && !defined(HOSTLIB)
 .  if ${DESTDIR} != ""
-.	if !defined(COVERITY_TOP_CONFIG)
+.	if empty(CPPFLAGS:M*--sysroot=*)
 CPPFLAGS+=	--sysroot=${DESTDIR}
 .	endif
 LDFLAGS+=	--sysroot=${DESTDIR}
 .  else
-.	if !defined(COVERITY_TOP_CONFIG)
+.	if empty(CPPFLAGS:M*--sysroot=*)
 CPPFLAGS+=	--sysroot=/
 .	endif
 LDFLAGS+=	--sysroot=/

Reply via email to