summaryrefslogtreecommitdiff
path: root/src/cmd/INIT/cc.sgi.mips3
blob: 426317ac0e154094bae4ea696e094a96669d192c (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
: sgi.mips3 cc wrapper that generates mips3 binaries : 2007-04-27 :

HOSTTYPE=sgi.mips3

case " $* " in
*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
esac

# ld:
#	  15
#	  84
#	  85
#	 134
# cc:
#	1685 (first!!) Invalid error number: X.
#	1035 cpp #error -- 0 exit status by default - botch botch botch
#	1048
#	1155
#	1171 The indicated expression has no effect.
#	1184 "=" is used where where "==" may have been intended.
#	1209 The controlling expression is constant.
#	1343
#	3169 X not marked as intrinsic because it is not yet declared
#	3170 X not marked as intrinsic because it is not yet declared
#	3421 expecting function name #pragma intrinsic (X)
#	3433 X not marked as intrinsic because it is not yet declared
#	3434 X not marked as intrinsic because it is not yet declared

cc=/usr/bin/cc
debug=
dynamic=-G0
flags=-OPT:Olimit=0
fatal=1035
ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3421,3433,3434
ldignore=15,84,85,13
optimize=

case $_AST_cc_OPTIONS in
?*)	eval $_AST_cc_OPTIONS ;;
esac
case $fatal in
?*)	fatal="-diag_error $fatal" ;;
esac
case $ignore in
?*)	ignore="-woff $ignore" ;;
esac
case $ldignore in
?*)	ifs=$IFS
	IFS=,
	v=$ldignore
	ldignore=
	for i in $v
	do	ldignore="$ldignore -Wl,-woff,$i"
	done
	IFS=$ifs
	;;
esac
case $debug in
?*)	integer n=0
	for i
	do	case $i in
		-g*)	case $debug in
			-)	continue ;;
			esac
			i=$debug
			;;
		esac
		a[n++]=$i
	done
	set -- ${a[@]}
	;;
esac
case $optimize in
?*)	integer n=0
	for i
	do	case $i in
		-O*)	case $optimize in
			-)	continue ;;
			esac
			i=$optimize
			;;
		esac
		a[n++]=$i
	done
	set -- ${a[@]}
	;;
esac

case $1 in
-mips2)	if	test -d /usr/lib32
	then	LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@"
	else	$cc -mips2 $flags $ignore "$@"
	fi
	;;
-mips4)	case " $* " in
	*" -ldl "*)
		integer n=0
		for i
		do	case $i in
			-ldl)	;;
			*)	a[n++]=$i ;;
			esac
		done
		set -- ${a[@]}
	esac
	$cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@"
	;;
*)	$cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@"
	;;
esac