mirror of
https://github.com/0intro/wmii
synced 2024-11-22 05:42:05 +03:00
32 lines
451 B
Plaintext
32 lines
451 B
Plaintext
|
#!/bin/sh -f
|
||
|
|
||
|
outfile="$1"; shift
|
||
|
|
||
|
# Derived from Russ Cox's 9l in plan9port.
|
||
|
ofiles=""
|
||
|
args=""
|
||
|
for i
|
||
|
do
|
||
|
case "$i" in
|
||
|
*.[ao])
|
||
|
ofiles="$ofiles $i"
|
||
|
;;
|
||
|
*)
|
||
|
args="$args $i"
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
xtmp=/tmp/ld.$$.$USER.out
|
||
|
|
||
|
echo LD ${BASE}$outfile
|
||
|
$LD -o $outfile $ofiles $LDFLAGS $args >$xtmp 2>&1
|
||
|
status=$?
|
||
|
|
||
|
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
|
||
|
egrep -v 'is almost always misused|is dangerous, better use'
|
||
|
rm -f $xtmp
|
||
|
|
||
|
exit $status
|
||
|
|