summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjlam <jlam>2003-08-16 07:26:50 +0000
committerjlam <jlam>2003-08-16 07:26:50 +0000
commit38fb97c4c4680d020ffe6ce4ed4f6cd556a7b4f4 (patch)
tree21a46935b18aca343adc444c5f42d01319001a67 /mk/buildlink3
parentc17995426bfad42eea4eaa252237b323b5766f5a (diff)
downloadpkgsrc-38fb97c4c4680d020ffe6ce4ed4f6cd556a7b4f4.tar.gz
Add comments to the ld-post-* files that document exactly what the purpose
of these files is.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r--mk/buildlink3/ld-post-cache9
-rw-r--r--mk/buildlink3/ld-post-logic10
2 files changed, 15 insertions, 4 deletions
diff --git a/mk/buildlink3/ld-post-cache b/mk/buildlink3/ld-post-cache
index a5a1e7df543..5fc49d8370c 100644
--- a/mk/buildlink3/ld-post-cache
+++ b/mk/buildlink3/ld-post-cache
@@ -1,5 +1,10 @@
-# $NetBSD: ld-post-cache,v 1.1.2.1 2003/08/14 13:16:49 jlam Exp $
-
+# $NetBSD: ld-post-cache,v 1.1.2.2 2003/08/16 07:26:50 jlam Exp $
+#
+# This file implements the default action of the "ld" private cache,
+# and tells the wrapper to skip the common cache lookup for all
+# arguments that start with "-Wl,"; they will instead be handled
+# directly by ld-post-logic.
+#
-Wl,*)
skipcache=yes
;;
diff --git a/mk/buildlink3/ld-post-logic b/mk/buildlink3/ld-post-logic
index 5f262a19015..0e9747f6b3b 100644
--- a/mk/buildlink3/ld-post-logic
+++ b/mk/buildlink3/ld-post-logic
@@ -1,5 +1,11 @@
-# $NetBSD: ld-post-logic,v 1.1.2.1 2003/08/14 13:16:50 jlam Exp $
-
+# $NetBSD: ld-post-logic,v 1.1.2.2 2003/08/16 07:26:51 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"`