summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2002-09-21 23:19:22 +0000
committerjlam <jlam>2002-09-21 23:19:22 +0000
commita64ddec8e7113bf48abcfea10e040897737f32cd (patch)
tree5a26e63c0cda5521d373f7ac1f07a270bd8c715b /mk
parent4f22896028209d30b59fa84b535038ded1948f71 (diff)
downloadpkgsrc-a64ddec8e7113bf48abcfea10e040897737f32cd.tar.gz
Handle removing the rpath flags in the wrappers if USE_BUILDLINK2 is set.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk4
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk11
2 files changed, 13 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 38d5240b0ca..bfca2c5199e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1050 2002/09/18 11:08:25 abs Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1051 2002/09/21 23:19:22 jlam Exp $
#
# This file is in the public domain.
#
@@ -401,7 +401,9 @@ LDFLAGS+= -L${X11BASE}/lib
.if ${_USE_RPATH} == "yes"
LDFLAGS+= -Wl,-R${LOCALBASE}/lib
.else
+. if !defined(USE_BUILDLINK2) # buildlink2 handles -R on its own
LDFLAGS:= ${LDFLAGS:N*-Wl,-R*:N*-rpath*}
+. endif
.endif
.if !defined(USE_BUILDLINK_ONLY)
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index f685879f5eb..82b960ea6d1 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.25 2002/09/21 20:51:03 jlam Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.26 2002/09/21 23:19:23 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -379,6 +379,15 @@ _BLNK_TRANSFORM_SED.r+= \
_BLNK_TRANSFORM_SED.3+= ${_BLNK_TRANSFORM_SED.r}
_BLNK_UNTRANSFORM_SED.3+= ${_BLNK_TRANSFORM_SED.r}
#
+# Remove -Wl,-R* and *-rpath* if _USE_RPATH != "yes"
+#
+.if defined(_USE_RPATH) && empty(_USE_RPATH:M[yY][eE][sS])
+_BLNK_TRANSFORM_SED.3+= \
+ -e "s|-Wl,-R/.*||g" -e "s|-R/.*||g" -e "s|-Wl,-rpath,.*||g"
+_BLNK_UNTRANSFORM_SED.3+= \
+ -e "s|-Wl,-R/.*||g" -e "s|-R/.*||g" -e "s|-Wl,-rpath,.*||g"
+.endif
+#
# Explicitly remove "-I/usr/include" and "-L/usr/lib" as they're redundant.
#
_BLNK_TRANSFORM_SED.3+= \