1: lynxos.i386 cc wrapper with -dynamic default : 2005-02-14 : 2 3HOSTTYPE=lynxos.i386 4 5case " $* " in 6*" -dumpmachine "*) echo $HOSTTYPE; exit ;; 7esac 8 9cc=gcc 10 11link=1 12static=0 13set . "$@" /../ 14while : 15do shift 16 case $1 in 17 /../) break ;; 18 esac 19 case $1 in 20 *.[cChHiI]|*.[cChHiI][pPxX][pPxX]) 21 set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/x86 "$@" 22 shift 23 break 24 ;; 25 -o) case $2 in 26 /../) ;; 27 *) x=$1 28 shift 29 set . "$@" "$x" 30 shift 31 ;; 32 esac 33 ;; 34 -static)static=1 35 ;; 36 -l*) case $static in 37 0) static=n 38 set . -L/lib/shlib "$@" 39 shift 40 ;; 41 esac 42 ;; 43 -[cE]) link=0 44 ;; 45 esac 46 x=$1 47 shift 48 set . "$@" "$x" 49done 50while : 51do case $1 in 52 /../) shift 53 break 54 ;; 55 -l*) case $static in 56 0) static=n 57 set . -L/lib/shlib "$@" 58 shift 59 ;; 60 esac 61 ;; 62 -[cE]) link=0 63 ;; 64 esac 65 x=$1 66 shift 67 set . "$@" "$x" 68 shift 69done 70case $link:$static in 711:0) static=n ;; 72esac 73case $static in 74n) specs=/tmp/cc$$.specs 75 trap 'status=$?; rm -f $specs; exit $status' 0 1 2 76 echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs 77 $cc -specs=$specs "$@" 78 ;; 79*) $cc "$@" 80 ;; 81esac 82