pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Handle "-Xlinker" being equivalent to "-...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0521d66b176a
branches: trunk
changeset: 471561:0521d66b176a
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Mar 29 06:02:53 2004 +0000
description:
Handle "-Xlinker" being equivalent to "-Wl," when passing arguments
to the linker. This fixes a bug building Emacs on Linux.
diffstat:
mk/buildlink3/marshall | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diffs (56 lines):
diff -r 8650a34fcce6 -r 0521d66b176a mk/buildlink3/marshall
--- a/mk/buildlink3/marshall Mon Mar 29 06:02:30 2004 +0000
+++ b/mk/buildlink3/marshall Mon Mar 29 06:02:53 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: marshall,v 1.10 2004/03/19 00:04:42 danw Exp $
+# $NetBSD: marshall,v 1.11 2004/03/29 06:02:53 jlam Exp $
#
# Handle cases where multiple consecutive arguments must be processed
# together, either by merging the arguments or "skipping" the extra
@@ -17,17 +17,36 @@
# Merge "-Wl,R -Wl,/path/to/dir" into a single argument
# "-Wl,R/path/to/dir" and merge "-Wl,--rpath -Wl,/path/to/dir" into
# "-Wl,--rpath,/path/to/dir" so that we can look them up in the cache.
+# Also deal with "-Xlinker" being equivalent to "-Wl,".
#
--Wl,-R)
- nextarg=`$echo "X$1" | $Xsed -e "s|^-Wl,||g"`
- arg="$arg$nextarg"
- shift
- ;;
--Wl,-rpath|-Wl,-rpath-link|\
--Wl,--rpath|-Wl,--rpath-link)
- nextarg=`$echo "X$1" | $Xsed -e "s|^-Wl,||g"`
- arg="$arg,$nextarg"
- shift
+-Xlinker|-Wl,-R|-Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath|-Wl,--rpath-link)
+ R=
+ case $arg in
+ -Xlinker)
+ case $1 in
+ -Wl,-R) R="$1"; shift ;;
+ -Wl,-rpath|-Wl,-rpath-link) R="$1,"; shift ;;
+ -Wl,--rpath|-Wl,--rpath-link) R="$1,"; shift ;;
+ -Wl,*) arg="$1"; shift ;;
+ -R) R="-Wl,$1"; shift ;;
+ -rpath|-rpath-link) R="-Wl,$1,"; shift ;;
+ --rpath|--rpath-link) R="-Wl,$1,"; shift ;;
+ esac
+ ;;
+ -Wl,-R) R="$arg" ;;
+ -Wl,-rpath|-Wl,-rpath-link) R="$arg," ;;
+ -Wl,--rpath|-Wl,--rpath-link) R="$arg," ;;
+ esac
+ if $test -n "$R"; then
+ nextarg=$1; shift
+ case $nextarg in
+ -Xlinker) nextarg=$1; shift ;;
+ esac
+ case $nextarg in
+ -Wl,*) nextarg=`$echo "X$nextarg" | $Xsed -e "s|^-Wl,||g"` ;;
+ esac
+ arg="$R$nextarg"
+ fi
;;
#
# If we're linking a shared library by "cc -shared -o /srcdir/shlib",
Home |
Main Index |
Thread Index |
Old Index