1 # This is the linker host specific file. This is invoked by the
2 # autoconf generated configure script. Putting it in a separate shell
3 # file lets us skip running autoconf when modifying host specific
6 # This file sets the following shell variables:
7 # CC compiler to use (only if needed and not already set)
8 # HDEFINES host specific compiler flags
9 # HOSTING_CRT0 crt0.o file used for bootstrapping
10 # HOSTING_LIBS libraries used for bootstrapping
11 # NATIVE_LIB_DIRS library directories to search on this host
14 HOSTING_CRT0=/lib/crt0.o
15 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc'
21 HOSTING_CRT0=/usr/lib/crt0.o
25 HOSTING_CRT0=/usr/ccs/lib/crt0.o
26 NATIVE_LIB_DIRS=/usr/ccs/lib
29 i[345]86-*-bsd* | i[345]86-*-freebsd* | i[345]86-*-netbsd*)
30 # The new BSD `make' has a bug: it doesn't pass empty arguments in
31 # shell commands. So we need to make this value non-empty in order
32 # for the genscripts.sh call to work. There's nothing magic about
33 # the value `/lib'; it's just a dummy.
35 HOSTING_CRT0=/usr/lib/crt0.o
39 test -z "${CC}" && CC="i386-go32-gcc -O2 -fno-omit-frame-pointer -Wl,-S"
43 HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
44 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` /usr/ccs/lib/crtn.o'
45 NATIVE_LIB_DIRS=/usr/ccs/lib
48 i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
49 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
50 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi`'
54 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
55 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
59 HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crt1.o/'; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crti.o/'; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
60 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtn.o/'; fi`'
61 NATIVE_LIB_DIRS=/usr/ccs/lib
64 i[345]86-*-sco* | i[345]86-*-isc*)
65 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
66 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` /lib/crtn.o'
69 i[345]86-*-linuxaout* | i[345]86-*-linuxoldld)
70 HOSTING_CRT0=/usr/lib/crt0.o
74 HOSTING_CRT0='/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o'
75 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtend.o /usr/lib/crtn.o'
79 HOSTING_CRT0=/lib/init1.o
80 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
84 HOSTING_CRT0=/usr/lib/crt0.o
88 HOSTING_CRT0=/usr/lib/crt1.o
89 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
93 HOSTING_CRT0=/usr/lib/crt1.o
94 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
98 HOSTING_CRT0=/lib/init1.o
99 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
103 HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`gcc -print-file-name=\`crt0.o ]; then echo \`gcc -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
104 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc881 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi`'
108 HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o'
112 HDEFINES=-D__using_DGUX
113 HOSTING_CRT0=/lib/crt0.o -X
114 HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
118 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
119 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi`'
123 HDEFINES=-DNO_VARARGS
128 HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crt1.o/'; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crti.o/'; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`'
129 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtn.o/'; fi`'
130 NATIVE_LIB_DIRS=/usr/ccs/lib
136 # If we have shared libraries, try to set rpath reasonably.
137 if test "${shared}" = "true"; then
140 HLDFLAGS='-Wl,-rpath,$(libdir)'
145 HLDFLAGS='-Wl,-rpath,$(libdir)'
147 *-*-sysv4* | *-*-solaris*)
148 HLDFLAGS='-R $(libdir)'
153 # On SunOS, if the linker supports the -rpath option, use it to
154 # prevent ../bfd and ../opcodes from being included in the run time
158 echo 'main () { }' > conftest.c
159 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
160 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
162 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
164 elif test "${shared}" = "true"; then
165 HLDFLAGS='-Wl,-rpath=$(libdir)'
167 HLDFLAGS='-Wl,-rpath='
169 rm -f conftest.t conftest.c conftest