summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-03-15 19:23:26 +0000
committerjoerg <joerg@pkgsrc.org>2015-03-15 19:23:26 +0000
commit48bb17c58b4fd7d72c936015a6af28557b9cd5c9 (patch)
tree35abe44e2f6673d32b7a7adaed921dc16caa0e71 /mk/buildlink3
parent482a42fb0c2548a335a0dd84d5ce03068470c0a3 (diff)
downloadpkgsrc-48bb17c58b4fd7d72c936015a6af28557b9cd5c9.tar.gz
PR 49686: Drop -I and -L options references the built-in search
directories of the compiler/linker when using cwrappers. Command line flags will often put them before the corresponding flags for PREFIX/include and PREFIX/lib, so the version from outside .buildlink would be prefered. The other way around is much less likely to be a problem and normally the expected case. Bump required cwrappers version for the necessary exact-match feature.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 5d5992f424b..1abb6044b0d 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.232 2014/12/30 15:13:19 wiz Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.233 2015/03/15 19:23:26 joerg Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -812,6 +812,14 @@ _BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PASSTHRU_DIRS}
.for _dir_ in ${COMPILER_LIB_DIRS} ${COMPILER_INCLUDE_DIRS} ${LOCALBASE} ${X11BASE}
_BLNK_PASSTHRU_DIRS:= ${_BLNK_PASSTHRU_DIRS:N${_dir_}}
.endfor
+# For cwrappers, drop compiler specific search directories, but keep subdirectories.
+# E.g. /usr/include/openssl should be kept, but /usr/include must be dropped.
+.for _dir_ in ${COMPILER_LIB_DIRS}
+_CWRAPPERS_TRANSFORM+= L:${_dir_}/:
+.endfor
+.for _dir_ in ${COMPILER_INCLUDE_DIRS}
+_CWRAPPERS_TRANSFORM+= I:${_dir_}/:
+.endfor
#
# Allow all directories in the library subdirectories listed for each
# package to be in the runtime library search path.