| 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 |
| 4 | # information. |
| 5 | |
| 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 | |
| 12 | HDEFINES= |
| 13 | HOSTING_CRT0=/lib/crt0.o |
| 14 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc' |
| 15 | NATIVE_LIB_DIRS= |
| 16 | |
| 17 | case "${host}" in |
| 18 | |
| 19 | alpha*-*-linux*) |
| 20 | HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`' |
| 21 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -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; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`' |
| 22 | ;; |
| 23 | |
| 24 | alpha*-*-*) |
| 25 | HOSTING_CRT0=/usr/ccs/lib/crt0.o |
| 26 | NATIVE_LIB_DIRS=/usr/ccs/lib |
| 27 | ;; |
| 28 | |
| 29 | i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]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. |
| 34 | NATIVE_LIB_DIRS=/lib |
| 35 | HOSTING_CRT0=/usr/lib/crt0.o |
| 36 | ;; |
| 37 | |
| 38 | i[3456]86-*-sysv4*) |
| 39 | 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`' |
| 40 | 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' |
| 41 | NATIVE_LIB_DIRS=/usr/ccs/lib |
| 42 | ;; |
| 43 | |
| 44 | i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*) |
| 45 | HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' |
| 46 | 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`' |
| 47 | ;; |
| 48 | |
| 49 | i[3456]86-*-sysv*) |
| 50 | HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`' |
| 51 | 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' |
| 52 | ;; |
| 53 | |
| 54 | i[3456]86-*-solaris*) |
| 55 | 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`' |
| 56 | 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`' |
| 57 | NATIVE_LIB_DIRS=/usr/ccs/lib |
| 58 | ;; |
| 59 | |
| 60 | i[3456]86-*-sco* | i[3456]86-*-isc*) |
| 61 | # In some configurations gcc does not use crtbegin.o and crtend.o. |
| 62 | # In that case gcc -print-file-name=crtbegin.o will simply print |
| 63 | # crtbegin.o. We create dummy crtbegin.o and crtend.o files to |
| 64 | # handle this. |
| 65 | echo "int dummy_crtbegin () { return 0; }" > crtbegin.c |
| 66 | ${CC} -c crtbegin.c -o crtbegin.o |
| 67 | rm -f crtbegin.c |
| 68 | echo "int dummy_crteng () { return 0; }" > crtend.c |
| 69 | ${CC} -c crtend.c -o crtend.o |
| 70 | rm -f crtend.c |
| 71 | HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' |
| 72 | 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' |
| 73 | ;; |
| 74 | |
| 75 | i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld) |
| 76 | HOSTING_CRT0=/usr/lib/crt0.o |
| 77 | ;; |
| 78 | |
| 79 | i[3456]86-*-linux*libc1*) |
| 80 | 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`' |
| 81 | 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' |
| 82 | ;; |
| 83 | |
| 84 | i[3456]86-*-linux*) |
| 85 | HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`' |
| 86 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -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; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`' |
| 87 | ;; |
| 88 | |
| 89 | i[3456]86-*-lynxos*) |
| 90 | HOSTING_CRT0=/lib/init1.o |
| 91 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' |
| 92 | ;; |
| 93 | |
| 94 | mips*-dec-bsd*) |
| 95 | HOSTING_CRT0=/usr/lib/crt0.o |
| 96 | ;; |
| 97 | |
| 98 | mips*-sgi-irix4*) |
| 99 | HOSTING_CRT0=/usr/lib/crt1.o |
| 100 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' |
| 101 | ;; |
| 102 | |
| 103 | mips*-sgi-irix[56]*) |
| 104 | HOSTING_CRT0=/usr/lib/crt1.o |
| 105 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' |
| 106 | ;; |
| 107 | |
| 108 | m68*-*-linux*aout*) |
| 109 | HOSTING_CRT0=/usr/lib/crt0.o |
| 110 | ;; |
| 111 | |
| 112 | m68*-*-linux*libc1*) |
| 113 | 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`' |
| 114 | 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' |
| 115 | ;; |
| 116 | |
| 117 | m68*-*-linux*) |
| 118 | HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=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/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o' |
| 120 | ;; |
| 121 | |
| 122 | m68*-*-lynxos*) |
| 123 | HOSTING_CRT0=/lib/init1.o |
| 124 | HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o' |
| 125 | ;; |
| 126 | |
| 127 | m68*-motorola-sysv) |
| 128 | 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`' |
| 129 | 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`' |
| 130 | ;; |
| 131 | |
| 132 | m68*-sun-*) |
| 133 | HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o' |
| 134 | ;; |
| 135 | |
| 136 | m88*-*-dgux*) |
| 137 | HDEFINES=-D__using_DGUX |
| 138 | HOSTING_CRT0='/lib/crt0.o -X' |
| 139 | HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a |
| 140 | ;; |
| 141 | |
| 142 | m88*-motorola-sysv3) |
| 143 | HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`' |
| 144 | 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`' |
| 145 | ;; |
| 146 | |
| 147 | romp-*-*) |
| 148 | HDEFINES=-DNO_VARARGS |
| 149 | ;; |
| 150 | |
| 151 | sparc*-*-solaris2*) |
| 152 | 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`' |
| 153 | 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`' |
| 154 | NATIVE_LIB_DIRS=/usr/ccs/lib |
| 155 | ;; |
| 156 | |
| 157 | esac |