diff options
author | Jeff Sickel <jas@corpus-callosum.com> | 2008-12-03 01:52:55 -0600 |
---|---|---|
committer | Jeff Sickel <jas@corpus-callosum.com> | 2008-12-03 01:52:55 -0600 |
commit | d210f09d229babf26ea356a8fcc34b2daaf83652 (patch) | |
tree | 0a3e1fdcb1bfc656d780ff646b589f8e79ff42c5 /bin/9l | |
parent | 41305b23558a51c5a6fa33bc7476df1ed6221667 (diff) | |
download | plan9port-d210f09d229babf26ea356a8fcc34b2daaf83652.tar.gz plan9port-d210f09d229babf26ea356a8fcc34b2daaf83652.tar.bz2 plan9port-d210f09d229babf26ea356a8fcc34b2daaf83652.zip |
9l: search for autolibs in all -L paths as well as $PLAN9/lib
Diffstat (limited to 'bin/9l')
-rwxr-xr-x | bin/9l | 30 |
1 files changed, 22 insertions, 8 deletions
@@ -27,16 +27,25 @@ fi if $doautolib then ofiles="" + lpaths="$PLAN9/lib" for i do case "$i" in *.[ao]) ofiles="$ofiles $i" ;; + -L*) + l=`echo $i | sed 's/-L//'` + lpaths="$lpaths $l" esac done - # echo "ofiles $ofiles" + if $verbose + then + echo "ofiles $ofiles" + echo "lpaths $lpaths" + fi + autolibs="" if [ "x$ofiles" != "x" ] then @@ -68,13 +77,18 @@ then # can't trust the libraries about using # libthread or libdraw - we might not be linking with # those object files. - a=` - nm $PLAN9/lib/lib$i.a 2>/dev/null | - grep '__p9l_autolib_[a-zA-Z0-9+-]*$' | - sed 's/.*__p9l_autolib_//' | - sort -u | - egrep -v '^(thread|draw)$' - ` + a="" + for lpath in $lpaths + do + b=` + nm $lpath/lib$i.a 2>/dev/null | + grep '__p9l_autolib_[a-zA-Z0-9+-]*$' | + sed 's/.*__p9l_autolib_//' | + sort -u | + egrep -v '^(thread|draw)$' + ` + a="$a $b" + done # fix up libraries that really need draw if [ "x$i" = "xmemdraw" -o "x$i" = "xmemlayer" -o "x$i" = "xframe" ] then |