Commit | Line | Data |
---|---|---|
85f483a2 | 1 | # hints/irix_6.sh |
e8c10df3 SH |
2 | # |
3 | # original from Krishna Sethuraman, krishna@sgi.com | |
4 | # | |
5 | # Updated Mon Jul 22 14:52:25 EDT 1996 | |
6 | # Andy Dougherty <doughera@lafcol.lafayette.edu> | |
7 | # with help from Dean Roehrich <roehrich@cray.com>. | |
8 | # cc -n32 update info from Krishna Sethuraman, krishna@sgi.com. | |
9 | # additional update from Scott Henry, scotth@sgi.com | |
f4cb4c40 | 10 | |
85f483a2 SH |
11 | # Futzed with by John Stoffel <jfs@fluent.com> on 4/24/1997 |
12 | # - assumes 'cc -n32' by default | |
13 | # - tries to check for various compiler versions and do the right | |
14 | # thing when it can | |
15 | # - warnings turned off (-n32 messages): | |
16 | # 1116 - non-void function should return a value | |
17 | # 1048 - cast between pointer-to-object and pointer-to-function | |
18 | # 1042 - operand types are incompatible | |
19 | ||
e8c10df3 SH |
20 | # Use sh Configure -Dcc='cc -n32' to try compiling with -n32. |
21 | # or -Dcc='cc -n32 -mips3' (or -mips4) to force (non)portability | |
22 | # Don't bother with -n32 unless you have the 7.1 or later compilers. | |
23 | # But there's no quick and light-weight way to check in 6.2. | |
f4cb4c40 | 24 | |
85f483a2 SH |
25 | # Let's assume we want to use 'cc -n32' by default |
26 | case "$cc" in | |
27 | '') | |
28 | cc='cc -n32' | |
29 | ;; | |
30 | esac | |
31 | ||
32 | # Check for which compiler we're using | |
33 | ||
e8c10df3 SH |
34 | case "$cc" in |
35 | *"cc -n32"*) | |
85f483a2 SH |
36 | |
37 | # Check for which version of the compiler we're running | |
38 | case "`$cc -version 2>&1`" in | |
39 | *7.0*) # Mongoose 7.0 | |
40 | ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1042,1048,1110,1116,1184 -OPT:Olimit=0" | |
41 | optimize='none' | |
42 | ;; | |
43 | *7.*) # Mongoose 7.1+ | |
44 | ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0" | |
45 | optimize='-O3' | |
46 | ;; | |
47 | *6.2*) # Ragnarok 6.2 | |
48 | ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184" | |
49 | optimize='none' | |
50 | ;; | |
51 | *) # Be safe and not optimize | |
e8c10df3 | 52 | ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0" |
85f483a2 SH |
53 | optimize='none' |
54 | ;; | |
55 | esac | |
56 | ||
57 | ld=ld | |
e8c10df3 SH |
58 | ldflags=' -L/usr/local/lib -L/usr/lib32 -L/lib32' |
59 | cccdlflags=' ' | |
60 | lddlflags="-n32 -shared" | |
61 | libc='/usr/lib32/libc.so' | |
62 | plibpth='/usr/lib32 /lib32 /usr/ccs/lib' | |
63 | nm_opt='-p' | |
64 | nm_so_opt='-p' | |
65 | ;; | |
66 | *) | |
67 | # this is needed to force the old-32 paths | |
68 | # since the system default can be changed. | |
85f483a2 SH |
69 | ccflags="$ccflags -32 -D_BSD_TYPES -D_BSD_TIME -Olimit 3100" |
70 | optimize='-O' | |
e8c10df3 SH |
71 | ;; |
72 | esac | |
c43fed53 | 73 | |
85f483a2 | 74 | # This should be a Configure thing, but not for now... |
e8c10df3 | 75 | pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' |
16d20bd9 AD |
76 | |
77 | # We don't want these libraries. Anyone know why? | |
ecfc5424 | 78 | set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'` |
f4cb4c40 AD |
79 | shift |
80 | libswanted="$*" | |
e8c10df3 SH |
81 | |
82 | # I have conflicting reports about the sun, crypt, bsd, and PW | |
83 | # libraries on Irix 6.2. | |
84 | # | |
85 | # One user rerports: | |
86 | # Don't need sun crypt bsd PW under 6.2. You *may* need to link | |
87 | # with these if you want to run perl built under 6.2 on a 5.3 machine | |
88 | # (I haven't checked) | |
ecfc5424 | 89 | # |
e8c10df3 SH |
90 | # Another user reported that if he included those libraries, a large number |
91 | # of the tests failed (approx. 20-25) and he would get a core dump. To | |
92 | # make things worse, test results were inconsistent, i.e., some of the | |
93 | # tests would pass some times and fail at other times. | |
94 | # The safest thing to do seems to be to eliminate them. | |
95 | # | |
96 | # Actually, the only libs that you want are '-lm'. Everything else | |
97 | # you need is in libc. You do also need '-lbsd' if you choose not | |
98 | # to use the -D_BSD_* defines. Note that as of 6.2 the only | |
99 | # difference between '-lmalloc' and '-lc' malloc is the debugging | |
100 | # and control calls. -- scotth@sgi.com | |
f4cb4c40 | 101 | |
e8c10df3 SH |
102 | set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' -e 's/ PW / /'` |
103 | shift | |
104 | libswanted="$*" |