mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
use -Wl,-rpath for gcc
This commit is contained in:
parent
a0d2173ce4
commit
54bcb7e9a2
1 changed files with 15 additions and 1 deletions
16
bin/9l
16
bin/9l
|
@ -186,7 +186,7 @@ case "$tag" in
|
||||||
ld="${CC9:-cc} -g"
|
ld="${CC9:-cc} -g"
|
||||||
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
|
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
|
||||||
# Record paths to shared libraries to avoid needing LD_LIBRARY_PATH
|
# Record paths to shared libraries to avoid needing LD_LIBRARY_PATH
|
||||||
for i in "$@"
|
for i in "$libsl $@"
|
||||||
do
|
do
|
||||||
case "$i" in
|
case "$i" in
|
||||||
-L*)
|
-L*)
|
||||||
|
@ -201,6 +201,20 @@ case "$tag" in
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$ld" in
|
||||||
|
gcc)
|
||||||
|
for i in "$libsl $@"
|
||||||
|
do
|
||||||
|
case "$i" in
|
||||||
|
-L*)
|
||||||
|
s=`echo $i | sed 's/-L/-Wl,-rpath,/'`
|
||||||
|
extralibs="$extralibs $s"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if $verbose
|
if $verbose
|
||||||
then
|
then
|
||||||
echo $ld -L$PLAN9/lib "$@" $libsl $extralibs
|
echo $ld -L$PLAN9/lib "$@" $libsl $extralibs
|
||||||
|
|
Loading…
Reference in a new issue