Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / binutils / ld / configure.host
CommitLineData
984263bc 1# $FreeBSD: src/contrib/binutils/ld/configure.host,v 1.1.1.2.6.4 2002/09/01 23:44:13 obrien Exp $
1de703da 2# $DragonFly: src/contrib/binutils/ld/Attic/configure.host,v 1.2 2003/06/17 04:23:58 dillon Exp $
984263bc
MD
3
4
5# This is the linker host specific file. This is invoked by the
6# autoconf generated configure script. Putting it in a separate shell
7# file lets us skip running autoconf when modifying host specific
8# information.
9
10# This file sets the following shell variables:
11# HDEFINES host specific compiler flags
12# HOSTING_CRT0 crt0.o file used for bootstrapping
13# HOSTING_LIBS libraries used for bootstrapping
14# NATIVE_LIB_DIRS library directories to search on this host
15
16HDEFINES=
17HOSTING_CRT0=/lib/crt0.o
18HOSTING_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`'
19NATIVE_LIB_DIRS=
20
21#
22# Generic configurations:
23#
24
25case "${host}" in
26
27*-*-freebsd*)
28 NATIVE_LIB_DIRS=/usr/lib
29 # Older versions of gcc do not use a specs file. In those cases,
30 # gcc -print-file-name=specs will simply print specs. We create a
31 # dummy specs files to handle this.
32 echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
33 HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
34 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`'
35 ;;
36
37*-*-linux*aout* | *-*-linux*oldld)
38 HOSTING_CRT0=/usr/lib/crt0.o
39 ;;
40
41*-*-linux*libc1*)
42 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`'
43 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'
44 ;;
45
46*-*-linux*)
47 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`'
48 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`'
49 ;;
50
51esac
52
53#
54# Now more specific configurations
55#
56
57case "${host}" in
58
59*-*-linux*aout* | *-*-linux*oldld | *-*-linux*libc1*)
60 # No further tweaking needed
61 ;;
62
63alpha*-*-netbsd*)
64 # The new BSD `make' has a bug: it doesn't pass empty arguments in
65 # shell commands. So we need to make this value non-empty in order
66 # for the genscripts.sh call to work. There's nothing magic about
67 # the value `/lib'; it's just a dummy.
68 NATIVE_LIB_DIRS=/lib
69 HOSTING_CRT0=/usr/lib/crt0.o
70 ;;
71
72arm*-*-linux-gnu*)
73 HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"`
74 ;;
75
76i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*)
77 # The new BSD `make' has a bug: it doesn't pass empty arguments in
78 # shell commands. So we need to make this value non-empty in order
79 # for the genscripts.sh call to work. There's nothing magic about
80 # the value `/lib'; it's just a dummy.
81 NATIVE_LIB_DIRS=/lib
82 HOSTING_CRT0=/usr/lib/crt0.o
83 ;;
84
85i[3456]86-*-sysv4*)
86 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`'
87 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'
88 NATIVE_LIB_DIRS=/usr/ccs/lib
89 ;;
90
91i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*)
92 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
93 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
94 ;;
95
96i[3456]86-*-sysv*)
97 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
98 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
99 ;;
100
101i[3456]86-*-solaris*)
102 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`'
103 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`'
104 NATIVE_LIB_DIRS=/usr/ccs/lib
105 ;;
106
107i[3456]86-*-sco* | i[3456]86-*-isc*)
108 # In some configurations gcc does not use crtbegin.o and crtend.o.
109 # In that case gcc -print-file-name=crtbegin.o will simply print
110 # crtbegin.o. We create dummy crtbegin.o and crtend.o files to
111 # handle this.
112 echo "int dummy_crtbegin () { return 0; }" > crtbegin.c
113 ${CC} -c crtbegin.c -o crtbegin.o
114 rm -f crtbegin.c
115 echo "int dummy_crteng () { return 0; }" > crtend.c
116 ${CC} -c crtend.c -o crtend.o
117 rm -f crtend.c
118 HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
119 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'
120 ;;
121
122i[3456]86-*-lynxos*)
123 HOSTING_CRT0=/lib/init1.o
124 HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
125 ;;
126
127i[3456]86-pc-interix*)
128 HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
129 NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/'
130 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'
131 ;;
132
133i[3456]86-*-cygwin*)
134 HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
135 ;;
136
137ia64-*-linux-gnu*)
138 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
139 ;;
140
141ia64-*-aix*)
142 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`'
143 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`'
144 NATIVE_LIB_DIRS=/usr/lib/ia64l64
145 ;;
146
147mips*-dec-bsd*)
148 HOSTING_CRT0=/usr/lib/crt0.o
149 ;;
150
151mips*-sgi-irix4* | mips*-sgi-irix5*)
152 HOSTING_CRT0=/usr/lib/crt1.o
153 HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o'
154 ;;
155
156mips*-sgi-irix6*)
157 HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`'
158 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'
159 ;;
160
161mips*-*-linux-gnu*)
162 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
163 ;;
164
165m68*-*-linux-gnu*)
166 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
167 ;;
168
169m68*-*-lynxos*)
170 HOSTING_CRT0=/lib/init1.o
171 HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
172 ;;
173
174m68*-motorola-sysv)
175 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`'
176 HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"`
177 ;;
178
179m68*-sun-*)
180 HOSTING_CRT0='/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o'
181 ;;
182
183m88*-*-dgux*)
184 HDEFINES=-D__using_DGUX
185 HOSTING_CRT0='/lib/crt0.o -X'
186 HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
187 ;;
188
189m88*-motorola-sysv3)
190 HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
191 HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
192 ;;
193
194powerpc*-*-linux-gnu*)
195 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
196 ;;
197
198s390x-*-linux-gnu*)
199 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
200 ;;
201
202s390-*-linux-gnu*)
203 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
204 ;;
205
206sparc*-*-solaris2*)
207 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`'
208 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`'
209 NATIVE_LIB_DIRS=/usr/ccs/lib
210 ;;
211
212sparc-*-linux-gnu*)
213 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"`
214 ;;
215
216sparc64-*-linux-gnu*)
217 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
218 ;;
219
220x86_64-*-linux-gnu*)
221 HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
222 ;;
223
224*-*-freebsd*)
225 ;;
226
227*-*-linux*)
228 ;;
229
230*-*-netbsd*)
231 NATIVE_LIB_DIRS=/usr/lib
232 # NetBSD typically does not use the GCC crtstuff, so ignore it.
233 HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
234 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'
235 ;;
236
237alpha*-*-*)
238 HOSTING_CRT0=/usr/ccs/lib/crt0.o
239 NATIVE_LIB_DIRS=/usr/ccs/lib
240 ;;
241
242romp-*-*)
243 HDEFINES=-DNO_VARARGS
244 ;;
245
246esac