Blob
1 #!/bin/sh3 extralibs=-lm4 tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"5 case "$tag" in6 *OpenBSD*) ld=gcc7 extralibs="$extralibs -lpthread"8 ;;9 *BSD*) ld=gcc ;;10 *Linux*) ld=gcc ;;11 *Darwin*) ld=gcc ;;12 *SunOS*) ld="${CC9:-cc} -g"13 extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"14 # Record paths to shared libraries to avoid needing LD_LIBRARY_PATH15 for i in "$@"16 do17 case "$i" in18 -L*)19 s=`echo $i | sed 's/-L/-R/'`20 extralibs="$extralibs $s"21 ;;22 esac23 done24 ;;25 *)26 echo do not know how to link on "$tag" 1>&227 exit 128 esac30 exec $ld -L$PLAN9/lib "$@" $extralibs