summaryrefslogtreecommitdiff
path: root/mk/buildlink3/ld-post-logic
blob: c784a3fb4ebbecc64d20d3eed344d48d10069049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# $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