File: link

package info (click to toggle)
libixp 0.5-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 608 kB
  • sloc: ansic: 4,857; sh: 96; makefile: 75
file content (34 lines) | stat: -rwxr-xr-x 693 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh -f

outfile="$1"; shift
bin="$(echo $0 | sed 's,/[^/]*$,,')"

# Derived from Russ Cox's 9l in plan9port.
ofiles=""
args=""
for i
do
	case "$i" in
	*.[ao]|*.o_pic)
		ofiles="$ofiles $i"
		;;
	*)
		args="$args $i"
		;;
	esac
done

xtmp=/tmp/ld.$$.$USER.out

echo LD "$($bin/cleanname ${BASE}$outfile)"
[ -n "$noisycc" ] && echo $LD -o $outfile $ofiles $LDFLAGS $args
$LD -o $outfile $ofiles $LDFLAGS $args >$xtmp 2>&1
status=$?
[ $? -eq 0 ] || $LD -o $outfile $ofiles $LDFLAGS $args >&2

sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . | 
egrep -v 'is almost always misused|is dangerous, better use|in statically linked applications requires at runtime'
rm -f $xtmp

exit $status