configure.host revision 33965
133965Sjdp# This is the linker host specific file. This is invoked by the 233965Sjdp# autoconf generated configure script. Putting it in a separate shell 333965Sjdp# file lets us skip running autoconf when modifying host specific 433965Sjdp# information. 533965Sjdp 633965Sjdp# This file sets the following shell variables: 733965Sjdp# HDEFINES host specific compiler flags 833965Sjdp# HOSTING_CRT0 crt0.o file used for bootstrapping 933965Sjdp# HOSTING_LIBS libraries used for bootstrapping 1033965Sjdp# NATIVE_LIB_DIRS library directories to search on this host 1133965Sjdp# HLDFLAGS link flags to use on this host 1233965Sjdp# HLDENV environment variable to set when linking for the host 1333965Sjdp# RPATH_ENVVAR environment variable used to find shared libraries 1433965Sjdp 1533965SjdpHDEFINES= 1633965SjdpHOSTING_CRT0=/lib/crt0.o 1733965SjdpHOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc' 1833965SjdpNATIVE_LIB_DIRS= 1933965Sjdp 2033965Sjdpcase "${host}" in 2133965Sjdp 2233965Sjdpalpha-*-linux*) 2333965Sjdp HOSTING_CRT0=/usr/lib/crt0.o 2433965Sjdp ;; 2533965Sjdp 2633965Sjdpalpha-*-*) 2733965Sjdp HOSTING_CRT0=/usr/ccs/lib/crt0.o 2833965Sjdp NATIVE_LIB_DIRS=/usr/ccs/lib 2933965Sjdp ;; 3033965Sjdp 3133965Sjdpi[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*) 3233965Sjdp # The new BSD `make' has a bug: it doesn't pass empty arguments in 3333965Sjdp # shell commands. So we need to make this value non-empty in order 3433965Sjdp # for the genscripts.sh call to work. There's nothing magic about 3533965Sjdp # the value `/lib'; it's just a dummy. 3633965Sjdp NATIVE_LIB_DIRS=/lib 3733965Sjdp HOSTING_CRT0=/usr/lib/crt0.o 3833965Sjdp ;; 3933965Sjdp 4033965Sjdpi[3456]86-*-sysv4*) 4133965Sjdp 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-file-name=crtbegin.o; fi`' 4233965Sjdp 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-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o' 4333965Sjdp NATIVE_LIB_DIRS=/usr/ccs/lib 4433965Sjdp ;; 4533965Sjdp 4633965Sjdpi[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*) 4733965Sjdp HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' 4833965Sjdp 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-file-name=crtend.o; fi`' 4933965Sjdp ;; 5033965Sjdp 5133965Sjdpi[3456]86-*-sysv*) 5233965Sjdp HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`' 5333965Sjdp 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' 5433965Sjdp ;; 5533965Sjdp 5633965Sjdpi[3456]86-*-solaris*) 5733965Sjdp HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' 5833965Sjdp 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-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-file-name=crtn.o; fi`' 5933965Sjdp NATIVE_LIB_DIRS=/usr/ccs/lib 6033965Sjdp ;; 6133965Sjdp 6233965Sjdpi[3456]86-*-sco* | i[3456]86-*-isc*) 6333965Sjdp # In some configurations gcc does not use crtbegin.o and crtend.o. 6433965Sjdp # In that case gcc -print-file-name=crtbegin.o will simply print 6533965Sjdp # crtbegin.o. We create dummy crtbegin.o and crtend.o files to 6633965Sjdp # handle this. 6733965Sjdp echo "int dummy_crtbegin () { return 0; }" > crtbegin.c 6833965Sjdp ${CC} -c crtbegin.c -o crtbegin.o 6933965Sjdp rm -f crtbegin.c 7033965Sjdp echo "int dummy_crteng () { return 0; }" > crtend.c 7133965Sjdp ${CC} -c crtend.c -o crtend.o 7233965Sjdp rm -f crtend.c 7333965Sjdp HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' 7433965Sjdp 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-file-name=crtend.o; fi` /lib/crtn.o' 7533965Sjdp ;; 7633965Sjdp 7733965Sjdpi[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld) 7833965Sjdp HOSTING_CRT0=/usr/lib/crt0.o 7933965Sjdp ;; 8033965Sjdp 8133965Sjdpi[3456]86-*-linux*) 8233965Sjdp HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`' 8333965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o' 8433965Sjdp ;; 8533965Sjdp 8633965Sjdpi[3456]86-*-lynxos*) 8733965Sjdp HOSTING_CRT0=/lib/init1.o 8833965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' 8933965Sjdp ;; 9033965Sjdp 9133965Sjdpmips*-dec-bsd*) 9233965Sjdp HOSTING_CRT0=/usr/lib/crt0.o 9333965Sjdp ;; 9433965Sjdp 9533965Sjdpmips*-sgi-irix4*) 9633965Sjdp HOSTING_CRT0=/usr/lib/crt1.o 9733965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' 9833965Sjdp ;; 9933965Sjdp 10033965Sjdpmips*-sgi-irix[56]*) 10133965Sjdp HOSTING_CRT0=/usr/lib/crt1.o 10233965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' 10333965Sjdp ;; 10433965Sjdp 10533965Sjdpm68*-*-linux*aout*) 10633965Sjdp HOSTING_CRT0=/usr/lib/crt0.o 10733965Sjdp ;; 10833965Sjdp 10933965Sjdpm68*-*-linux*) 11033965Sjdp HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`' 11133965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o' 11233965Sjdp ;; 11333965Sjdp 11433965Sjdpm68*-*-lynxos*) 11533965Sjdp HOSTING_CRT0=/lib/init1.o 11633965Sjdp HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' 11733965Sjdp ;; 11833965Sjdp 11933965Sjdpm68*-motorola-sysv) 12033965Sjdp 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`' 12133965Sjdp 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`' 12233965Sjdp ;; 12333965Sjdp 12433965Sjdpm68*-sun-*) 12533965Sjdp HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o' 12633965Sjdp ;; 12733965Sjdp 12833965Sjdpm88*-*-dgux*) 12933965Sjdp HDEFINES=-D__using_DGUX 13033965Sjdp HOSTING_CRT0='/lib/crt0.o -X' 13133965Sjdp HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a 13233965Sjdp ;; 13333965Sjdp 13433965Sjdpm88*-motorola-sysv3) 13533965Sjdp HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' 13633965Sjdp 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-file-name=crtend.o; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi`' 13733965Sjdp ;; 13833965Sjdp 13933965Sjdpromp-*-*) 14033965Sjdp HDEFINES=-DNO_VARARGS 14133965Sjdp ;; 14233965Sjdp 14333965Sjdpsparc*-*-solaris2*) 14433965Sjdp HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' 14533965Sjdp 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-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-file-name=crtn.o; fi`' 14633965Sjdp NATIVE_LIB_DIRS=/usr/ccs/lib 14733965Sjdp ;; 14833965Sjdp 14933965Sjdpesac 15033965Sjdp 15133965SjdpHLDFLAGS= 15233965SjdpHLDENV= 15333965SjdpRPATH_ENVVAR=LD_LIBRARY_PATH 15433965Sjdp# If we have shared libraries, try to set rpath reasonably. 15533965Sjdpif test "${shared}" = "true"; then 15633965Sjdp case "${host}" in 15733965Sjdp *-*-hpux*) 15833965Sjdp HLDFLAGS='-Wl,+s,+b,$(libdir)' 15933965Sjdp RPATH_ENVVAR=SHLIB_PATH 16033965Sjdp ;; 16133965Sjdp *-*-irix[56]*) 16233965Sjdp HLDFLAGS='-Wl,-rpath,$(libdir)' 16333965Sjdp ;; 16433965Sjdp *-*-linux*aout*) 16533965Sjdp ;; 16633965Sjdp *-*-linux*) 16733965Sjdp HLDFLAGS='-Wl,-rpath,$(libdir)' 16833965Sjdp ;; 16933965Sjdp *-*-solaris*) 17033965Sjdp HLDFLAGS='-R $(libdir)' 17133965Sjdp ;; 17233965Sjdp *-*-sysv4*) 17333965Sjdp HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' 17433965Sjdp ;; 17533965Sjdp esac 17633965Sjdpfi 17733965Sjdp 17833965Sjdp# On SunOS, if the linker supports the -rpath option, use it to 17933965Sjdp# prevent ../bfd and ../opcodes from being included in the run time 18033965Sjdp# search path. 18133965Sjdpcase "${host}" in 18233965Sjdp *-*-sunos*) 18333965Sjdp echo 'main () { }' > conftest.c 18433965Sjdp ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t 18533965Sjdp if grep 'unrecognized' conftest.t >/dev/null 2>&1; then 18633965Sjdp : 18733965Sjdp elif grep 'No such file' conftest.t >/dev/null 2>&1; then 18833965Sjdp : 18933965Sjdp elif grep 'do not mix' conftest.t >/dev/null 2>&1; then 19033965Sjdp : 19133965Sjdp elif test "${shared}" = "true"; then 19233965Sjdp HLDFLAGS='-Wl,-rpath=$(libdir)' 19333965Sjdp else 19433965Sjdp HLDFLAGS='-Wl,-rpath=' 19533965Sjdp fi 19633965Sjdp rm -f conftest.t conftest.c conftest 19733965Sjdp ;; 19833965Sjdpesac 199