pkgsrc/mk/buildlink3/ld-post-logic
jlam 841b57441b Merge pkgviews-mk branch into the HEAD by running:
cd pkgsrc/mk
	cvs update -Pd -A
	cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
2003-09-02 06:59:37 +00:00

14 lines
515 B
Text

# $NetBSD: ld-post-logic,v 1.2 2003/09/02 06:59:55 jlam Exp $
#
# Strip the "-Wl," from arguments that start with that prefix and add
# the result to the "ld" private cache (which is read before the
# common cache). This makes "ld" silently accept "-Wl,*" arguments,
# which are often a part of the LDFLAGS setting in pkgsrc, and allows
# such LDFLAGS to be shared between the compiler and the linker.
#
case $arg in
-Wl,*)
arg=`$echo "X$arg" | $Xsed -e "s|^-Wl,||g" -e "s|,| |g"`
addtoprivatecache=yes
;;
esac