]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config.host
2009-06-09 Benjamin Kosnik <bkoz@redhat.com>
[thirdparty/gcc.git] / libgcc / config.host
CommitLineData
894a47b4 1# libgcc host-specific configuration file.
99c77e32 2# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
f2397fc4 3# 2008, 2009 Free Software Foundation, Inc.
894a47b4 4
5#This file is part of GCC.
6
7#GCC is free software; you can redistribute it and/or modify it under
8#the terms of the GNU General Public License as published by the Free
6bc9506f 9#Software Foundation; either version 3, or (at your option) any later
894a47b4 10#version.
11
12#GCC is distributed in the hope that it will be useful, but WITHOUT
13#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15#for more details.
16
17#You should have received a copy of the GNU General Public License
6bc9506f 18#along with GCC; see the file COPYING3. If not see
19#<http://www.gnu.org/licenses/>.
894a47b4 20
21# This is the libgcc host-specific configuration file
22# where a configuration type is mapped to different system-specific
23# definitions and files. This is invoked by the autoconf-generated
24# configure script. Putting it in a separate shell file lets us skip
25# running autoconf when modifying host-specific information.
26
27# This file bears an obvious resemblance to gcc/config.gcc. The cases
28# should be kept similar, to ease moving library-specific settings
29# from config.gcc to this file. That is also why tmake_file is
30# left as tmake_file, rather than hmake_file, even though this library
31# switches on ${host}.
32
33# This file switches on the shell variable ${host}, and also uses the
34# following shell variables:
35#
36# with_* Various variables as set by configure.
37
38# This file sets the following shell variables for use by the
39# autoconf-generated configure script:
40#
41# asm_hidden_op The assembler pseudo-op to use for hide
42# lists for object files implemented in
43# assembly (with -fvisibility=hidden for C).
44# The default is ".hidden".
45# cpu_type The name of the cpu, if different from the first
46# chunk of the canonical host name.
47# extra_parts List of extra object files that should be compiled
48# for this target machine. This may be overridden
49# by setting EXTRA_PARTS in a tmake_file fragment.
50# If either is set, EXTRA_PARTS and
51# EXTRA_MULTILIB_PARTS inherited from the GCC
52# subdirectory will be ignored.
53# tmake_file A list of machine-description-specific
54# makefile-fragments, if different from
55# "$cpu_type/t-$cpu_type".
56
57asm_hidden_op=.hidden
58extra_parts=
59tmake_file=
60
61# Set default cpu_type so it can be updated in each machine entry.
62cpu_type=`echo ${host} | sed 's/-.*$//'`
63case ${host} in
64m32c*-*-*)
65 cpu_type=m32c
66 ;;
67alpha*-*-*)
68 cpu_type=alpha
69 ;;
70am33_2.0-*-linux*)
71 cpu_type=mn10300
72 ;;
894a47b4 73arm*-*-*)
74 cpu_type=arm
75 ;;
38dd5584 76avr-*-*)
77 cpu_type=avr
78 ;;
894a47b4 79bfin*-*)
80 cpu_type=bfin
81 ;;
278e2fd1 82fido-*-*)
83 cpu_type=m68k
84 ;;
894a47b4 85frv*) cpu_type=frv
86 ;;
894a47b4 87i[34567]86-*-*)
88 cpu_type=i386
89 ;;
90x86_64-*-*)
91 cpu_type=i386
92 ;;
93ia64-*-*)
94 ;;
6af9f7ea 95hppa*-*-*)
894a47b4 96 cpu_type=pa
97 ;;
98m32r*-*-*)
99 cpu_type=m32r
100 ;;
894a47b4 101m68k-*-*)
102 ;;
103mips*-*-*)
104 cpu_type=mips
105 ;;
106powerpc*-*-*)
107 cpu_type=rs6000
108 ;;
109rs6000*-*-*)
110 ;;
111score*-*-*)
112 cpu_type=score
113 ;;
114sparc64*-*-*)
115 cpu_type=sparc
116 ;;
117sparc*-*-*)
118 cpu_type=sparc
119 ;;
120spu*-*-*)
121 cpu_type=spu
122 ;;
123s390*-*-*)
124 cpu_type=s390
125 ;;
126# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
127sh[123456789lbe]*-*-*)
128 cpu_type=sh
129 ;;
894a47b4 130esac
131
132# Common parts for widely ported systems.
133case ${host} in
134*-*-darwin*)
135 asm_hidden_op=.private_extern
136 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
137 ;;
138*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
139 # This is the place-holder for the generic a.out configuration
140 # of FreeBSD. No actual configuration resides here since
141 # there was only ever a bare-bones ix86 configuration for
142 # a.out and it exists solely in the machine-specific section.
143 # This place-holder must exist to avoid dropping into
144 # the generic ELF configuration of FreeBSD (i.e. it must be
145 # ordered before that section).
146 ;;
147*-*-freebsd*)
148 # This is the generic ELF configuration of FreeBSD. Later
149 # machine-specific sections may refine and add to this
150 # configuration.
151 ;;
74cd9df8 152*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
894a47b4 153 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
154 ;;
894a47b4 155*-*-netbsd*)
156 ;;
157*-*-openbsd*)
158 ;;
159*-*-rtems*)
160 ;;
161*-*-vxworks*)
162 ;;
163*-*-elf)
164 ;;
165esac
166
167case ${host} in
168# Support site-specific machine types.
169*local*)
170 rest=`echo ${host} | sed -e "s/$cpu_type-//"`
171 if test -f $srcdir/config/${cpu_type}/t-$rest
172 then tmake_file=${cpu_type}/t-$rest
173 fi
174 ;;
74cd9df8 175alpha*-*-linux* | alpha*-*-gnu*)
894a47b4 176 tmake_file="${tmake_file} alpha/t-crtfm"
cdca0ab7 177 extra_parts="$extra_parts crtfastmath.o"
894a47b4 178 ;;
894a47b4 179alpha*-*-freebsd*)
180 ;;
181alpha*-*-netbsd*)
182 ;;
183alpha*-*-openbsd*)
184 ;;
185alpha*-dec-osf[45]*)
186 ;;
187alpha64-dec-*vms*)
188 ;;
189alpha*-dec-*vms*)
190 ;;
191arc-*-elf*)
192 ;;
894a47b4 193arm-wrs-vxworks)
194 ;;
6af9f7ea 195arm*-*-freebsd*)
894a47b4 196 ;;
197arm*-*-netbsdelf*)
198 ;;
199arm*-*-netbsd*)
200 ;;
201arm*-*-linux*) # ARM GNU/Linux with ELF
202 ;;
203arm*-*-uclinux*) # ARM ucLinux
204 ;;
205arm*-*-ecos-elf)
206 ;;
207arm*-*-eabi* | arm*-*-symbianelf* )
208 ;;
209arm*-*-rtems*)
210 ;;
6af9f7ea 211arm*-*-elf)
894a47b4 212 ;;
213arm*-wince-pe*)
214 ;;
215arm-*-pe*)
216 ;;
894a47b4 217avr-*-rtems*)
218 ;;
219avr-*-*)
38dd5584 220 # Make HImode functions for AVR
221 tmake_file=${cpu_type}/t-avr
894a47b4 222 ;;
223bfin*-elf*)
224 ;;
225bfin*-uclinux*)
226 ;;
bce94ab5 227bfin*-linux-uclibc*)
228 # No need to build crtbeginT.o on uClibc systems. Should probably
229 # be moved to the OS specific section above.
230 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
231 ;;
894a47b4 232bfin*-*)
233 ;;
877d7f12 234crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
7a9b9c95 235 extra_parts="crtbegin.o crtend.o"
894a47b4 236 ;;
877d7f12 237cris-*-linux* | crisv32-*-linux*)
894a47b4 238 ;;
239crx-*-elf)
240 ;;
278e2fd1 241fido-*-elf)
242 ;;
894a47b4 243fr30-*-elf)
244 ;;
245frv-*-elf)
246 ;;
247frv-*-*linux*)
248 ;;
894a47b4 249h8300-*-rtems*)
250 ;;
251h8300-*-elf*)
252 ;;
6af9f7ea 253hppa*64*-*-linux*)
894a47b4 254 ;;
6af9f7ea 255hppa*-*-linux*)
894a47b4 256 ;;
257hppa[12]*-*-hpux10*)
258 ;;
259hppa*64*-*-hpux11*)
260 ;;
261hppa[12]*-*-hpux11*)
262 ;;
263i[34567]86-*-darwin*)
264 ;;
265x86_64-*-darwin*)
266 tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
267 ;;
268i[34567]86-*-elf*)
269 ;;
cc8ebe39 270x86_64-*-elf*)
271 ;;
894a47b4 272i[34567]86-*-freebsd*)
273 ;;
274x86_64-*-freebsd*)
275 ;;
276i[34567]86-*-netbsdelf*)
277 ;;
278i[34567]86-*-netbsd*)
279 ;;
280x86_64-*-netbsd*)
281 ;;
282i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
283 ;;
284i[34567]86-*-openbsd*)
285 ;;
74cd9df8 286i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
6d057ce8 287 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
288 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
894a47b4 289 ;;
290x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
6d057ce8 291 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
292 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
894a47b4 293 ;;
894a47b4 294i[34567]86-pc-msdosdjgpp*)
295 ;;
296i[34567]86-*-lynxos*)
297 ;;
298i[3456x]86-*-netware*)
299 case /${with_ld} in
300 */nwld)
301 tmake_file="${tmake_file} i386/t-nwld"
302 ;;
303 esac
304 ;;
305i[34567]86-*-nto-qnx*)
306 ;;
307i[34567]86-*-rtems*)
308 ;;
894a47b4 309i[34567]86-*-solaris2*)
03150a33 310 tmake_file="${tmake_file} i386/t-sol2"
311 case ${host} in
312 *-*-solaris2.1[0-9]*)
313 # Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
314 # part of the base system.
315 extra_parts="gmon.o crtbegin.o crtend.o"
316 ;;
317 *)
318 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
319 ;;
320 esac
894a47b4 321 ;;
894a47b4 322i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
323 ;;
8f433c51 324i[34567]86-*-pe)
894a47b4 325 ;;
8f433c51 326i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
9e51385b 327 extra_parts="crtbegin.o crtend.o crtfastmath.o"
328 tmake_file="i386/t-cygming i386/t-crtfm"
8f433c51 329 ;;
330x86_64-*-mingw*)
894a47b4 331 ;;
894a47b4 332i[34567]86-*-interix3*)
333 ;;
894a47b4 334ia64*-*-elf*)
75612461 335 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
336 tmake_file="ia64/t-ia64"
894a47b4 337 ;;
338ia64*-*-freebsd*)
339 ;;
340ia64*-*-linux*)
341 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
24200b28 342 tmake_file="ia64/t-ia64 t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat"
894a47b4 343 ;;
344ia64*-*-hpux*)
345 ;;
346iq2000*-*-elf*)
347 ;;
b8138586 348m32r-*-elf*|m32r-*-rtems*)
894a47b4 349 ;;
350m32rle-*-elf*)
351 ;;
352m32r-*-linux*)
353 ;;
354m32rle-*-linux*)
355 ;;
356m68hc11-*-*|m6811-*-*)
357 ;;
358m68hc12-*-*|m6812-*-*)
359 ;;
6af9f7ea 360m68k-*-elf*)
894a47b4 361 ;;
6af9f7ea 362m68k*-*-netbsdelf*)
894a47b4 363 ;;
364m68k*-*-openbsd*)
365 ;;
366m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
367 ;;
368m68k-*-linux*) # Motorola m68k's running GNU/Linux
369 # with ELF format using glibc 2
370 # aka the GNU/Linux C library 6.
371 ;;
372m68k-*-rtems*)
373 ;;
374mcore-*-elf)
375 ;;
376mcore-*-pe*)
377 ;;
378mips-sgi-irix[56]*)
379 ;;
380mips*-*-netbsd*) # NetBSD/mips, either endian.
381 ;;
382mips64*-*-linux*)
383 ;;
384mips*-*-linux*) # Linux MIPS, either endian.
385 ;;
386mips*-*-openbsd*)
387 ;;
388mipsisa32-*-elf* | mipsisa32el-*-elf*)
389 ;;
390mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
391 ;;
392mipsisa64-*-elf* | mipsisa64el-*-elf*)
393 ;;
77a32a8e 394mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
395 ;;
894a47b4 396mipsisa64sr71k-*-elf*)
397 ;;
398mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
399 ;;
400mips-*-elf* | mipsel-*-elf*)
401 ;;
402mips64-*-elf* | mips64el-*-elf*)
403 ;;
404mips64vr-*-elf* | mips64vrel-*-elf*)
405 ;;
406mips64orion-*-elf* | mips64orionel-*-elf*)
407 ;;
408mips*-*-rtems*)
409 ;;
410mips-wrs-vxworks)
411 ;;
894a47b4 412mipstx39-*-elf* | mipstx39el-*-elf*)
413 ;;
414mmix-knuth-mmixware)
415 ;;
416mn10300-*-*)
417 ;;
894a47b4 418pdp11-*-*)
419 ;;
8372e9ea 420picochip-*-*)
421 ;;
894a47b4 422powerpc-*-darwin*)
423 ;;
424powerpc64-*-darwin*)
425 ;;
426powerpc*-*-freebsd*)
427 ;;
428powerpc-*-netbsd*)
429 ;;
894a47b4 430powerpc-*-eabispe*)
431 ;;
432powerpc-*-eabisimaltivec*)
433 ;;
434powerpc-*-eabisim*)
435 ;;
436powerpc-*-elf*)
437 ;;
438powerpc-*-eabialtivec*)
439 ;;
440powerpc-*-eabi*)
441 ;;
442powerpc-*-rtems*)
443 ;;
4e5e2802 444powerpc-*-linux* | powerpc64-*-linux*)
5790f80a 445 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
894a47b4 446 ;;
4e5e2802 447powerpc64-*-gnu*)
448 tmake_file="${tmake_file} rs6000/t-ldbl128 t-softfp"
449 ;;
894a47b4 450powerpc-*-gnu-gnualtivec*)
451 tmake_file="${tmake_file} rs6000/t-ldbl128"
452 ;;
453powerpc-*-gnu*)
454 tmake_file="${tmake_file} rs6000/t-ldbl128"
455 ;;
456powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
457 ;;
894a47b4 458powerpc-*-lynxos*)
459 ;;
894a47b4 460powerpcle-*-elf*)
461 ;;
462powerpcle-*-eabisim*)
463 ;;
464powerpcle-*-eabi*)
465 ;;
894a47b4 466rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
467 ;;
468rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
469 ;;
470rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
471 ;;
472s390-*-linux*)
473 ;;
474s390x-*-linux*)
475 ;;
476s390x-ibm-tpf*)
477 ;;
478score-*-elf)
479 ;;
6af9f7ea 480sh-*-elf* | sh[12346l]*-*-elf* | \
894a47b4 481sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
ccf1c0f1 482 sh-*-linux* | sh[2346lbe]*-*-linux* | \
894a47b4 483 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
484 sh64-*-netbsd* | sh64l*-*-netbsd*)
97f1a704 485 case ${host} in
486 sh*-*-linux*)
487 tmake_file="${tmake_file} sh/t-linux"
488 ;;
489 esac
894a47b4 490 ;;
894a47b4 491sh-*-rtems*)
492 ;;
493sh-wrs-vxworks)
494 ;;
894a47b4 495sparc-*-netbsdelf*)
496 ;;
497sparc64-*-openbsd*)
498 ;;
499sparc-*-elf*)
500 ;;
501sparc-*-linux*) # SPARC's running GNU/Linux, libc6
502 extra_parts="$extra_parts crtfastmath.o"
503 tmake_file="${tmake_file} sparc/t-crtfm"
504 ;;
505sparc-*-rtems*)
506 ;;
507sparc64-*-solaris2* | sparcv9-*-solaris2*)
508 ;;
509sparc-*-solaris2*)
510 ;;
894a47b4 511sparc64-*-elf*)
512 ;;
723e1902 513sparc-wrs-vxworks)
514 ;;
894a47b4 515sparc64-*-freebsd*|ultrasparc-*-freebsd*)
516 ;;
517sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
518 extra_parts="$extra_parts crtfastmath.o"
519 tmake_file="${tmake_file} sparc/t-crtfm"
520 ;;
521sparc64-*-netbsd*)
522 ;;
523spu-*-elf*)
524 ;;
894a47b4 525v850e1-*-*)
526 ;;
527v850e-*-*)
528 ;;
529v850-*-*)
530 ;;
894a47b4 531vax-*-netbsdelf*)
532 ;;
533vax-*-netbsd*)
534 ;;
535vax-*-openbsd*)
536 ;;
894a47b4 537xstormy16-*-elf)
538 ;;
75c7ffbc 539xtensa*-*-elf*)
894a47b4 540 ;;
75c7ffbc 541xtensa*-*-linux*)
894a47b4 542 ;;
543am33_2.0-*-linux*)
544 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
545 ;;
7eac0a4e 546m32c-*-elf*|m32c-*-rtems*)
894a47b4 547 ;;
548*)
549 echo "*** Configuration ${host} not supported" 1>&2
550 exit 1
551 ;;
552esac
e4cbe54f 553
554case ${host} in
1eab96a6 555i[34567]86-*-linux* | x86_64-*-linux* | \
556 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
557 i[34567]86-*-gnu*)
e4cbe54f 558 tmake_file="${tmake_file} t-tls"
559 ;;
560esac
b3fd46a0 561
562case ${host} in
563i[34567]86-*-darwin* | x86_64-*-darwin* | \
09ec66c8 564 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
6471e33b 565 i[34567]86-*-linux* | x86_64-*-linux* | \
566 i[34567]86-*-cygwin*)
144633f4 567 if test "${host_address}" = 32; then
f2b540ae 568 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"
144633f4 569 fi
570 ;;
571esac
572
573case ${host} in
574i[34567]86-*-linux* | x86_64-*-linux*)
575 # Provide backward binary compatibility for 64bit Linux/x86.
576 if test "${host_address}" = 64; then
577 tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"
578 fi
b3fd46a0 579 ;;
580esac