pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/wrapper Properly turn:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e57da7cf0d88
branches:  trunk
changeset: 495388:e57da7cf0d88
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jun 08 05:54:17 2005 +0000

description:
Properly turn:

        -Wl,-rpath -Wl,/dir1:/dir2:/dir3
into:
        -Wl,-rpath,/dir1 -Wl,-rpath,/dir2 -Wl,-rpath,/dir3

Do the same for -Wl,-R and -Wl,-rpath-link.  This makes the wrapper
scripts pass the test in regress/buildlink-transform/rpath-merge.mk
and fixes PR pkg/27702.

diffstat:

 mk/wrapper/arg-source |  33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diffs (47 lines):

diff -r e171ac006735 -r e57da7cf0d88 mk/wrapper/arg-source
--- a/mk/wrapper/arg-source     Wed Jun 08 05:49:21 2005 +0000
+++ b/mk/wrapper/arg-source     Wed Jun 08 05:54:17 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: arg-source,v 1.5 2005/06/08 05:02:50 jlam Exp $
+# $NetBSD: arg-source,v 1.6 2005/06/08 05:54:17 jlam Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -81,6 +81,37 @@
                IFS="${save_IFS}"
                ;;
        ##############################################################
+       # Merge and split "-Wl,-R -Wl,/dir1:/dir2" into
+       # "-Wl,-R/dir1 -Wl,-R/dir2".  Same for -Wl,-rpath and
+       # -Wl,-rpath-link.
+       ##############################################################
+       -Wl,-R|-Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath)
+               nextarg="$1"; shift
+               case $arg in  
+               -Wl,-R)                 R="-Wl,-R" ;;
+               -Wl,-rpath)             R="-Wl,-rpath," ;;      
+               -Wl,-rpath-link)        R="-Wl,-rpath-link," ;; 
+               -Wl,--rpath)            R="-Wl,--rpath," ;;
+               esac
+               nextarg="${nextarg#-Wl}"
+               case $nextarg in
+               *:*)
+                       save_IFS="${IFS}"; IFS=":"
+                       for dir in $nextarg; do
+                               shquote "$dir"; dir="$shquoted"
+                               append_queue argbuf "$R$dir"
+                               $debug_log $wrapperlog "    (arg-source) push: $R$dir"
+                       done
+                       IFS="${save_IFS}"
+                       ;;
+               *)
+                       shquote "$nextarg"; nextarg="$shquoted"
+                       append_queue argbuf "$R$nextarg"
+                       $debug_log $wrapperlog "    (arg-source) push: $R$nextarg"
+                       ;;
+               esac
+               ;;
+       ##############################################################
        # "-Xlinker arg" is the equivalent of "-Wl,arg" so convert it
        # here before queueing it up.
        ##############################################################



Home | Main Index | Thread Index | Old Index