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 # HDEFINES host specific compiler flags
8 # HOSTING_CRT0 crt0.o file used for bootstrapping
9 # HOSTING_LIBS libraries used for bootstrapping
10 # NATIVE_LIB_DIRS library directories to search on this host
11 # HLDFLAGS link flags to use on this host
12 # RPATH_ENVVAR environment variable used to find shared libraries
15 HOSTING_CRT0=/lib/crt0.o
16 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc'
22 HOSTING_CRT0=/usr/lib/crt0.o
26 HOSTING_CRT0=/usr/ccs/lib/crt0.o
27 NATIVE_LIB_DIRS=/usr/ccs/lib
30 i[345]86-*-bsd* | i[345]86-*-freebsd* | i[345]86-*-netbsd*)
31 # The new BSD `make' has a bug: it doesn't pass empty arguments in
32 # shell commands. So we need to make this value non-empty in order
33 # for the genscripts.sh call to work. There's nothing magic about
34 # the value `/lib'; it's just a dummy.
36 HOSTING_CRT0=/usr/lib/crt0.o
40 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`'
41 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'
42 NATIVE_LIB_DIRS=/usr/ccs/lib
45 i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
46 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`'
47 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`'
51 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
52 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'
56 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`'
57 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`'
58 NATIVE_LIB_DIRS=/usr/ccs/lib
61 i[345]86-*-sco* | i[345]86-*-isc*)
62 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`'
63 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'
66 i[345]86-*-linuxaout* | i[345]86-*-linuxoldld)
67 HOSTING_CRT0=/usr/lib/crt0.o
71 HOSTING_CRT0='/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o'
72 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'
76 HOSTING_CRT0=/lib/init1.o
77 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
81 HOSTING_CRT0=/usr/lib/crt0.o
85 HOSTING_CRT0=/usr/lib/crt1.o
86 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
90 HOSTING_CRT0=/usr/lib/crt1.o
91 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
95 HOSTING_CRT0=/lib/init1.o
96 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
100 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`'
101 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`'
105 HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o'
109 HDEFINES=-D__using_DGUX
110 HOSTING_CRT0=/lib/crt0.o -X
111 HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
115 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`'
116 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`'
120 HDEFINES=-DNO_VARARGS
124 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`'
125 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`'
126 NATIVE_LIB_DIRS=/usr/ccs/lib
132 RPATH_ENVVAR=LD_LIBRARY_PATH
133 # If we have shared libraries, try to set rpath reasonably.
134 if test "${shared}" = "true"; then
137 HLDFLAGS='-Wl,+s,+b,$(libdir)'
138 RPATH_ENVVAR=SHLIB_PATH
141 HLDFLAGS='-Wl,-rpath,$(libdir)'
146 HLDFLAGS='-Wl,-rpath,$(libdir)'
148 *-*-sysv4* | *-*-solaris*)
149 HLDFLAGS='-R $(libdir)'
154 # On SunOS, if the linker supports the -rpath option, use it to
155 # prevent ../bfd and ../opcodes from being included in the run time
159 echo 'main () { }' > conftest.c
160 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
161 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
163 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
165 elif test "${shared}" = "true"; then
166 HLDFLAGS='-Wl,-rpath=$(libdir)'
168 HLDFLAGS='-Wl,-rpath='
170 rm -f conftest.t conftest.c conftest