summaryrefslogtreecommitdiff
path: root/mk/wrapper/logic
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-10-08 21:53:53 +0000
committerjlam <jlam@pkgsrc.org>2004-10-08 21:53:53 +0000
commita56045d241319767a79530bd8b438a50b84fd485 (patch)
tree3e4e041a25d06da4a9c20346432ce47b4785fc7e /mk/wrapper/logic
parentb1885b96feb66c06c3c30d031abd171bc5fb4394 (diff)
downloadpkgsrc-a56045d241319767a79530bd8b438a50b84fd485.tar.gz
Drop the extraneous comma in "-Wl,-R,/dir" and turn it into "-Wl,-R/dir".
Do the same for options that look like "-Wl,-L,/dir".
Diffstat (limited to 'mk/wrapper/logic')
-rw-r--r--mk/wrapper/logic16
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/wrapper/logic b/mk/wrapper/logic
index b9314e1e089..84a969dc3dc 100644
--- a/mk/wrapper/logic
+++ b/mk/wrapper/logic
@@ -1,4 +1,4 @@
-# $NetBSD: logic,v 1.5 2004/09/26 19:11:50 danw Exp $
+# $NetBSD: logic,v 1.6 2004/10/08 21:53:53 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -93,6 +93,20 @@ while ! queue_is_empty argbuf; do
$debug_log $wrapperlog " (logic) pre: -L$dir"
;;
######################################################
+ # Remove extraneous comma in "-Wl,-R,/dir" and in
+ # "-Wl,-L,/dir".
+ ######################################################
+ -Wl,-L,*)
+ arg="-Wl,-L${arg#-Wl,-L,}"
+ $debug_log $wrapperlog " (logic) pre: $arg"
+ prepend_queue argbuf "$arg"
+ ;;
+ -Wl,-R,*)
+ arg="-Wl,-R${arg#-Wl,-R,}"
+ $debug_log $wrapperlog " (logic) pre: $arg"
+ prepend_queue argbuf "$arg"
+ ;;
+ ######################################################
# Merge "-Wl,-R -Wl,/dir" into a single "-Wl,-R/dir".
# Same for -Wl,-L, -Wl,-rpath and -Wl,-rpath-link.
######################################################