From ee8008410482786436e6bc69dde4cac12f1d0bb1 Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 11 Dec 2001 06:08:58 +0000 Subject: 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. --- lang/perl5/buildlink.mk | 10 +++++----- 1 file 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" -- cgit v1.2.3