diff options
Diffstat (limited to 'mk/buildlink3/ld-post-logic')
-rw-r--r-- | mk/buildlink3/ld-post-logic | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mk/buildlink3/ld-post-logic b/mk/buildlink3/ld-post-logic new file mode 100644 index 00000000000..c784a3fb4eb --- /dev/null +++ b/mk/buildlink3/ld-post-logic @@ -0,0 +1,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 |