summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-09-10 07:55:51 +0000
committerngie <ngie@FreeBSD.org>2014-09-10 07:55:51 +0000
commit4cc9e0c39f43821b188fb9ac6afd3c8eeb117e81 (patch)
tree330cda57977b196b7be908cd8c2d3c7e09f4505e /share
parent645f3f53cf53a90202ed8efe564952087b9447ad (diff)
downloadFreeBSD-src-4cc9e0c39f43821b188fb9ac6afd3c8eeb117e81.zip
FreeBSD-src-4cc9e0c39f43821b188fb9ac6afd3c8eeb117e81.tar.gz
Remove many false positives with make checkdpadd
- Reduce DPADD and LDADD in checkdpadd to -l<foo> - Skip over -Wl,[es]*-group because -Wl,--end-group and -Wl,--start-group might be required to properly link objects (see usr.bin/clang/lldb as an example) This caveat has been present for a while with some components of the build. However, these false positives were made more more apparent after r269648. Phabric: D635 Reviewed by: jmmv (an earlier version) PR: 192730 MFC after: 2 weeks
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.dep.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 509c17f..5ce2fa4 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -215,8 +215,10 @@ cleandepend:
.endif
.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD))
-_LDADD_FROM_DPADD= ${DPADD:C;^/usr/lib/lib(.*)\.a$;-l\1;}
-_LDADD_CANONICALIZED= ${LDADD:S/$//}
+_LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g}
+# Ignore -Wl,--start-group/-Wl,--end-group as it might be required in the
+# LDADD list due to unresolved symbols
+_LDADD_CANONICALIZED= ${LDADD:N:R:T:C;^lib(.*)$;-l\1;g:N-Wl,--[es]*-group}
checkdpadd:
.if ${_LDADD_FROM_DPADD} != ${_LDADD_CANONICALIZED}
@echo ${.CURDIR}
OpenPOWER on IntegriCloud