* Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
[deliverable/binutils-gdb.git] / ld / configure.host
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
11 HDEFINES=
12 HOSTING_CRT0=/lib/crt0.o
13 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo $libgcc -lc $libgcc`'
14
15 #
16 # Generic configurations:
17 #
18
19 case "${host}" in
20
21 *-*-freebsd*)
22 # Older versions of gcc do not use a specs file. In those cases,
23 # gcc -print-file-name=specs will simply print specs. We create a
24 # dummy specs files to handle this.
25 echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
26 HOSTING_CRT0='-dynamic-linker `${CC} --print-prog-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
27 HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
28 ;;
29
30 *-*-linux*aout* | *-*-linux*oldld)
31 HOSTING_CRT0=/usr/lib/crt0.o
32 ;;
33
34 *-*-linux*libc1*)
35 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 ${CC} --print-file-name=crtbegin.o; fi`'
36 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
37 ;;
38
39 *-*-linux*)
40 HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
41 HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
42 ;;
43
44 esac
45
46 #
47 # Now more specific configurations
48 #
49
50 case "${host}" in
51
52 *-*-linux*aout* | *-*-linux*oldld | *-*-linux*libc1*)
53 # No further tweaking needed
54 ;;
55
56 alpha*-*-netbsd*)
57 HOSTING_CRT0=/usr/lib/crt0.o
58 ;;
59
60 arm*-*-linux-gnu*)
61 HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"`
62 ;;
63
64 hppa*64*-*-hpux11*)
65 HOSTING_CRT0=/usr/ccs/lib/pa20_64/crt0.o
66 # Even if CC is not gcc, the tests use gcc.
67 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a'
68 ;;
69
70 i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*)
71 HOSTING_CRT0=/usr/lib/crt0.o
72 ;;
73
74 i[3456]86-*-sysv4*)
75 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 ${CC} -print-file-name=crtbegin.o; fi`'
76 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o'
77 ;;
78
79 i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*)
80 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
81 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
82 ;;
83
84 i[3456]86-*-sysv*)
85 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
86 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
87 ;;
88
89 i[3456]86-*-solaris*)
90 HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
91 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
92 ;;
93
94 i[3456]86-*-sco* | i[3456]86-*-isc*)
95 # In some configurations gcc does not use crtbegin.o and crtend.o.
96 # In that case gcc -print-file-name=crtbegin.o will simply print
97 # crtbegin.o. We create dummy crtbegin.o and crtend.o files to
98 # handle this.
99 echo "int dummy_crtbegin () { return 0; }" > crtbegin.c
100 ${CC} -c crtbegin.c -o crtbegin.o
101 rm -f crtbegin.c
102 echo "int dummy_crteng () { return 0; }" > crtend.c
103 ${CC} -c crtend.c -o crtend.o
104 rm -f crtend.c
105 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
106 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
107 ;;
108
109 i[3456]86-*-lynxos*)
110 HOSTING_CRT0=/lib/init1.o
111 HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
112 ;;
113
114 i[3456]86-pc-interix*)
115 HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
116 HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
117 ;;
118
119 i[3456]86-*-cygwin*)
120 HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
121 ;;
122
123 ia64-*-linux-gnu*)
124 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
125 ;;
126
127 ia64-*-aix*)
128 HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
129 HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
130 ;;
131
132 mips*-dec-bsd*)
133 HOSTING_CRT0=/usr/lib/crt0.o
134 ;;
135
136 mips*-sgi-irix4* | mips*-sgi-irix5*)
137 HOSTING_CRT0=/usr/lib/crt1.o
138 HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o'
139 ;;
140
141 mips*-sgi-irix6*)
142 HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`'
143 HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
144 ;;
145
146 mips*-*-linux-gnu*)
147 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
148 ;;
149
150 m68*-*-linux-gnu*)
151 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
152 ;;
153
154 m68*-*-lynxos*)
155 HOSTING_CRT0=/lib/init1.o
156 HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
157 ;;
158
159 m68*-motorola-sysv)
160 HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
161 HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"`
162 ;;
163
164 m68*-sun-*)
165 HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o'
166 ;;
167
168 m88*-*-dgux*)
169 HDEFINES=-D__using_DGUX
170 HOSTING_CRT0='/lib/crt0.o -X'
171 HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
172 ;;
173
174 m88*-motorola-sysv3)
175 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
176 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
177 ;;
178
179 powerpc64*-*-linux-gnu*)
180 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld64.so.1,"`
181 ;;
182
183 powerpc*-*-linux-gnu*)
184 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
185 ;;
186
187 s390x-*-linux-gnu*)
188 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
189 ;;
190
191 s390-*-linux-gnu*)
192 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
193 ;;
194
195 sparc*-*-solaris2*)
196 HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
197 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
198 ;;
199
200 sparc-*-linux-gnu*)
201 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"`
202 ;;
203
204 sparc64-*-linux-gnu*)
205 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
206 ;;
207
208 x86_64-*-linux-gnu*)
209 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
210 ;;
211
212 *-*-freebsd*)
213 ;;
214
215 *-*-linux*)
216 ;;
217
218 *-*-netbsd*)
219 # NetBSD typically does not use the GCC crtstuff, so ignore it.
220 HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
221 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o'
222 ;;
223
224 alpha*-*-*)
225 HOSTING_CRT0=/usr/ccs/lib/crt0.o
226 ;;
227
228 esac
This page took 0.035763 seconds and 5 git commands to generate.