summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-12-11 06:08:58 +0000
committerjlam <jlam@pkgsrc.org>2001-12-11 06:08:58 +0000
commitee8008410482786436e6bc69dde4cac12f1d0bb1 (patch)
tree4cf8de38a96d3b23f6762446d29f1a1482187983
parent5f4e94cc836893345d449de7aeb4dc282d1b3302 (diff)
downloadpkgsrc-ee8008410482786436e6bc69dde4cac12f1d0bb1.tar.gz
Only replace -L${LOCALBASE}/lib with "-L*" options from ${LDFLAGS} so that
we don't accidentally add options that the linker doesn't understand, such as "-Wl,-R*". This should fix pkg/14907 by John Klos john@sixgirls.org where the a.out linker ld doesn't understand extra flags passed in from LDFLAGS from the pkgsrc environment when building a perl package.
-rw-r--r--lang/perl5/buildlink.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/lang/perl5/buildlink.mk b/lang/perl5/buildlink.mk
index b21700b59f0..cdc2da7d47f 100644
--- a/lang/perl5/buildlink.mk
+++ b/lang/perl5/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.7 2001/11/30 17:21:56 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.8 2001/12/11 06:08:58 jlam Exp $
#
# This Makefile fragment is included by packages that use perl.
#
@@ -41,16 +41,16 @@ BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.perl}
_CONFIG_PM= ${PERL5_ARCHLIB}/Config.pm
_BUILDLINK_CONFIG_PM= ${_CONFIG_PM:S/${BUILDLINK_PREFIX.perl}\//${BUILDLINK_DIR}\//}
-_CPPFLAGS_LIBDIRS?= ${CPPFLAGS:M-I*:S/^-I//}
+_CPPFLAGS_INCDIRS?= ${CPPFLAGS:M-I*:S/^-I//}
_LDFLAGS_LIBDIRS?= ${LDFLAGS:M-L*:S/^-L//}
_CONFIG_PM_SED= \
-e "/^libpth=/s|${LOCALBASE}/lib|${_LDFLAGS_LIBDIRS}|g" \
-e "/^libspath=/s|${LOCALBASE}/lib|${_LDFLAGS_LIBDIRS}|g" \
- -e "/^locincpth=/s|${LOCALBASE}/include|${_CPPFLAGS_LIBDIRS}|g" \
+ -e "/^locincpth=/s|${LOCALBASE}/include|${_CPPFLAGS_INCDIRS}|g" \
-e "/^loclibpth=/s|${LOCALBASE}/lib|${_LDFLAGS_LIBDIRS}|g" \
- -e "s|-I${LOCALBASE}/include|${CPPFLAGS}|g" \
- -e "s|-L${LOCALBASE}/lib|${LDFLAGS}|g"
+ -e "s|-I${LOCALBASE}/include|${CPPFLAGS:M-I*}|g" \
+ -e "s|-L${LOCALBASE}/lib|${LDFLAGS:M-L*}|g"
REPLACE_RPATH_SED+= -e "/^LD_RUN_PATH/s|${BUILDLINK_DIR}|${LOCALBASE}|g"
REPLACE_RPATH_SED+= -e "/^LD_RUN_PATH/s|${BUILDLINK_X11_DIR}|${X11BASE}|g"