1: lynxos.ppc cc wrapper with -mshared default : 2005-06-01 : 2 3HOSTTYPE=lynxos.ppc 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/ppc "$@" 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 -mshared) 37 static=n 38 continue 39 ;; 40 -l*) case $static in 41 0) static=n 42 set . -L/lib/shlib "$@" 43 shift 44 ;; 45 esac 46 ;; 47 -[cE]) link=0 48 ;; 49 esac 50 x=$1 51 shift 52 set . "$@" "$x" 53done 54while : 55do case $1 in 56 /../) shift 57 break 58 ;; 59 -l*) case $static in 60 0) static=n 61 set . -L/lib/shlib "$@" 62 shift 63 ;; 64 esac 65 ;; 66 -[cE]) link=0 67 ;; 68 esac 69 x=$1 70 shift 71 set . "$@" "$x" 72 shift 73done 74case $link:$static in 751:0) static=n ;; 76esac 77case $static in 78n) specs=/tmp/cc$$.specs 79 trap 'status=$?; rm -f $specs; exit $status' 0 1 2 80 echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs 81 $cc -specs=$specs -mshared "$@" 82 ;; 83*) $cc "$@" 84 ;; 85esac 86