config.gcc (x86_64-*-kfreebsd*-gnu): Use i386/kfreebsd-gnu.h.
[gcc.git] / gcc / config.gcc
1 # GCC target-specific configuration file.
2 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3 # 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
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
9 #Software Foundation; either version 3, or (at your option) any later
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
18 #along with GCC; see the file COPYING3. If not see
19 #<http://www.gnu.org/licenses/>.
20
21 # This is the GCC target-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 target-specific information.
26
27 # When you change the cases in the OS or target switches, consider
28 # updating ../libgcc/config.host also.
29
30 # This file switches on the shell variable ${target}, and also uses the
31 # following shell variables:
32 #
33 # with_* Various variables as set by configure.
34 #
35 # enable_threads Either the name, yes or no depending on whether
36 # threads support was requested.
37 #
38 # default_use_cxa_atexit
39 # The default value for the $enable___cxa_atexit
40 # variable. enable___cxa_atexit needs to be set to
41 # "yes" for the correct operation of C++ destructors
42 # but it relies upon the presence of a non-standard C
43 # library function called __cxa_atexit.
44 # Since not all C libraries provide __cxa_atexit the
45 # default value of $default_use_cxa_atexit is set to
46 # "no" except for targets which are known to be OK.
47 #
48 # default_gnu_indirect_function
49 # The default value for the $enable_gnu_indirect_function
50 # variable. enable_gnu_indirect_function relies
51 # upon the presence of a non-standard gnu ifunc support
52 # in the assembler, linker and dynamic linker.
53 # Since not all libraries provide the dynamic linking
54 # support, the default value of
55 # $default_gnu_indirect_function is set to
56 # "no" except for targets which are known to be OK.
57 #
58 # gas_flag Either yes or no depending on whether GNU as was
59 # requested.
60 #
61 # gnu_ld_flag Either yes or no depending on whether GNU ld was
62 # requested.
63
64 # This file sets the following shell variables for use by the
65 # autoconf-generated configure script:
66 #
67 # cpu_type The name of the cpu, if different from the first
68 # chunk of the canonical target name.
69 #
70 # tm_defines List of target macros to define for all compilations.
71 #
72 # tm_file A list of target macro files, if different from
73 # "$cpu_type/$cpu_type.h". Usually it's constructed
74 # per target in a way like this:
75 # tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
76 # Note that the preferred order is:
77 # - specific target header "${cpu_type}/${cpu_type.h}"
78 # - generic headers like dbxelf.h elfos.h, etc.
79 # - specializing target headers like ${cpu_type.h}/elf.h
80 # This helps to keep OS specific stuff out of the CPU
81 # defining header ${cpu_type}/${cpu_type.h}.
82 #
83 # It is possible to include automatically-generated
84 # build-directory files by prefixing them with "./".
85 # All other files should relative to $srcdir/config.
86 #
87 # tm_p_file Location of file with declarations for functions
88 # in $out_file.
89 #
90 # out_file The name of the machine description C support
91 # file, if different from "$cpu_type/$cpu_type.c".
92 #
93 # md_file The name of the machine-description file, if
94 # different from "$cpu_type/$cpu_type.md".
95 #
96 # tmake_file A list of machine-description-specific
97 # makefile-fragments, if different from
98 # "$cpu_type/t-$cpu_type".
99 #
100 # extra_modes The name of the file containing a list of extra
101 # machine modes, if necessary and different from
102 # "$cpu_type/$cpu_type-modes.def".
103 #
104 # extra_objs List of extra objects that should be linked into
105 # the compiler proper (cc1, cc1obj, cc1plus)
106 # depending on target.
107 #
108 # extra_gcc_objs List of extra objects that should be linked into
109 # the compiler driver (gcc) depending on target.
110 #
111 # extra_headers List of used header files from the directory
112 # config/${cpu_type}.
113 #
114 # user_headers_inc_next_pre
115 # List of header file names of internal gcc header
116 # files, which should be prefixed by an include_next.
117 # user_headers_inc_next_post
118 # List of header file names of internal gcc header
119 # files, which should be postfixed by an include_next.
120 # use_gcc_tgmath If set, add tgmath.h to the list of used header
121 # files.
122 #
123 # use_gcc_stdint If "wrap", install a version of stdint.h that
124 # wraps the system's copy for hosted compilations;
125 # if "provide", provide a version of systems without
126 # such a system header; otherwise "none", do not
127 # provide such a header at all.
128 #
129 # extra_passes List of extra executables compiled for this target
130 # machine, used for compiling from source to object.
131 #
132 # extra_parts List of extra object files that should be compiled
133 # for this target machine.
134 #
135 # extra_programs Like extra_passes, but these are used when linking.
136 #
137 # extra_options List of target-dependent .opt files.
138 #
139 # c_target_objs List of extra target-dependent objects that be
140 # linked into the C compiler only.
141 #
142 # cxx_target_objs List of extra target-dependent objects that be
143 # linked into the C++ compiler only.
144 #
145 # fortran_target_objs List of extra target-dependent objects that be
146 # linked into the fortran compiler only.
147 #
148 # target_gtfiles List of extra source files with type information.
149 #
150 # xm_defines List of macros to define when compiling for the
151 # target machine.
152 #
153 # xm_file List of files to include when compiling for the
154 # target machine.
155 #
156 # use_collect2 Set to yes or no, depending on whether collect2
157 # will be used.
158 #
159 # target_cpu_default Set to override the default target model.
160 #
161 # gdb_needs_out_file_path
162 # Set to yes if gdb needs a dir command with
163 # `dirname $out_file`.
164 #
165 # thread_file Set to control which thread package to use.
166 #
167 # gas Set to yes or no depending on whether the target
168 # system normally uses GNU as.
169 #
170 # need_64bit_hwint Set to yes if HOST_WIDE_INT must be 64 bits wide
171 # for this target. This is true if this target
172 # supports "long" or "wchar_t" wider than 32 bits,
173 # or BITS_PER_WORD is wider than 32 bits.
174 # The setting made here must match the one made in
175 # other locations such as libcpp/configure.ac
176 #
177 # configure_default_options
178 # Set to an initializer for configure_default_options
179 # in configargs.h, based on --with-cpu et cetera.
180
181 # The following variables are used in each case-construct to build up the
182 # outgoing variables:
183 #
184 # gnu_ld Set to yes or no depending on whether the target
185 # system normally uses GNU ld.
186 #
187 # target_has_targetcm Set to yes or no depending on whether the target
188 # has its own definition of targetcm.
189
190 out_file=
191 tmake_file=
192 extra_headers=
193 user_headers_inc_next_pre=
194 user_headers_inc_next_post=
195 use_gcc_tgmath=yes
196 use_gcc_stdint=none
197 extra_passes=
198 extra_parts=
199 extra_programs=
200 extra_objs=
201 extra_gcc_objs=
202 extra_options=
203 c_target_objs=
204 cxx_target_objs=
205 fortran_target_objs=
206 target_has_targetcm=no
207 tm_defines=
208 xm_defines=
209 # Set this to force installation and use of collect2.
210 use_collect2=
211 # Set this to override the default target model.
212 target_cpu_default=
213 # Set this if gdb needs a dir command with `dirname $out_file`
214 gdb_needs_out_file_path=
215 # Set this to control which thread package will be used.
216 thread_file=
217 # Reinitialize these from the flag values every loop pass, since some
218 # configure entries modify them.
219 gas="$gas_flag"
220 gnu_ld="$gnu_ld_flag"
221 default_use_cxa_atexit=no
222 default_gnu_indirect_function=no
223 target_gtfiles=
224 need_64bit_hwint=
225 need_64bit_isa=
226
227 # Don't carry these over build->host->target. Please.
228 xm_file=
229 md_file=
230
231 # Obsolete configurations.
232 case ${target} in
233 i[34567]86-*-interix3* \
234 | score-* \
235 | *-*-solaris2.8* \
236 )
237 if test "x$enable_obsolete" != xyes; then
238 echo "*** Configuration ${target} is obsolete." >&2
239 echo "*** Specify --enable-obsolete to build it anyway." >&2
240 echo "*** Support will be REMOVED in the next major release of GCC," >&2
241 echo "*** unless a maintainer comes forward." >&2
242 exit 1
243 fi;;
244 esac
245
246 # Unsupported targets list. Do not put an entry in this list unless
247 # it would otherwise be caught by a more permissive pattern. The list
248 # should be in alphabetical order.
249 case ${target} in
250 i[34567]86-go32-* \
251 | i[34567]86-*-go32* \
252 | m68k-*-uclinuxoldabi* \
253 | mips64orion*-*-rtems* \
254 | pdp11-*-bsd \
255 | sparc-hal-solaris2* \
256 | thumb-*-* \
257 | *-*-freebsd[12] | *-*-freebsd[12].* \
258 | *-*-freebsd*aout* \
259 | *-*-linux*aout* \
260 | *-*-linux*coff* \
261 | *-*-linux*libc1* \
262 | *-*-linux*oldld* \
263 | *-*-rtemsaout* \
264 | *-*-rtemscoff* \
265 | *-*-solaris2.[0-7] \
266 | *-*-solaris2.[0-7].* \
267 | *-*-sysv* \
268 | vax-*-vms* \
269 )
270 echo "*** Configuration ${target} not supported" 1>&2
271 exit 1
272 ;;
273 esac
274
275 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
276 # updated in each machine entry. Also set default extra_headers for some
277 # machines.
278 tm_p_file=
279 cpu_type=`echo ${target} | sed 's/-.*$//'`
280 cpu_is_64bit=
281 case ${target} in
282 m32c*-*-*)
283 cpu_type=m32c
284 tmake_file=m32c/t-m32c
285 ;;
286 alpha*-*-*)
287 cpu_type=alpha
288 need_64bit_hwint=yes
289 extra_options="${extra_options} g.opt"
290 ;;
291 am33_2.0-*-linux*)
292 cpu_type=mn10300
293 ;;
294 arm*-*-*)
295 cpu_type=arm
296 extra_headers="mmintrin.h arm_neon.h"
297 c_target_objs="arm-c.o"
298 cxx_target_objs="arm-c.o"
299 extra_options="${extra_options} arm/arm-tables.opt"
300 ;;
301 avr-*-*)
302 cpu_type=avr
303 c_target_objs="avr-c.o"
304 cxx_target_objs="avr-c.o"
305 ;;
306 bfin*-*)
307 cpu_type=bfin
308 ;;
309 crisv32-*)
310 cpu_type=cris
311 ;;
312 frv*) cpu_type=frv
313 extra_options="${extra_options} g.opt"
314 ;;
315 moxie*) cpu_type=moxie
316 ;;
317 fido-*-*)
318 cpu_type=m68k
319 extra_headers=math-68881.h
320 ;;
321 i[34567]86-*-*)
322 cpu_type=i386
323 c_target_objs="i386-c.o"
324 cxx_target_objs="i386-c.o"
325 extra_options="${extra_options} fused-madd.opt"
326 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
327 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
328 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
329 immintrin.h x86intrin.h avxintrin.h xopintrin.h
330 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
331 abmintrin.h bmiintrin.h tbmintrin.h"
332 ;;
333 x86_64-*-*)
334 cpu_type=i386
335 c_target_objs="i386-c.o"
336 cxx_target_objs="i386-c.o"
337 extra_options="${extra_options} fused-madd.opt"
338 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
339 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
340 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
341 immintrin.h x86intrin.h avxintrin.h xopintrin.h
342 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
343 abmintrin.h bmiintrin.h tbmintrin.h"
344 need_64bit_hwint=yes
345 ;;
346 ia64-*-*)
347 extra_headers=ia64intrin.h
348 need_64bit_hwint=yes
349 extra_options="${extra_options} g.opt fused-madd.opt"
350 ;;
351 hppa*-*-*)
352 cpu_type=pa
353 ;;
354 lm32*)
355 extra_options="${extra_options} g.opt"
356 ;;
357 m32r*-*-*)
358 cpu_type=m32r
359 extra_options="${extra_options} g.opt"
360 ;;
361 m68k-*-*)
362 extra_headers=math-68881.h
363 ;;
364 microblaze*-*-*)
365 cpu_type=microblaze
366 extra_options="${extra_options} g.opt"
367 ;;
368 mips*-*-*)
369 cpu_type=mips
370 need_64bit_hwint=yes
371 extra_headers="loongson.h"
372 extra_options="${extra_options} g.opt"
373 ;;
374 picochip-*-*)
375 cpu_type=picochip
376 ;;
377 powerpc*-*-*)
378 cpu_type=rs6000
379 extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
380 need_64bit_hwint=yes
381 case x$with_cpu in
382 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64)
383 cpu_is_64bit=yes
384 ;;
385 esac
386 extra_options="${extra_options} g.opt fused-madd.opt"
387 ;;
388 rs6000*-*-*)
389 need_64bit_hwint=yes
390 extra_options="${extra_options} g.opt fused-madd.opt"
391 ;;
392 score*-*-*)
393 cpu_type=score
394 extra_options="${extra_options} g.opt"
395 ;;
396 sparc*-*-*)
397 cpu_type=sparc
398 need_64bit_hwint=yes
399 ;;
400 spu*-*-*)
401 cpu_type=spu
402 need_64bit_hwint=yes
403 ;;
404 s390*-*-*)
405 cpu_type=s390
406 need_64bit_hwint=yes
407 extra_options="${extra_options} fused-madd.opt"
408 ;;
409 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
410 sh[123456789lbe]*-*-* | sh-*-*)
411 cpu_type=sh
412 need_64bit_hwint=yes
413 ;;
414 xtensa*-*-*)
415 extra_options="${extra_options} fused-madd.opt"
416 ;;
417 esac
418
419 tm_file=${cpu_type}/${cpu_type}.h
420 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
421 then
422 tm_p_file=${cpu_type}/${cpu_type}-protos.h
423 fi
424 extra_modes=
425 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
426 then
427 extra_modes=${cpu_type}/${cpu_type}-modes.def
428 fi
429 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
430 then
431 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
432 fi
433
434 case ${target} in
435 i[34567]86-*-*)
436 if test "x$enable_cld" = xyes; then
437 tm_defines="${tm_defines} USE_IX86_CLD=1"
438 fi
439 if test "x$enable_frame_pointer" = xyes; then
440 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
441 fi
442 tm_file="vxworks-dummy.h ${tm_file}"
443 ;;
444 x86_64-*-*)
445 tm_file="i386/biarch64.h ${tm_file}"
446 if test "x$enable_cld" = xyes; then
447 tm_defines="${tm_defines} USE_IX86_CLD=1"
448 fi
449 if test "x$enable_frame_pointer" = xyes; then
450 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
451 fi
452 tm_file="vxworks-dummy.h ${tm_file}"
453 ;;
454 esac
455
456 # On a.out targets, we need to use collect2.
457 case ${target} in
458 *-*-*aout*)
459 use_collect2=yes
460 ;;
461 esac
462
463 # Common C libraries.
464 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
465
466 # Common parts for widely ported systems.
467 case ${target} in
468 *-*-darwin*)
469 tmake_file="t-darwin ${cpu_type}/t-darwin"
470 tm_file="${tm_file} darwin.h"
471 case ${target} in
472 *-*-darwin9*)
473 tm_file="${tm_file} darwin9.h"
474 ;;
475 *-*-darwin[12][0-9]*)
476 tm_file="${tm_file} darwin9.h darwin10.h"
477 ;;
478 esac
479 tm_file="${tm_file} ${cpu_type}/darwin.h"
480 tm_p_file="${tm_p_file} darwin-protos.h"
481 target_gtfiles="\$(srcdir)/config/darwin.c"
482 extra_options="${extra_options} darwin.opt"
483 c_target_objs="${c_target_objs} darwin-c.o"
484 cxx_target_objs="${cxx_target_objs} darwin-c.o"
485 fortran_target_objs="darwin-f.o"
486 target_has_targetcm=yes
487 extra_objs="darwin.o"
488 extra_gcc_objs="darwin-driver.o"
489 default_use_cxa_atexit=yes
490 use_gcc_stdint=wrap
491 case ${enable_threads} in
492 "" | yes | posix) thread_file='posix' ;;
493 esac
494 ;;
495 *-*-freebsd*)
496 # This is the generic ELF configuration of FreeBSD. Later
497 # machine-specific sections may refine and add to this
498 # configuration.
499 #
500 # Due to tm_file entry ordering issues that vary between cpu
501 # architectures, we only define fbsd_tm_file to allow the
502 # machine-specific section to dictate the final order of all
503 # entries of tm_file with the minor exception that components
504 # of the tm_file set here will always be of the form:
505 #
506 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
507 #
508 # The machine-specific section should not tamper with this
509 # ordering but may order all other entries of tm_file as it
510 # pleases around the provided core setting.
511 gas=yes
512 gnu_ld=yes
513 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
514 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
515 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
516 tmake_file="t-slibgcc-elf-ver t-freebsd"
517 case ${enable_threads} in
518 no)
519 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
520 ;;
521 "" | yes | posix)
522 thread_file='posix'
523 tmake_file="${tmake_file} t-freebsd-thread"
524 # Before 5.0, FreeBSD can't bind shared libraries to -lc
525 # when "optionally" threaded via weak pthread_* checks.
526 case ${target} in
527 *-*-freebsd[34] | *-*-freebsd[34].*)
528 tmake_file="${tmake_file} t-slibgcc-nolc-override"
529 ;;
530 esac
531 ;;
532 *)
533 echo 'Unknown thread configuration for FreeBSD'
534 exit 1
535 ;;
536 esac
537 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
538 extra_options="$extra_options rpath.opt freebsd.opt"
539 case ${target} in
540 *-*-freebsd[345].*)
541 :;;
542 *)
543 default_use_cxa_atexit=yes;;
544 esac
545 # need_64bit_hwint=yes # system compiler has this for all arch!
546 use_gcc_stdint=wrap
547 ;;
548 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
549 extra_options="$extra_options gnu-user.opt"
550 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
551 gas=yes
552 gnu_ld=yes
553 case ${enable_threads} in
554 "" | yes | posix) thread_file='posix' ;;
555 esac
556 tmake_file="t-slibgcc-elf-ver t-linux"
557 case $target in
558 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
559 :;;
560 *-*-gnu*)
561 tmake_file="$tmake_file t-gnu";;
562 esac
563 # glibc / uclibc / bionic switch.
564 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
565 case $target in
566 *linux*)
567 extra_options="$extra_options linux.opt";;
568 *)
569 tm_defines="$tm_defines SINGLE_LIBC";;
570 esac
571 case $target in
572 *-*-*android*)
573 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
574 ;;
575 *-*-*uclibc*)
576 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
577 ;;
578 *)
579 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
580 ;;
581 esac
582 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
583 # is provided.
584 default_use_cxa_atexit=yes
585 use_gcc_tgmath=no
586 use_gcc_stdint=wrap
587 # Add Android userspace support to Linux targets.
588 case $target in
589 *linux*)
590 tm_file="$tm_file linux-android.h"
591 extra_options="$extra_options linux-android.opt"
592 ;;
593 esac
594 # Enable compilation for Android by default for *android* targets.
595 case $target in
596 *-*-*android*)
597 tm_defines="$tm_defines ANDROID_DEFAULT=1"
598 ;;
599 *)
600 tm_defines="$tm_defines ANDROID_DEFAULT=0"
601 ;;
602 esac
603 ;;
604 *-*-netbsd*)
605 tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
606 gas=yes
607 gnu_ld=yes
608
609 # NetBSD 2.0 and later get POSIX threads enabled by default.
610 # Allow them to be explicitly enabled on any other version.
611 case ${enable_threads} in
612 "")
613 case ${target} in
614 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
615 thread_file='posix'
616 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
617 ;;
618 esac
619 ;;
620 yes | posix)
621 thread_file='posix'
622 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
623 ;;
624 esac
625
626 # NetBSD 1.7 and later are set up to use GCC's crtstuff for
627 # ELF configurations. We will clear extra_parts in the
628 # a.out configurations.
629 case ${target} in
630 *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
631 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
632 ;;
633 esac
634
635 # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
636 # default (unless overridden by --disable-__cxa_atexit).
637 case ${target} in
638 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
639 default_use_cxa_atexit=yes
640 ;;
641 esac
642 ;;
643 *-*-openbsd*)
644 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
645 case ${enable_threads} in
646 yes)
647 thread_file='posix'
648 tmake_file="${tmake_file} t-openbsd-thread"
649 ;;
650 esac
651 case ${target} in
652 *-*-openbsd2.*|*-*-openbsd3.[012])
653 tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
654 esac
655 ;;
656 *-*-rtems*)
657 case ${enable_threads} in
658 yes) thread_file='rtems' ;;
659 esac
660 extra_options="${extra_options} rtems.opt"
661 use_gcc_stdint=wrap
662 ;;
663 *-*-uclinux*)
664 extra_options="$extra_options gnu-user.opt"
665 use_gcc_stdint=wrap
666 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
667 ;;
668 *-*-solaris2*)
669 extra_options="${extra_options} sol2.opt"
670 ;;
671 *-*-vxworks*)
672 tmake_file=t-vxworks
673 xm_defines=POSIX
674 extra_options="${extra_options} vxworks.opt"
675 extra_objs=vxworks.o
676 case ${enable_threads} in
677 no) ;;
678 "" | yes | vxworks) thread_file='vxworks' ;;
679 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
680 esac
681 ;;
682 *-*-elf)
683 # Assume that newlib is being used and so __cxa_atexit is provided.
684 default_use_cxa_atexit=yes
685 use_gcc_stdint=wrap
686 ;;
687 esac
688
689 case ${target} in
690 # Support site-specific machine types.
691 *local*)
692 rest=`echo ${target} | sed -e "s/$cpu_type-//"`
693 tm_file=${cpu_type}/$rest.h
694 if test -f $srcdir/config/${cpu_type}/xm-$rest.h
695 then xm_file=${cpu_type}/xm-$rest.h
696 fi
697 if test -f $srcdir/config/${cpu_type}/t-$rest
698 then tmake_file=${cpu_type}/t-$rest
699 fi
700 ;;
701 alpha*-*-linux*)
702 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
703 extra_options="${extra_options} alpha/elf.opt"
704 target_cpu_default="MASK_GAS"
705 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
706 ;;
707 alpha*-*-freebsd*)
708 tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
709 extra_options="${extra_options} alpha/elf.opt"
710 target_cpu_default="MASK_GAS"
711 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
712 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
713 ;;
714 alpha*-*-netbsd*)
715 tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
716 extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
717 alpha/elf.opt"
718 target_cpu_default="MASK_GAS"
719 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
720 ;;
721 alpha*-*-openbsd*)
722 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
723 tm_file="alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
724 extra_options="${extra_options} openbsd.opt alpha/elf.opt"
725 # default x-alpha is only appropriate for dec-osf.
726 target_cpu_default="MASK_GAS"
727 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
728 ;;
729 alpha*-dec-osf5.1*)
730 if test x$stabs = xyes
731 then
732 tm_file="${tm_file} dbx.h"
733 fi
734 if test x$gas != xyes
735 then
736 extra_passes="mips-tfile mips-tdump"
737 fi
738 use_collect2=yes
739 tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf5"
740 tm_file="${tm_file} alpha/osf5.h"
741 tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
742 extra_options="${extra_options} rpath.opt alpha/osf5.opt"
743 extra_headers=va_list.h
744 use_gcc_stdint=provide
745 case ${enable_threads} in
746 "" | yes | posix)
747 thread_file='posix'
748 tmake_file="${tmake_file} alpha/t-osf-pthread"
749 ;;
750 esac
751 ;;
752 alpha64-dec-*vms*)
753 tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
754 xm_file="alpha/xm-vms.h vms/xm-vms64.h"
755 tmake_file="alpha/t-alpha vms/t-vms alpha/t-vms alpha/t-ieee"
756 xmake_file=vms/x-vms
757 exeext=.exe
758 install_headers_dir=install-headers-cp
759 extra_options="${extra_options} vms/vms.opt"
760 ;;
761 alpha*-dec-*vms*)
762 tm_file="${tm_file} alpha/vms.h"
763 xm_file="alpha/xm-vms.h"
764 tmake_file="alpha/t-alpha vms/t-vms alpha/t-vms alpha/t-ieee"
765 xmake_file=vms/x-vms
766 exeext=.exe
767 install_headers_dir=install-headers-cp
768 extra_options="${extra_options} vms/vms.opt"
769 ;;
770 arm-wrs-vxworks)
771 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
772 extra_options="${extra_options} arm/vxworks.opt"
773 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
774 ;;
775 arm*-*-freebsd*)
776 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
777 tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
778 ;;
779 arm*-*-netbsdelf*)
780 tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
781 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
782 tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
783 ;;
784 arm*-*-linux*) # ARM GNU/Linux with ELF
785 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
786 case $target in
787 arm*b-*)
788 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
789 ;;
790 esac
791 tmake_file="${tmake_file} t-linux arm/t-arm"
792 case ${target} in
793 arm*-*-linux-*eabi)
794 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
795 tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
796 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
797 # Define multilib configuration for arm-linux-androideabi.
798 case ${target} in
799 *-androideabi)
800 tmake_file="$tmake_file arm/t-linux-androideabi"
801 ;;
802 esac
803 # The BPABI long long divmod functions return a 128-bit value in
804 # registers r0-r3. Correctly modeling that requires the use of
805 # TImode.
806 need_64bit_hwint=yes
807 # The EABI requires the use of __cxa_atexit.
808 default_use_cxa_atexit=yes
809 ;;
810 *)
811 tmake_file="$tmake_file arm/t-linux"
812 ;;
813 esac
814 tm_file="$tm_file arm/aout.h arm/arm.h"
815 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
816 ;;
817 arm*-*-uclinux*) # ARM ucLinux
818 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
819 tmake_file="arm/t-arm arm/t-arm-elf"
820 case ${target} in
821 arm*-*-uclinux*eabi)
822 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
823 tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
824 tmake_file="$tmake_file arm/t-bpabi"
825 # The BPABI long long divmod functions return a 128-bit value in
826 # registers r0-r3. Correctly modeling that requires the use of
827 # TImode.
828 need_64bit_hwint=yes
829 # The EABI requires the use of __cxa_atexit.
830 default_use_cxa_atexit=yes
831 esac
832 tm_file="$tm_file arm/aout.h arm/arm.h"
833 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
834 ;;
835 arm*-*-ecos-elf)
836 tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
837 tmake_file="arm/t-arm arm/t-arm-elf"
838 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
839 ;;
840 arm*-*-eabi* | arm*-*-symbianelf* )
841 # The BPABI long long divmod functions return a 128-bit value in
842 # registers r0-r3. Correctly modeling that requires the use of
843 # TImode.
844 need_64bit_hwint=yes
845 default_use_cxa_atexit=yes
846 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
847 tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
848 tmake_file="arm/t-arm arm/t-arm-elf"
849 case ${target} in
850 arm*-*-eabi*)
851 tm_file="$tm_file newlib-stdint.h"
852 tmake_file="${tmake_file} arm/t-bpabi"
853 use_gcc_stdint=wrap
854 ;;
855 arm*-*-symbianelf*)
856 tm_file="${tm_file} arm/symbian.h"
857 # We do not include t-bpabi for Symbian OS because the system
858 # provides its own implementation of the BPABI functions.
859 tmake_file="${tmake_file} arm/t-symbian"
860 ;;
861 esac
862 tm_file="${tm_file} arm/aout.h arm/arm.h"
863 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
864 ;;
865 arm*-*-rtems*)
866 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
867 tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
868 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
869 ;;
870 arm*-*-elf)
871 tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
872 tmake_file="arm/t-arm arm/t-arm-elf"
873 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
874 ;;
875 arm*-wince-pe*)
876 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
877 tmake_file="arm/t-arm arm/t-wince-pe"
878 extra_options="${extra_options} arm/pe.opt"
879 extra_objs="pe.o"
880 ;;
881 avr-*-rtems*)
882 tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
883 tmake_file="avr/t-avr t-rtems avr/t-rtems"
884 extra_gcc_objs="driver-avr.o avr-devices.o"
885 extra_objs="avr-devices.o"
886 ;;
887 avr-*-*)
888 tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
889 use_gcc_stdint=wrap
890 extra_gcc_objs="driver-avr.o avr-devices.o"
891 extra_objs="avr-devices.o"
892 ;;
893 bfin*-elf*)
894 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
895 tmake_file=bfin/t-bfin-elf
896 use_collect2=no
897 ;;
898 bfin*-uclinux*)
899 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
900 tmake_file=bfin/t-bfin-uclinux
901 use_collect2=no
902 ;;
903 bfin*-linux-uclibc*)
904 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
905 tmake_file="t-slibgcc-elf-ver bfin/t-bfin-linux"
906 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
907 use_collect2=no
908 ;;
909 bfin*-rtems*)
910 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
911 tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
912 ;;
913 bfin*-*)
914 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
915 tmake_file=bfin/t-bfin
916 use_collect2=no
917 use_gcc_stdint=wrap
918 ;;
919 crisv32-*-elf | crisv32-*-none)
920 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
921 tmake_file="cris/t-cris"
922 target_cpu_default=32
923 gas=yes
924 extra_options="${extra_options} cris/elf.opt"
925 use_gcc_stdint=wrap
926 ;;
927 cris-*-elf | cris-*-none)
928 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
929 tmake_file="cris/t-cris cris/t-elfmulti"
930 gas=yes
931 extra_options="${extra_options} cris/elf.opt"
932 use_gcc_stdint=wrap
933 ;;
934 crisv32-*-linux* | cris-*-linux*)
935 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
936 # We need to avoid using t-linux, so override default tmake_file
937 tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
938 extra_options="${extra_options} cris/linux.opt"
939 case $target in
940 cris-*-*)
941 target_cpu_default=10
942 ;;
943 crisv32-*-*)
944 target_cpu_default=32
945 ;;
946 esac
947 ;;
948 fr30-*-elf)
949 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
950 tmake_file=fr30/t-fr30
951 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
952 ;;
953 frv-*-elf)
954 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
955 tm_file="${tm_file} ../../libgcc/config/frv/frv-abi.h"
956 tmake_file=frv/t-frv
957 ;;
958 frv-*-*linux*)
959 tm_file="dbxelf.h elfos.h ${tm_file} \
960 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
961 tm_file="${tm_file} ../../libgcc/config/frv/frv-abi.h"
962 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
963 ;;
964 moxie-*-elf)
965 gas=yes
966 gnu_ld=yes
967 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
968 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
969 tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
970 ;;
971 moxie-*-uclinux*)
972 gas=yes
973 gnu_ld=yes
974 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
975 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
976 tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
977 ;;
978 moxie-*-rtems*)
979 tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp t-rtems"
980 tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
981 ;;
982 h8300-*-rtems*)
983 tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
984 tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
985 ;;
986 h8300-*-elf*)
987 tmake_file="h8300/t-h8300 h8300/t-elf"
988 tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
989 ;;
990 hppa*64*-*-linux*)
991 target_cpu_default="MASK_PA_11|MASK_PA_20"
992 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
993 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
994 pa/pa64-linux.h"
995 tmake_file="${tmake_file} pa/t-linux64"
996 gas=yes gnu_ld=yes
997 need_64bit_hwint=yes
998 ;;
999 hppa*-*-linux*)
1000 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1001 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1002 pa/pa32-regs.h pa/pa32-linux.h"
1003 tmake_file="${tmake_file} pa/t-linux t-slibgcc-libgcc"
1004 # Set the libgcc version number
1005 if test x$sjlj = x1; then
1006 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1007 else
1008 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1009 fi
1010 ;;
1011 # port not yet contributed.
1012 #hppa*-*-openbsd*)
1013 # target_cpu_default="MASK_PA_11"
1014 # ;;
1015 hppa[12]*-*-hpux10*)
1016 case ${target} in
1017 hppa1.1-*-* | hppa2*-*-*)
1018 target_cpu_default="MASK_PA_11"
1019 ;;
1020 esac
1021 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1022 pa/pa-hpux.h pa/pa-hpux10.h"
1023 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1024 case ${target} in
1025 *-*-hpux10.[1-9]*)
1026 tm_file="${tm_file} pa/pa-hpux1010.h"
1027 extra_options="${extra_options} pa/pa-hpux1010.opt"
1028 ;;
1029 esac
1030 use_gcc_stdint=provide
1031 tm_file="${tm_file} hpux-stdint.h"
1032 tmake_file="pa/t-pa-hpux10 pa/t-pa-hpux pa/t-hpux-shlib"
1033 case ${enable_threads} in
1034 "")
1035 if test x$have_pthread_h = xyes ; then
1036 tmake_file="${tmake_file} pa/t-dce-thr"
1037 fi
1038 ;;
1039 yes | dce)
1040 tmake_file="${tmake_file} pa/t-dce-thr"
1041 ;;
1042 esac
1043 # Set the libgcc version number
1044 if test x$sjlj = x1; then
1045 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1046 else
1047 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1048 fi
1049 use_collect2=yes
1050 gas=yes
1051 if test "x$with_dwarf2" != x; then
1052 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1053 dwarf2=no
1054 fi
1055 ;;
1056 hppa*64*-*-hpux11*)
1057 target_cpu_default="MASK_PA_11|MASK_PA_20"
1058 if test x$gnu_ld = xyes
1059 then
1060 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1061 fi
1062 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1063 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1064 pa/pa-hpux11.h"
1065 case ${target} in
1066 *-*-hpux11.[1-9]*)
1067 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1068 extra_options="${extra_options} pa/pa-hpux1111.opt"
1069 ;;
1070 *)
1071 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1072 ;;
1073 esac
1074 extra_options="${extra_options} pa/pa-hpux.opt \
1075 pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1076 need_64bit_hwint=yes
1077 tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
1078 # Set the libgcc version number
1079 if test x$sjlj = x1; then
1080 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1081 else
1082 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1083 fi
1084 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
1085 libgcc_stub.a"
1086 case x${enable_threads} in
1087 x | xyes | xposix )
1088 thread_file=posix
1089 ;;
1090 esac
1091 gas=yes
1092 case ${target} in
1093 *-*-hpux11.[01]*)
1094 use_gcc_stdint=provide
1095 tm_file="${tm_file} hpux-stdint.h"
1096 ;;
1097 *-*-hpux11.[23]*)
1098 use_gcc_stdint=wrap
1099 tm_file="${tm_file} hpux-stdint.h"
1100 ;;
1101 esac
1102 ;;
1103 hppa[12]*-*-hpux11*)
1104 case ${target} in
1105 hppa1.1-*-* | hppa2*-*-*)
1106 target_cpu_default="MASK_PA_11"
1107 ;;
1108 esac
1109 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1110 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1111 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1112 hpux11.opt"
1113 case ${target} in
1114 *-*-hpux11.[1-9]*)
1115 tm_file="${tm_file} pa/pa-hpux1111.h"
1116 extra_options="${extra_options} pa/pa-hpux1111.opt"
1117 ;;
1118 esac
1119 tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux pa/t-hpux-shlib"
1120 # Set the libgcc version number
1121 if test x$sjlj = x1; then
1122 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1123 else
1124 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1125 fi
1126 extra_parts="libgcc_stub.a"
1127 case x${enable_threads} in
1128 x | xyes | xposix )
1129 thread_file=posix
1130 ;;
1131 esac
1132 use_collect2=yes
1133 gas=yes
1134 case ${target} in
1135 *-*-hpux11.[01]*)
1136 use_gcc_stdint=provide
1137 tm_file="${tm_file} hpux-stdint.h"
1138 ;;
1139 *-*-hpux11.[23]*)
1140 use_gcc_stdint=wrap
1141 tm_file="${tm_file} hpux-stdint.h"
1142 ;;
1143 esac
1144 if test "x$with_dwarf2" != x; then
1145 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1146 dwarf2=no
1147 fi
1148 ;;
1149 i[34567]86-*-darwin*)
1150 need_64bit_hwint=yes
1151 need_64bit_isa=yes
1152 # Baseline choice for a machine that allows m64 support.
1153 with_cpu=${with_cpu:-core2}
1154 tmake_file="${tmake_file} t-slibgcc-darwin i386/t-crtpc i386/t-crtfm"
1155 ;;
1156 x86_64-*-darwin*)
1157 with_cpu=${with_cpu:-core2}
1158 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin i386/t-crtpc i386/t-crtfm"
1159 tm_file="${tm_file} ${cpu_type}/darwin64.h"
1160 ;;
1161 i[34567]86-*-elf*)
1162 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1163 tmake_file="${tmake_file} i386/t-i386elf t-svr4"
1164 ;;
1165 x86_64-*-elf*)
1166 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1167 tmake_file="${tmake_file} i386/t-i386elf t-svr4"
1168 ;;
1169 i[34567]86-*-freebsd*)
1170 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1171 tmake_file="${tmake_file} i386/t-crtstuff"
1172 ;;
1173 x86_64-*-freebsd*)
1174 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
1175 tmake_file="${tmake_file} i386/t-crtstuff"
1176 ;;
1177 i[34567]86-*-netbsdelf*)
1178 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1179 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1180 ;;
1181 x86_64-*-netbsd*)
1182 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
1183 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1184 tmake_file="${tmake_file} i386/t-crtstuff"
1185 ;;
1186 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1187 tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
1188 extra_options="${extra_options} openbsd.opt"
1189 # needed to unconfuse gdb
1190 tmake_file="${tmake_file} t-libc-ok t-openbsd i386/t-openbsd"
1191 # we need collect2 until our bug is fixed...
1192 use_collect2=yes
1193 ;;
1194 i[34567]86-*-openbsd*)
1195 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1196 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1197 extra_options="${extra_options} openbsd.opt"
1198 gas=yes
1199 gnu_ld=yes
1200 ;;
1201 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1202 # Intel 80386's running GNU/*
1203 # with ELF format using glibc 2
1204 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
1205 case ${target} in
1206 i[34567]86-*-linux*)
1207 # Assume modern glibc
1208 default_gnu_indirect_function=yes
1209 if test x$enable_targets = xall; then
1210 tm_file="${tm_file} i386/x86-64.h i386/gnu-user64.h i386/linux64.h"
1211 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1212 tmake_file="${tmake_file} i386/t-linux64"
1213 need_64bit_hwint=yes
1214 need_64bit_isa=yes
1215 case X"${with_cpu}" in
1216 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1217 ;;
1218 X)
1219 if test x$with_cpu_64 = x; then
1220 with_cpu_64=generic
1221 fi
1222 ;;
1223 *)
1224 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1225 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver1 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1226 exit 1
1227 ;;
1228 esac
1229 else
1230 tm_file="${tm_file} i386/gnu-user.h i386/linux.h"
1231 fi
1232 ;;
1233 i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/gnu-user.h i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
1234 i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/gnu-user.h i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
1235 i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} i386/gnu-user.h i386/linux.h kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;;
1236 i[34567]86-*-gnu*) tm_file="$tm_file i386/gnu-user.h i386/linux.h gnu.h i386/gnu.h";;
1237 esac
1238 tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
1239 ;;
1240 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1241 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h \
1242 i386/x86-64.h i386/gnu-user64.h i386/linux64.h"
1243 case ${target} in
1244 x86_64-*-linux*)
1245 default_gnu_indirect_function=glibc-2011 ;;
1246 x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
1247 x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
1248 esac
1249 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
1250 ;;
1251 i[34567]86-pc-msdosdjgpp*)
1252 xm_file=i386/xm-djgpp.h
1253 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1254 tmake_file="${tmake_file} i386/t-djgpp"
1255 extra_options="${extra_options} i386/djgpp.opt"
1256 gnu_ld=yes
1257 gas=yes
1258 use_gcc_stdint=wrap
1259 ;;
1260 i[34567]86-*-lynxos*)
1261 xm_defines=POSIX
1262 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1263 tmake_file="${tmake_file} i386/t-crtstuff t-lynx"
1264 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1265 extra_options="${extra_options} lynx.opt"
1266 thread_file=lynx
1267 gnu_ld=yes
1268 gas=yes
1269 ;;
1270 i[3456x]86-*-netware*)
1271 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h tm-dwarf2.h i386/netware.h"
1272 tmake_file="${tmake_file} i386/t-netware"
1273 extra_objs=netware.o
1274 extra_options="${extra_options} i386/netware.opt"
1275 case /${with_ld} in
1276 */nwld)
1277 extra_objs="$extra_objs nwld.o"
1278 tm_file="${tm_file} i386/nwld.h"
1279 tmake_file="${tmake_file} i386/t-nwld"
1280 extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def"
1281 ;;
1282 esac
1283 case x${enable_threads} in
1284 x | xyes | xposix) thread_file='posix';;
1285 xnks) thread_file='nks';;
1286 xno) ;;
1287 *) echo 'Unknown thread configuration for NetWare' >&2; exit 1;;
1288 esac
1289 ;;
1290 i[34567]86-*-nto-qnx*)
1291 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1292 extra_options="${extra_options} i386/nto.opt"
1293 tmake_file="${tmake_file} i386/t-nto"
1294 gnu_ld=yes
1295 gas=yes
1296 ;;
1297 i[34567]86-*-rtems*)
1298 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h"
1299 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1300 tmake_file="${tmake_file} i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1301 ;;
1302 i[34567]86-*-solaris2*)
1303 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sysv4.h sol2.h"
1304 # Set default arch_32 to pentium4, tune_32 to generic like the other
1305 # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1306 case ${target} in
1307 *-*-solaris2.[89]*)
1308 # Solaris 8 and 9/x86 cannot execute SSE/SSE2 instructions by
1309 # default.
1310 with_arch_32=${with_arch_32:-pentiumpro}
1311 ;;
1312 *)
1313 with_arch_32=${with_arch_32:-pentium4}
1314 ;;
1315 esac
1316 with_tune_32=${with_tune_32:-generic}
1317 case ${target} in
1318 *-*-solaris2.1[0-9]*)
1319 tm_file="${tm_file} sol2-10.h"
1320 ;;
1321 esac
1322 tm_file="${tm_file} i386/sol2.h"
1323 if test x$gnu_ld = xyes; then
1324 tm_file="${tm_file} sol2-gld.h"
1325 fi
1326 if test x$gas = xyes; then
1327 tm_file="${tm_file} i386/sol2-gas.h"
1328 fi
1329 tmake_file="${tmake_file} t-sol2 t-svr4"
1330 c_target_objs="${c_target_objs} sol2-c.o"
1331 cxx_target_objs="${cxx_target_objs} sol2-c.o"
1332 extra_objs="sol2.o"
1333 tm_p_file="${tm_p_file} sol2-protos.h"
1334 if test x$gnu_ld = xyes; then
1335 tmake_file="$tmake_file t-slibgcc-elf-ver"
1336 tm_defines="${tm_defines} TARGET_GNU_LD=1"
1337 else
1338 tmake_file="$tmake_file t-slibgcc-sld"
1339 fi
1340 if test x$gas = xyes; then
1341 tm_file="usegas.h ${tm_file}"
1342 fi
1343 tm_file="$tm_file tm-dwarf2.h"
1344 case ${target} in
1345 *-*-solaris2.1[0-9]*)
1346 tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
1347 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1348 tmake_file="$tmake_file i386/t-sol2-10"
1349 # i386/t-crtstuff only affects libgcc. Its inclusion
1350 # depends on a runtime test and is thus performed in
1351 # libgcc/configure.ac instead.
1352 need_64bit_hwint=yes
1353 need_64bit_isa=yes
1354 use_gcc_stdint=wrap
1355 case X"${with_cpu}" in
1356 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1357 ;;
1358 X)
1359 if test x$with_cpu_64 = x; then
1360 with_cpu_64=generic
1361 fi
1362 ;;
1363 *)
1364 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1365 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver1 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1366 exit 1
1367 ;;
1368 esac
1369 ;;
1370 *)
1371 use_gcc_stdint=provide
1372 ;;
1373 esac
1374 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
1375 "":yes:* | yes:yes:* )
1376 thread_file=posix
1377 ;;
1378 esac
1379 ;;
1380 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1381 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
1382 case ${target} in
1383 *-vxworksae*)
1384 tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1385 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1386 ;;
1387 *)
1388 tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1389 tmake_file="${tmake_file} i386/t-vxworks"
1390 ;;
1391 esac
1392 ;;
1393 i[34567]86-*-cygwin*)
1394 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
1395 xm_file=i386/xm-cygwin.h
1396 # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
1397 if test x$sjlj = x0; then
1398 tmake_eh_file="i386/t-dw2-eh"
1399 else
1400 tmake_eh_file="i386/t-sjlj-eh"
1401 fi
1402 # Shared libgcc DLL install dir depends on cross/native build.
1403 if test x${host} = x${target} ; then
1404 tmake_dlldir_file="i386/t-dlldir"
1405 else
1406 tmake_dlldir_file="i386/t-dlldir-x"
1407 fi
1408 tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming i386/t-cygwin t-dfprules"
1409 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1410 extra_options="${extra_options} i386/cygming.opt"
1411 extra_objs="winnt.o winnt-stubs.o"
1412 c_target_objs="${c_target_objs} msformat-c.o"
1413 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1414 if test x$enable_threads = xyes; then
1415 thread_file='posix'
1416 fi
1417 use_gcc_stdint=wrap
1418 ;;
1419 i[34567]86-*-mingw* | x86_64-*-mingw*)
1420 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1421 xm_file=i386/xm-mingw32.h
1422 case ${target} in
1423 x86_64-*-* | *-w64-*)
1424 need_64bit_hwint=yes
1425 need_64bit_isa=yes
1426 ;;
1427 *)
1428 ;;
1429 esac
1430 if test x$enable_threads = xposix ; then
1431 tm_file="${tm_file} i386/mingw-pthread.h"
1432 fi
1433 tm_file="${tm_file} i386/mingw32.h"
1434 # This makes the logic if mingw's or the w64 feature set has to be used
1435 case ${target} in
1436 *-w64-*)
1437 user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1438 user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1439 tm_file="${tm_file} i386/mingw-w64.h"
1440 if test x$enable_targets = xall; then
1441 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1442 case X"${with_cpu}" in
1443 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
1444 ;;
1445 X)
1446 if test x$with_cpu_64 = x; then
1447 with_cpu_64=generic
1448 fi
1449 ;;
1450 *)
1451 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1452 echo "generic atom core2 corei7 Xcorei7-avx nocona x86-64 bdver1 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
1453 exit 1
1454 ;;
1455 esac
1456 fi
1457 ;;
1458 *)
1459 ;;
1460 esac
1461 tm_file="${tm_file} i386/mingw-stdint.h"
1462 # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
1463 if test x$sjlj = x0; then
1464 tmake_eh_file="i386/t-dw2-eh"
1465 else
1466 tmake_eh_file="i386/t-sjlj-eh"
1467 fi
1468 # Shared libgcc DLL install dir depends on cross/native build.
1469 if test x${host} = x${target} ; then
1470 tmake_dlldir_file="i386/t-dlldir"
1471 else
1472 tmake_dlldir_file="i386/t-dlldir-x"
1473 fi
1474 tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming t-dfprules"
1475 case ${target} in
1476 x86_64-w64-*)
1477 tmake_file="${tmake_file} i386/t-mingw-w64"
1478 ;;
1479 i[34567]86-w64-*)
1480 tmake_file="${tmake_file} i386/t-mingw-w32"
1481 ;;
1482 *)
1483 tmake_file="${tmake_file} i386/t-mingw32"
1484 ;;
1485 esac
1486 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1487 extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1488 case ${target} in
1489 *-w64-*)
1490 extra_options="${extra_options} i386/mingw-w64.opt"
1491 ;;
1492 *)
1493 ;;
1494 esac
1495 extra_objs="winnt.o winnt-stubs.o"
1496 c_target_objs="${c_target_objs} msformat-c.o"
1497 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1498 default_use_cxa_atexit=yes
1499 use_gcc_stdint=wrap
1500 case ${enable_threads} in
1501 "" | yes | win32) thread_file='win32'
1502 tmake_file="${tmake_file} i386/t-gthr-win32"
1503 ;;
1504 posix)
1505 thread_file='posix'
1506 tmake_file="i386/t-mingw-pthread ${tmake_file}"
1507 ;;
1508 esac
1509 case ${target} in
1510 x86_64-*-mingw*)
1511 tmake_file="${tmake_file} i386/t-crtfm"
1512 ;;
1513 *)
1514 ;;
1515 esac
1516 case ${target} in
1517 *mingw32crt*)
1518 tm_file="${tm_file} i386/crtdll.h"
1519 ;;
1520 *mingw32msv* | *mingw*)
1521 ;;
1522 esac
1523 ;;
1524 i[34567]86-*-interix3*)
1525 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h"
1526 tmake_file="${tmake_file} i386/t-interix"
1527 extra_options="${extra_options} rpath.opt interix.opt"
1528 extra_objs=winnt.o
1529 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1530 if test x$enable_threads = xyes ; then
1531 thread_file='posix'
1532 fi
1533 if test x$stabs = xyes ; then
1534 tm_file="${tm_file} dbxcoff.h"
1535 fi
1536 ;;
1537 ia64*-*-elf*)
1538 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1539 tmake_file="ia64/t-ia64"
1540 target_cpu_default="0"
1541 if test x$gas = xyes
1542 then
1543 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1544 fi
1545 if test x$gnu_ld = xyes
1546 then
1547 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1548 fi
1549 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1550 ;;
1551 ia64*-*-freebsd*)
1552 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1553 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1554 tmake_file="${tmake_file} ia64/t-ia64"
1555 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1556 ;;
1557 ia64*-*-linux*)
1558 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1559 tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
1560 if test x$with_system_libunwind != xyes ; then
1561 tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
1562 fi
1563 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1564 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1565 ;;
1566 ia64*-*-hpux*)
1567 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1568 tmake_file="ia64/t-ia64 ia64/t-hpux"
1569 target_cpu_default="MASK_GNU_AS"
1570 case x$enable_threads in
1571 x | xyes | xposix )
1572 thread_file=posix
1573 ;;
1574 esac
1575 use_collect2=no
1576 c_target_objs="ia64-c.o"
1577 cxx_target_objs="ia64-c.o"
1578 extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1579 use_gcc_stdint=wrap
1580 tm_file="${tm_file} hpux-stdint.h"
1581 ;;
1582 ia64-hp-*vms*)
1583 tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h ia64/vms.h ia64/vms64.h"
1584 xm_file="vms/xm-vms.h vms/xm-vms64.h"
1585 tmake_file="vms/t-vms ia64/t-ia64 ia64/t-vms"
1586 xmake_file=vms/x-vms
1587 target_cpu_default="0"
1588 if test x$gas = xyes
1589 then
1590 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1591 fi
1592 exeext=.exe
1593 install_headers_dir=install-headers-cp
1594 extra_options="${extra_options} vms/vms.opt ia64/vms.opt"
1595 ;;
1596 iq2000*-*-elf*)
1597 tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1598 tmake_file=iq2000/t-iq2000
1599 out_file=iq2000/iq2000.c
1600 md_file=iq2000/iq2000.md
1601 ;;
1602 lm32-*-elf*)
1603 tm_file="dbxelf.h elfos.h ${tm_file}"
1604 tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1605 ;;
1606 lm32-*-rtems*)
1607 tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1608 tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1609 tmake_file="${tmake_file} t-rtems"
1610 ;;
1611 lm32-*-uclinux*)
1612 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1613 tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
1614 ;;
1615 m32r-*-elf*)
1616 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1617 extra_parts="crtinit.o crtfini.o"
1618 ;;
1619 m32rle-*-elf*)
1620 tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1621 extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o"
1622 ;;
1623 m32r-*-rtems*)
1624 tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1625 tmake_file="m32r/t-m32r t-rtems"
1626 extra_parts="crtinit.o crtfini.o"
1627 ;;
1628 m32r-*-linux*)
1629 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1630 # We override the tmake_file for linux -- why?
1631 tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1632 gnu_ld=yes
1633 if test x$enable_threads = xyes; then
1634 thread_file='posix'
1635 fi
1636 ;;
1637 m32rle-*-linux*)
1638 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1639 # We override the tmake_file for linux -- why?
1640 tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1641 gnu_ld=yes
1642 if test x$enable_threads = xyes; then
1643 thread_file='posix'
1644 fi
1645 ;;
1646 m68k-*-elf* | fido-*-elf*)
1647 case ${target} in
1648 fido-*-elf*)
1649 # Check that $with_cpu makes sense.
1650 case $with_cpu in
1651 "" | "fidoa")
1652 ;;
1653 *)
1654 echo "Cannot accept --with-cpu=$with_cpu"
1655 exit 1
1656 ;;
1657 esac
1658 with_cpu=fidoa
1659 ;;
1660 *)
1661 default_m68k_cpu=68020
1662 default_cf_cpu=5206
1663 ;;
1664 esac
1665 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
1666 tm_defines="${tm_defines} MOTOROLA=1"
1667 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1668 # Add multilibs for targets other than fido.
1669 case ${target} in
1670 fido-*-elf*)
1671 ;;
1672 *)
1673 tmake_file="$tmake_file m68k/t-mlibs"
1674 ;;
1675 esac
1676 extra_parts="crtbegin.o crtend.o"
1677 ;;
1678 m68k*-*-netbsdelf*)
1679 default_m68k_cpu=68020
1680 default_cf_cpu=5475
1681 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1682 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1683 tm_defines="${tm_defines} MOTOROLA=1"
1684 ;;
1685 m68k*-*-openbsd*)
1686 default_m68k_cpu=68020
1687 default_cf_cpu=5475
1688 # needed to unconfuse gdb
1689 tm_defines="${tm_defines} OBSD_OLD_GAS"
1690 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1691 extra_options="${extra_options} openbsd.opt"
1692 tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
1693 # we need collect2 until our bug is fixed...
1694 use_collect2=yes
1695 ;;
1696 m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
1697 # with uClibc, using the new GNU/Linux-style
1698 # ABI.
1699 default_m68k_cpu=68020
1700 default_cf_cpu=5206
1701 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
1702 extra_options="${extra_options} m68k/uclinux.opt"
1703 tm_defines="${tm_defines} MOTOROLA=1"
1704 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1705 ;;
1706 m68k-*-linux*) # Motorola m68k's running GNU/Linux
1707 # with ELF format using glibc 2
1708 # aka the GNU/Linux C library 6.
1709 default_m68k_cpu=68020
1710 default_cf_cpu=5475
1711 with_arch=${with_arch:-m68k}
1712 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1713 extra_options="${extra_options} m68k/ieee.opt"
1714 tm_defines="${tm_defines} MOTOROLA=1"
1715 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1716 # if not configured with --enable-sjlj-exceptions, bump the
1717 # libgcc version number
1718 if test x$sjlj != x1; then
1719 tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
1720 fi
1721 ;;
1722 m68k-*-rtems*)
1723 default_m68k_cpu=68020
1724 default_cf_cpu=5206
1725 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems m68k/t-mlibs"
1726 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
1727 tm_defines="${tm_defines} MOTOROLA=1"
1728 extra_parts="crtbegin.o crtend.o"
1729 ;;
1730 mcore-*-elf)
1731 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1732 tmake_file=mcore/t-mcore
1733 inhibit_libc=true
1734 ;;
1735 mep-*-*)
1736 tm_file="dbxelf.h elfos.h ${tm_file}"
1737 tmake_file=mep/t-mep
1738 extra_parts="crtbegin.o crtend.o"
1739 c_target_objs="mep-pragma.o"
1740 cxx_target_objs="mep-pragma.o"
1741 if test -d "${srcdir}/../newlib/libc/include" &&
1742 test "x$with_headers" = x; then
1743 with_headers=yes
1744 fi
1745 use_gcc_stdint=wrap
1746 ;;
1747 microblaze*-linux*)
1748 tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
1749 c_target_objs="${c_target_objs} microblaze-c.o"
1750 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1751 tmake_file="${tmake_file} t-slibgcc-elf-ver t-slibgcc-nolc-override t-linux microblaze/t-microblaze"
1752 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o"
1753 ;;
1754 microblaze*-*-*)
1755 tm_file="${tm_file} dbxelf.h"
1756 c_target_objs="${c_target_objs} microblaze-c.o"
1757 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1758 tmake_file="${tmake_file} microblaze/t-microblaze"
1759 ;;
1760 mips-sgi-irix6.5*)
1761 tm_file="elfos.h ${tm_file} mips/iris6.h"
1762 tmake_file="mips/t-iris mips/t-iris6 mips/t-slibgcc-irix"
1763 extra_options="${extra_options} rpath.opt mips/iris6.opt"
1764 target_cpu_default="MASK_ABICALLS"
1765 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1766 # Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h.
1767 use_gcc_stdint=wrap
1768 if test "x$stabs" = xyes
1769 then
1770 tm_file="${tm_file} dbx.h"
1771 fi
1772 if test "x$gnu_ld" = xyes
1773 then
1774 tm_defines="${tm_defines} IRIX_USING_GNU_LD"
1775 fi
1776 case ${enable_threads}:${have_pthread_h} in
1777 "":yes | yes:yes ) thread_file=posix ;;
1778 esac
1779 ;;
1780 mips*-*-netbsd*) # NetBSD/mips, either endian.
1781 target_cpu_default="MASK_ABICALLS"
1782 tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1783 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1784 ;;
1785 mips64*-*-linux* | mipsisa64*-*-linux*)
1786 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h"
1787 tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
1788 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1789 case ${target} in
1790 mips64el-st-linux-gnu)
1791 tm_file="${tm_file} mips/st.h"
1792 tmake_file="${tmake_file} mips/t-st"
1793 ;;
1794 mips64octeon*-*-linux*)
1795 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1796 target_cpu_default=MASK_SOFT_FLOAT_ABI
1797 ;;
1798 mipsisa64r2*-*-linux*)
1799 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1800 ;;
1801 esac
1802 extra_parts="$extra_parts crtfastmath.o"
1803 gnu_ld=yes
1804 gas=yes
1805 test x$with_llsc != x || with_llsc=yes
1806 ;;
1807 mips*-*-linux*) # Linux MIPS, either endian.
1808 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h"
1809 tmake_file="${tmake_file} mips/t-libgcc-mips16"
1810 case ${target} in
1811 mipsisa32r2*)
1812 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1813 ;;
1814 mipsisa32*)
1815 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1816 esac
1817 extra_parts="$extra_parts crtfastmath.o"
1818 test x$with_llsc != x || with_llsc=yes
1819 ;;
1820 mips*-*-openbsd*)
1821 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
1822 target_cpu_default="MASK_ABICALLS"
1823 tm_file="mips/mips.h openbsd.h openbsd-stdint.h openbsd-libpthread.h mips/openbsd.h mips/sdb.h"
1824 extra_options="${extra_options} openbsd.opt"
1825 case ${target} in
1826 mips*el-*-openbsd*)
1827 tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
1828 *) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
1829 esac
1830 ;;
1831 mips*-sde-elf*)
1832 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
1833 tmake_file="mips/t-sde mips/t-libgcc-mips16"
1834 extra_options="${extra_options} mips/sde.opt"
1835 case "${with_newlib}" in
1836 yes)
1837 # newlib / libgloss.
1838 ;;
1839 *)
1840 # MIPS toolkit libraries.
1841 tm_file="$tm_file mips/sdemtk.h"
1842 tmake_file="$tmake_file mips/t-sdemtk"
1843 case ${enable_threads} in
1844 "" | yes | mipssde)
1845 thread_file='mipssde'
1846 ;;
1847 esac
1848 ;;
1849 esac
1850 case ${target} in
1851 mipsisa32r2*)
1852 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1853 ;;
1854 mipsisa32*)
1855 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
1856 ;;
1857 mipsisa64r2*)
1858 tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
1859 ;;
1860 mipsisa64*)
1861 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
1862 ;;
1863 esac
1864 ;;
1865 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1866 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
1867 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
1868 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
1869 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1870 tmake_file="mips/t-isa3264 mips/t-libgcc-mips16"
1871 case ${target} in
1872 mipsisa32r2*)
1873 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1874 ;;
1875 mipsisa32*)
1876 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1877 ;;
1878 mipsisa64r2*)
1879 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1880 ;;
1881 mipsisa64*)
1882 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
1883 ;;
1884 esac
1885 case ${target} in
1886 mipsisa32*-*-elfoabi*)
1887 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
1888 tm_file="${tm_file} mips/elfoabi.h"
1889 ;;
1890 mipsisa64*-*-elfoabi*)
1891 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
1892 tm_file="${tm_file} mips/elfoabi.h"
1893 ;;
1894 *-*-elf*)
1895 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1896 ;;
1897 esac
1898 ;;
1899 mipsisa64sr71k-*-elf*)
1900 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1901 tmake_file=mips/t-sr71k
1902 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1903 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
1904 ;;
1905 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1906 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1907 tmake_file="mips/t-elf mips/t-libgcc-mips16 mips/t-sb1"
1908 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1909 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1910 ;;
1911 mips-*-elf* | mipsel-*-elf*)
1912 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1913 tmake_file="mips/t-elf mips/t-libgcc-mips16"
1914 ;;
1915 mips64-*-elf* | mips64el-*-elf*)
1916 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1917 tmake_file="mips/t-elf mips/t-libgcc-mips16"
1918 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1919 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1920 ;;
1921 mips64vr-*-elf* | mips64vrel-*-elf*)
1922 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
1923 tmake_file=mips/t-vr
1924 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1925 ;;
1926 mips64orion-*-elf* | mips64orionel-*-elf*)
1927 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
1928 tmake_file="mips/t-elf mips/t-libgcc-mips16"
1929 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1930 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1931 ;;
1932 mips*-*-rtems*)
1933 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
1934 tmake_file="mips/t-elf mips/t-libgcc-mips16 t-rtems mips/t-rtems"
1935 ;;
1936 mips-wrs-vxworks)
1937 tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
1938 tmake_file="${tmake_file} mips/t-vxworks"
1939 ;;
1940 mipstx39-*-elf* | mipstx39el-*-elf*)
1941 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
1942 tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
1943 ;;
1944 mmix-knuth-mmixware)
1945 tm_file="${tm_file} newlib-stdint.h"
1946 need_64bit_hwint=yes
1947 use_gcc_stdint=wrap
1948 ;;
1949 mn10300-*-*)
1950 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1951 if test x$stabs = xyes
1952 then
1953 tm_file="${tm_file} dbx.h"
1954 fi
1955 use_collect2=no
1956 use_gcc_stdint=wrap
1957 ;;
1958 pdp11-*-*)
1959 tm_file="${tm_file} newlib-stdint.h"
1960 use_gcc_stdint=wrap
1961 ;;
1962 picochip-*)
1963 tm_file="${tm_file} newlib-stdint.h"
1964 use_gcc_stdint=wrap
1965 tmake_file="picochip/t-picochip t-pnt16-warn"
1966 ;;
1967 # port not yet contributed
1968 #powerpc-*-openbsd*)
1969 # tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
1970 # extra_headers=
1971 # ;;
1972 powerpc-*-darwin*)
1973 extra_options="${extra_options} rs6000/darwin.opt"
1974 extra_parts="crt2.o"
1975 case ${target} in
1976 *-darwin1[0-9]* | *-darwin[8-9]*)
1977 tmake_file="${tmake_file} rs6000/t-darwin8"
1978 tm_file="${tm_file} rs6000/darwin8.h"
1979 ;;
1980 *-darwin7*)
1981 tm_file="${tm_file} rs6000/darwin7.h"
1982 ;;
1983 *-darwin[0-6]*)
1984 ;;
1985 esac
1986 tmake_file="${tmake_file} t-slibgcc-darwin"
1987 extra_headers=altivec.h
1988 ;;
1989 powerpc64-*-darwin*)
1990 extra_options="${extra_options} ${cpu_type}/darwin.opt"
1991 extra_parts="crt2.o"
1992 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin"
1993 tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1994 extra_headers=altivec.h
1995 ;;
1996 powerpc-*-freebsd*)
1997 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1998 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd"
1999 tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
2000 extra_options="${extra_options} rs6000/sysv4.opt"
2001 ;;
2002 powerpc-*-netbsd*)
2003 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2004 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2005 tmake_file="${tmake_file} rs6000/t-netbsd"
2006 extra_options="${extra_options} rs6000/sysv4.opt"
2007 ;;
2008 powerpc-*-eabispe*)
2009 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
2010 extra_options="${extra_options} rs6000/sysv4.opt"
2011 tmake_file="rs6000/t-spe rs6000/t-ppccomm"
2012 use_gcc_stdint=wrap
2013 ;;
2014 powerpc-*-eabisimaltivec*)
2015 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
2016 extra_options="${extra_options} rs6000/sysv4.opt"
2017 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
2018 use_gcc_stdint=wrap
2019 ;;
2020 powerpc-*-eabisim*)
2021 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
2022 extra_options="${extra_options} rs6000/sysv4.opt"
2023 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2024 use_gcc_stdint=wrap
2025 ;;
2026 powerpc-*-elf*)
2027 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2028 extra_options="${extra_options} rs6000/sysv4.opt"
2029 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2030 ;;
2031 powerpc-*-eabialtivec*)
2032 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
2033 extra_options="${extra_options} rs6000/sysv4.opt"
2034 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
2035 use_gcc_stdint=wrap
2036 ;;
2037 powerpc-xilinx-eabi*)
2038 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h"
2039 extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
2040 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2041 use_gcc_stdint=wrap
2042 ;;
2043 powerpc-*-eabi*)
2044 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
2045 extra_options="${extra_options} rs6000/sysv4.opt"
2046 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2047 use_gcc_stdint=wrap
2048 ;;
2049 powerpc-*-rtems*)
2050 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
2051 extra_options="${extra_options} rs6000/sysv4.opt"
2052 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
2053 ;;
2054 powerpc-*-linux* | powerpc64-*-linux*)
2055 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
2056 extra_options="${extra_options} rs6000/sysv4.opt"
2057 tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2058 maybe_biarch=yes
2059 case ${target} in
2060 powerpc64-*-linux*spe* | powerpc64-*-linux*paired*)
2061 echo "*** Configuration ${target} not supported" 1>&2
2062 exit 1
2063 ;;
2064 powerpc-*-linux*spe* | powerpc-*-linux*paired*)
2065 maybe_biarch=
2066 ;;
2067 powerpc64-*-linux*)
2068 test x$with_cpu != x || cpu_is_64bit=yes
2069 maybe_biarch=always
2070 ;;
2071 esac
2072 case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2073 always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2074 if test x$cpu_is_64bit = xyes; then
2075 tm_file="${tm_file} rs6000/default64.h"
2076 fi
2077 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2078 tmake_file="$tmake_file rs6000/t-linux64"
2079 extra_options="${extra_options} rs6000/linux64.opt"
2080 ;;
2081 *)
2082 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2083 ;;
2084 esac
2085 tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
2086 case ${target} in
2087 powerpc*-*-linux*altivec*)
2088 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2089 powerpc*-*-linux*spe*)
2090 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2091 powerpc*-*-linux*paired*)
2092 tm_file="${tm_file} rs6000/750cl.h" ;;
2093 esac
2094 if test x${enable_secureplt} = xyes; then
2095 tm_file="rs6000/secureplt.h ${tm_file}"
2096 fi
2097 ;;
2098 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2099 tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2100 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
2101 extra_options="${extra_options} rs6000/sysv4.opt"
2102 extra_headers=ppc-asm.h
2103 case ${target} in
2104 *-vxworksae*)
2105 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
2106 tmake_file="${tmake_file} rs6000/t-vxworksae"
2107 ;;
2108 *-vxworks*)
2109 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2110 ;;
2111 esac
2112 ;;
2113 powerpc-*-lynxos*)
2114 xm_defines=POSIX
2115 tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2116 tmake_file="t-lynx rs6000/t-lynx"
2117 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2118 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2119 thread_file=lynx
2120 gnu_ld=yes
2121 gas=yes
2122 ;;
2123 powerpcle-*-elf*)
2124 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2125 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2126 extra_options="${extra_options} rs6000/sysv4.opt"
2127 ;;
2128 powerpcle-*-eabisim*)
2129 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
2130 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2131 extra_options="${extra_options} rs6000/sysv4.opt"
2132 use_gcc_stdint=wrap
2133 ;;
2134 powerpcle-*-eabi*)
2135 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
2136 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
2137 extra_options="${extra_options} rs6000/sysv4.opt"
2138 use_gcc_stdint=wrap
2139 ;;
2140 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2141 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2142 tmake_file=rs6000/t-aix43
2143 extra_options="${extra_options} rs6000/aix64.opt"
2144 use_collect2=yes
2145 thread_file='aix'
2146 use_gcc_stdint=provide
2147 extra_headers=
2148 ;;
2149 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2150 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2151 extra_options="${extra_options} rs6000/aix64.opt"
2152 tmake_file=rs6000/t-aix43
2153 use_collect2=yes
2154 thread_file='aix'
2155 use_gcc_stdint=wrap
2156 extra_headers=
2157 ;;
2158 rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2159 tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2160 tmake_file=rs6000/t-aix52
2161 extra_options="${extra_options} rs6000/aix64.opt"
2162 use_collect2=yes
2163 thread_file='aix'
2164 use_gcc_stdint=wrap
2165 extra_headers=
2166 ;;
2167 rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2168 tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2169 tmake_file=rs6000/t-aix52
2170 extra_options="${extra_options} rs6000/aix64.opt"
2171 use_collect2=yes
2172 thread_file='aix'
2173 use_gcc_stdint=wrap
2174 extra_headers=altivec.h
2175 ;;
2176 rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2177 tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2178 tmake_file=rs6000/t-aix52
2179 extra_options="${extra_options} rs6000/aix64.opt"
2180 use_collect2=yes
2181 thread_file='aix'
2182 use_gcc_stdint=wrap
2183 extra_headers=altivec.h
2184 ;;
2185 rx-*-elf*)
2186 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h"
2187 tmake_file="${tmake_file} rx/t-rx"
2188 ;;
2189 s390-*-linux*)
2190 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2191 ;;
2192 s390x-*-linux*)
2193 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2194 tm_p_file=s390/s390-protos.h
2195 md_file=s390/s390.md
2196 extra_modes=s390/s390-modes.def
2197 out_file=s390/s390.c
2198 tmake_file="${tmake_file} s390/t-linux64"
2199 ;;
2200 s390x-ibm-tpf*)
2201 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2202 tm_p_file=s390/s390-protos.h
2203 md_file=s390/s390.md
2204 extra_modes=s390/s390-modes.def
2205 out_file=s390/s390.c
2206 extra_parts="crtbeginS.o crtendS.o"
2207 thread_file='tpf'
2208 extra_options="${extra_options} s390/tpf.opt"
2209 ;;
2210 score-*-elf)
2211 gas=yes
2212 gnu_ld=yes
2213 tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2214 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2215 tmake_file="${tmake_file} score/t-score-elf score/t-score-softfp soft-fp/t-softfp"
2216 extra_objs="score7.o"
2217 ;;
2218 sh-*-elf* | sh[12346l]*-*-elf* | \
2219 sh-*-linux* | sh[2346lbe]*-*-linux* | \
2220 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2221 sh64-*-netbsd* | sh64l*-*-netbsd*)
2222 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2223 if test x${with_endian} = x; then
2224 case ${target} in
2225 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2226 shbe-*-* | sheb-*-*) with_endian=big,little ;;
2227 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
2228 shl* | sh64l* | sh*-*-linux* | \
2229 sh5l* | sh-superh-elf) with_endian=little,big ;;
2230 sh[1234]*-*-*) with_endian=big ;;
2231 *) with_endian=big,little ;;
2232 esac
2233 fi
2234 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2235 # First word : the default endian.
2236 # Second word: the secondary endian (optional).
2237 case ${with_endian} in
2238 big) TM_ENDIAN_CONFIG=mb ;;
2239 little) TM_ENDIAN_CONFIG=ml ;;
2240 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
2241 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
2242 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
2243 esac
2244 case ${with_endian} in
2245 little*) tm_file="sh/little.h ${tm_file}" ;;
2246 esac
2247 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2248 case ${target} in
2249 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
2250 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2251 sh*-*-netbsd*)
2252 tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2253 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2254
2255 ;;
2256 sh*-superh-elf) if test x$with_libgloss != xno; then
2257 with_libgloss=yes
2258 tm_file="${tm_file} sh/newlib.h"
2259 fi
2260 tm_file="${tm_file} sh/embed-elf.h"
2261 tm_file="${tm_file} sh/superh.h"
2262 tmake_file="${tmake_file} sh/t-superh"
2263 extra_options="${extra_options} sh/superh.opt" ;;
2264 *) if test x$with_newlib = xyes \
2265 && test x$with_libgloss = xyes; then
2266 tm_file="${tm_file} sh/newlib.h"
2267 fi
2268 tm_file="${tm_file} sh/embed-elf.h" ;;
2269 esac
2270 case ${target} in
2271 sh5*-*-netbsd*)
2272 # SHmedia, 32-bit ABI
2273 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2274 ;;
2275 sh64*-netbsd*)
2276 # SHmedia, 64-bit ABI
2277 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2278 ;;
2279 *-*-netbsd)
2280 tmake_file="${tmake_file} sh/t-netbsd"
2281 ;;
2282 sh64*-*-linux*)
2283 tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
2284 tm_file="${tm_file} sh/sh64.h"
2285 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2286 ;;
2287 sh64*)
2288 tmake_file="${tmake_file} sh/t-sh64"
2289 tm_file="${tm_file} sh/sh64.h"
2290 if test x$with_newlib = xyes; then
2291 tm_file="${tm_file} newlib-stdint.h"
2292 fi
2293 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2294 ;;
2295 *-*-elf*)
2296 tm_file="${tm_file} newlib-stdint.h"
2297 ;;
2298 esac
2299 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2300 case `echo ${target} | sed 's/e[lb]-/-/'` in
2301 sh64*-*-netbsd*) sh_cpu_target=sh5-64media ;;
2302 sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2303 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
2304 sh4a_single*) sh_cpu_target=sh4a-single ;;
2305 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
2306 sh4al) sh_cpu_target=sh4al ;;
2307 sh4a*) sh_cpu_target=sh4a ;;
2308 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
2309 sh4_single*) sh_cpu_target=sh4-single ;;
2310 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
2311 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
2312 sh3e*) sh_cpu_target=sh3e ;;
2313 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
2314 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
2315 sh2a_single*) sh_cpu_target=sh2a-single ;;
2316 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
2317 sh2a*) sh_cpu_target=sh2a ;;
2318 sh2e*) sh_cpu_target=sh2e ;;
2319 sh2*) sh_cpu_target=sh2 ;;
2320 *) sh_cpu_target=sh1 ;;
2321 esac
2322 # did the user say --without-fp ?
2323 if test x$with_fp = xno; then
2324 case ${sh_cpu_target} in
2325 sh5-*media) sh_cpu_target=${sh_cpu_target}-nofpu ;;
2326 sh4al | sh1) ;;
2327 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
2328 sh4*) sh_cpu_target=sh4-nofpu ;;
2329 sh3*) sh_cpu_target=sh3 ;;
2330 sh2a*) sh_cpu_target=sh2a-nofpu ;;
2331 sh2*) sh_cpu_target=sh2 ;;
2332 *) echo --without-fp not available for $target: ignored
2333 esac
2334 tm_defines="$tm_defines STRICT_NOFPU=1"
2335 fi
2336 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2337 case $sh_cpu_default in
2338 sh5-64media-nofpu | sh5-64media | \
2339 sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2340 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2341 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2342 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2343 sh3e | sh3 | sh2e | sh2 | sh1) ;;
2344 "") sh_cpu_default=${sh_cpu_target} ;;
2345 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2346 esac
2347 sh_multilibs=${with_multilib_list}
2348 if test "$sh_multilibs" = "default" ; then
2349 case ${target} in
2350 sh64-superh-linux* | \
2351 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
2352 sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2353 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2354 sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
2355 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
2356 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2357 esac
2358 if test x$with_fp = xno; then
2359 sh_multilibs="`echo $sh_multilibs|sed -e s/m4/sh4-nofpu/ -e s/,m4-[^,]*//g -e s/,m[23]e// -e s/m2a,m2a-single/m2a-nofpu/ -e s/m5-..m....,//g`"
2360 fi
2361 fi
2362 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2363 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2364 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2365 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2366 for sh_multilib in ${sh_multilibs}; do
2367 case ${sh_multilib} in
2368 m1 | m2 | m2e | m3 | m3e | \
2369 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2370 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2371 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2372 m5-64media | m5-64media-nofpu | \
2373 m5-32media | m5-32media-nofpu | \
2374 m5-compact | m5-compact-nofpu)
2375 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2376 # It is passed to MULTIILIB_OPTIONS verbatim.
2377 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2378 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2379 ;;
2380 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2381 # It is passed the MULTILIB_EXCEPTIONS verbatim.
2382 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2383 *)
2384 echo "with_multilib_list=${sh_multilib} not supported."
2385 exit 1
2386 ;;
2387 esac
2388 done
2389 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2390 if test x${enable_incomplete_targets} = xyes ; then
2391 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
2392 fi
2393 tm_file="$tm_file ./sysroot-suffix.h"
2394 tmake_file="$tmake_file t-sysroot-suffix"
2395 ;;
2396 sh-*-rtems*)
2397 tmake_file="sh/t-sh sh/t-elf t-rtems sh/t-rtems"
2398 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2399 ;;
2400 sh-wrs-vxworks)
2401 tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
2402 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2403 ;;
2404 sparc-*-elf*)
2405 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
2406 case ${target} in
2407 *-leon-*)
2408 tmake_file="sparc/t-leon"
2409 ;;
2410 *-leon[3-9]*)
2411 tmake_file="sparc/t-leon3"
2412 ;;
2413 *)
2414 tmake_file="sparc/t-elf"
2415 ;;
2416 esac
2417 tmake_file="${tmake_file} sparc/t-crtfm"
2418 extra_parts="crtbegin.o crtend.o"
2419 ;;
2420 sparc-*-rtems*)
2421 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2422 tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
2423 extra_parts="crtbegin.o crtend.o"
2424 ;;
2425 sparc-*-linux*)
2426 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h"
2427 extra_options="${extra_options} sparc/long-double-switch.opt"
2428 case ${target} in
2429 *-leon-*)
2430 tmake_file="${tmake_file} sparc/t-leon"
2431 ;;
2432 *-leon[3-9]*)
2433 tmake_file="${tmake_file} sparc/t-leon3"
2434 ;;
2435 *)
2436 tmake_file="${tmake_file} sparc/t-linux"
2437 ;;
2438 esac
2439 if test x$enable_targets = xall; then
2440 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2441 tmake_file="${tmake_file} sparc/t-linux64"
2442 else
2443 tm_file="${tm_file} sparc/linux.h"
2444 fi
2445 tmake_file="${tmake_file} sparc/t-crtfm"
2446 ;;
2447 sparc-*-netbsdelf*)
2448 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2449 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2450 extra_options="${extra_options} sparc/long-double-switch.opt"
2451 ;;
2452 sparc*-*-solaris2*)
2453 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sol2.h"
2454 case ${target} in
2455 *-*-solaris2.1[0-9]*)
2456 tm_file="${tm_file} sol2-10.h"
2457 use_gcc_stdint=wrap
2458 ;;
2459 *)
2460 use_gcc_stdint=provide
2461 ;;
2462 esac
2463 tm_file="${tm_file} sparc/sol2.h"
2464 case ${target} in
2465 sparc64-*-* | sparcv9-*-*)
2466 tm_file="${tm_file} sparc/sol2-64.h"
2467 ;;
2468 *)
2469 test x$with_cpu != x || with_cpu=v9
2470 ;;
2471 esac
2472 tm_file="${tm_file} sparc/sol2-bi.h"
2473 if test x$gas = xyes; then
2474 tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
2475 fi
2476 if test x$gnu_ld = xyes; then
2477 tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h"
2478 fi
2479 tm_file="${tm_file} tm-dwarf2.h"
2480 tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
2481 if test x$gnu_ld = xyes; then
2482 tmake_file="$tmake_file t-slibgcc-elf-ver"
2483 else
2484 tmake_file="$tmake_file t-slibgcc-sld"
2485 fi
2486 if test x$gas = xyes; then
2487 tm_file="usegas.h ${tm_file}"
2488 fi
2489 c_target_objs="sol2-c.o"
2490 cxx_target_objs="sol2-c.o"
2491 extra_objs="sol2.o"
2492 tm_p_file="${tm_p_file} sol2-protos.h"
2493 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2494 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
2495 "":yes:* | yes:yes:* )
2496 thread_file=posix
2497 ;;
2498 esac
2499 ;;
2500 sparc-wrs-vxworks)
2501 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2502 tmake_file="${tmake_file} sparc/t-vxworks"
2503 ;;
2504 sparc64-*-elf*)
2505 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2506 extra_options="${extra_options} sparc/little-endian.opt"
2507 tmake_file="${tmake_file} sparc/t-crtfm"
2508 extra_parts="crtbegin.o crtend.o"
2509 ;;
2510 sparc64-*-rtems*)
2511 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
2512 extra_options="${extra_options} sparc/little-endian.opt"
2513 tmake_file="${tmake_file} sparc/t-crtfm t-rtems"
2514 extra_parts="crtbegin.o crtend.o"
2515 ;;
2516 sparc64-*-linux*)
2517 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/linux64.h"
2518 extra_options="${extra_options} sparc/long-double-switch.opt"
2519 tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
2520 ;;
2521 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2522 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2523 extra_options="${extra_options} sparc/long-double-switch.opt"
2524 tmake_file="${tmake_file} sparc/t-crtfm"
2525 case "x$with_cpu" in
2526 xultrasparc) ;;
2527 x) with_cpu=ultrasparc ;;
2528 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2529 esac
2530 ;;
2531 sparc64-*-netbsd*)
2532 tm_file="sparc/biarch64.h ${tm_file}"
2533 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2534 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2535 extra_options="${extra_options} sparc/long-double-switch.opt"
2536 tmake_file="${tmake_file} sparc/t-netbsd64"
2537 ;;
2538 sparc64-*-openbsd*)
2539 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
2540 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2541 extra_options="${extra_options} openbsd.opt"
2542 extra_options="${extra_options} sparc/little-endian.opt"
2543 gas=yes gnu_ld=yes
2544 with_cpu=ultrasparc
2545 ;;
2546 spu-*-elf*)
2547 tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2548 tmake_file="spu/t-spu-elf"
2549 extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2550 extra_modes=spu/spu-modes.def
2551 c_target_objs="${c_target_objs} spu-c.o"
2552 cxx_target_objs="${cxx_target_objs} spu-c.o"
2553 ;;
2554 v850e1-*-*)
2555 target_cpu_default="TARGET_CPU_v850e1"
2556 tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2557 tm_p_file=v850/v850-protos.h
2558 tmake_file=v850/t-v850e
2559 md_file=v850/v850.md
2560 extra_modes=v850/v850-modes.def
2561 out_file=v850/v850.c
2562 extra_options="${extra_options} v850/v850.opt"
2563 if test x$stabs = xyes
2564 then
2565 tm_file="${tm_file} dbx.h"
2566 fi
2567 use_collect2=no
2568 c_target_objs="v850-c.o"
2569 cxx_target_objs="v850-c.o"
2570 use_gcc_stdint=wrap
2571 ;;
2572 v850e-*-*)
2573 target_cpu_default="TARGET_CPU_v850e"
2574 tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2575 tm_p_file=v850/v850-protos.h
2576 tmake_file=v850/t-v850e
2577 md_file=v850/v850.md
2578 extra_modes=v850/v850-modes.def
2579 out_file=v850/v850.c
2580 extra_options="${extra_options} v850/v850.opt"
2581 if test x$stabs = xyes
2582 then
2583 tm_file="${tm_file} dbx.h"
2584 fi
2585 use_collect2=no
2586 c_target_objs="v850-c.o"
2587 cxx_target_objs="v850-c.o"
2588 use_gcc_stdint=wrap
2589 ;;
2590 v850-*-*)
2591 target_cpu_default="TARGET_CPU_generic"
2592 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2593 tmake_file=v850/t-v850
2594 if test x$stabs = xyes
2595 then
2596 tm_file="${tm_file} dbx.h"
2597 fi
2598 use_collect2=no
2599 c_target_objs="v850-c.o"
2600 cxx_target_objs="v850-c.o"
2601 use_gcc_stdint=wrap
2602 ;;
2603 vax-*-linux*)
2604 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
2605 extra_options="${extra_options} vax/elf.opt"
2606 tmake_file="${tmake_file} vax/t-linux"
2607 ;;
2608 vax-*-netbsdelf*)
2609 tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2610 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
2611 ;;
2612 vax-*-openbsd*)
2613 tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2614 extra_options="${extra_options} openbsd.opt"
2615 use_collect2=yes
2616 ;;
2617 xstormy16-*-elf)
2618 # For historical reasons, the target files omit the 'x'.
2619 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
2620 tm_p_file=stormy16/stormy16-protos.h
2621 md_file=stormy16/stormy16.md
2622 out_file=stormy16/stormy16.c
2623 extra_options=stormy16/stormy16.opt
2624 tmake_file="stormy16/t-stormy16"
2625 extra_parts="crtbegin.o crtend.o"
2626 ;;
2627 xtensa*-*-elf*)
2628 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
2629 extra_options="${extra_options} xtensa/elf.opt"
2630 tmake_file="xtensa/t-xtensa xtensa/t-elf"
2631 ;;
2632 xtensa*-*-linux*)
2633 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
2634 tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
2635 ;;
2636 am33_2.0-*-linux*)
2637 tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2638 tmake_file="${tmake_file} mn10300/t-linux"
2639 gas=yes gnu_ld=yes
2640 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2641 use_collect2=no
2642 ;;
2643 m32c-*-rtems*)
2644 tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2645 tmake_file="${tmake_file} t-rtems"
2646 c_target_objs="m32c-pragma.o"
2647 cxx_target_objs="m32c-pragma.o"
2648 ;;
2649 m32c-*-elf*)
2650 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2651 c_target_objs="m32c-pragma.o"
2652 cxx_target_objs="m32c-pragma.o"
2653 ;;
2654 *)
2655 echo "*** Configuration ${target} not supported" 1>&2
2656 exit 1
2657 ;;
2658 esac
2659
2660 case ${target} in
2661 i[34567]86-*-linux* | x86_64-*-linux*)
2662 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2663 ;;
2664 i[34567]86-*-* | x86_64-*-*)
2665 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2666 ;;
2667 powerpc*-*-* | rs6000-*-*)
2668 tm_file="${tm_file} rs6000/option-defaults.h"
2669 esac
2670
2671 if [ "$target_has_targetcm" = "no" ]; then
2672 c_target_objs="$c_target_objs default-c.o"
2673 cxx_target_objs="$cxx_target_objs default-c.o"
2674 fi
2675
2676 # Support for --with-cpu and related options (and a few unrelated options,
2677 # too).
2678 case ${with_cpu} in
2679 yes | no)
2680 echo "--with-cpu must be passed a value" 1>&2
2681 exit 1
2682 ;;
2683 esac
2684
2685 # Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
2686 # to generic if there is no processor scheduler model for the target.
2687 arch=
2688 cpu=
2689 arch_without_sse2=no
2690 arch_without_64bit=no
2691 case ${target} in
2692 i386-*-freebsd*)
2693 if test $fbsd_major -ge 6; then
2694 arch=i486
2695 else
2696 arch=i386
2697 fi
2698 cpu=generic
2699 arch_without_sse2=yes
2700 arch_without_64bit=yes
2701 ;;
2702 i386-*-*)
2703 arch=i386
2704 cpu=i386
2705 arch_without_sse2=yes
2706 arch_without_64bit=yes
2707 ;;
2708 i486-*-*)
2709 arch=i486
2710 cpu=i486
2711 arch_without_sse2=yes
2712 arch_without_64bit=yes
2713 ;;
2714 i586-*-*)
2715 arch_without_sse2=yes
2716 arch_without_64bit=yes
2717 case ${target_noncanonical} in
2718 k6_2-*)
2719 arch=k6-2
2720 cpu=k6-2
2721 ;;
2722 k6_3-*)
2723 arch=k6-3
2724 cpu=k6-3
2725 ;;
2726 k6-*)
2727 arch=k6
2728 cpu=k6
2729 ;;
2730 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2731 arch=pentium-mmx
2732 cpu=pentium-mmx
2733 ;;
2734 *)
2735 arch=pentium
2736 cpu=pentium
2737 ;;
2738 esac
2739 ;;
2740 i686-*-* | i786-*-*)
2741 case ${target_noncanonical} in
2742 bdver1-*)
2743 arch=bdver1
2744 cpu=bdver1
2745 ;;
2746 btver1-*)
2747 arch=btver1
2748 cpu=btver1
2749 ;;
2750 amdfam10-*|barcelona-*)
2751 arch=amdfam10
2752 cpu=amdfam10
2753 ;;
2754 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2755 arch=k8-sse3
2756 cpu=k8-sse3
2757 ;;
2758 k8-*|opteron-*|athlon64-*|athlon_fx-*)
2759 arch=k8
2760 cpu=k8
2761 ;;
2762 athlon_xp-*|athlon_mp-*|athlon_4-*)
2763 arch=athlon-4
2764 cpu=athlon-4
2765 arch_without_sse2=yes
2766 arch_without_64bit=yes
2767 ;;
2768 athlon_tbird-*|athlon-*)
2769 arch=athlon
2770 cpu=athlon
2771 arch_without_sse2=yes
2772 ;;
2773 geode-*)
2774 arch=geode
2775 cpu=geode
2776 arch_without_sse2=yes
2777 ;;
2778 pentium2-*)
2779 arch=pentium2
2780 cpu=pentium2
2781 arch_without_sse2=yes
2782 ;;
2783 pentium3-*|pentium3m-*)
2784 arch=pentium3
2785 cpu=pentium3
2786 arch_without_sse2=yes
2787 ;;
2788 pentium4-*|pentium4m-*)
2789 arch=pentium4
2790 cpu=pentium4
2791 ;;
2792 prescott-*)
2793 arch=prescott
2794 cpu=prescott
2795 ;;
2796 nocona-*)
2797 arch=nocona
2798 cpu=nocona
2799 ;;
2800 atom-*)
2801 arch=atom
2802 cpu=atom
2803 ;;
2804 core2-*)
2805 arch=core2
2806 cpu=core2
2807 ;;
2808 corei7-*)
2809 arch=corei7
2810 cpu=corei7
2811 ;;
2812 corei7_avx-*)
2813 arch=corei7-avx
2814 cpu=corei7-avx
2815 ;;
2816 pentium_m-*)
2817 arch=pentium-m
2818 cpu=pentium-m
2819 ;;
2820 pentiumpro-*)
2821 arch=pentiumpro
2822 cpu=pentiumpro
2823 arch_without_sse2=yes
2824 ;;
2825 *)
2826 arch=pentiumpro
2827 cpu=generic
2828 arch_without_sse2=yes
2829 arch_without_64bit=yes
2830 ;;
2831 esac
2832 ;;
2833 x86_64-*-*)
2834 case ${target_noncanonical} in
2835 bdver1-*)
2836 arch=bdver1
2837 cpu=bdver1
2838 ;;
2839 btver1-*)
2840 arch=btver1
2841 cpu=btver1
2842 ;;
2843 amdfam10-*|barcelona-*)
2844 arch=amdfam10
2845 cpu=amdfam10
2846 ;;
2847 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2848 arch=k8-sse3
2849 cpu=k8-sse3
2850 ;;
2851 k8-*|opteron-*|athlon_64-*)
2852 arch=k8
2853 cpu=k8
2854 ;;
2855 nocona-*)
2856 arch=nocona
2857 cpu=nocona
2858 ;;
2859 atom-*)
2860 arch=atom
2861 cpu=atom
2862 ;;
2863 core2-*)
2864 arch=core2
2865 cpu=core2
2866 ;;
2867 corei7-*)
2868 arch=corei7
2869 cpu=corei7
2870 ;;
2871 *)
2872 arch=x86-64
2873 cpu=generic
2874 ;;
2875 esac
2876 ;;
2877 esac
2878
2879 # If there is no $with_cpu option, try to infer one from ${target}.
2880 # This block sets nothing except for with_cpu.
2881 if test x$with_cpu = x ; then
2882 case ${target} in
2883 i[34567]86-*-*|x86_64-*-*)
2884 with_cpu=$cpu
2885 ;;
2886 alphaev6[78]*-*-*)
2887 with_cpu=ev67
2888 ;;
2889 alphaev6*-*-*)
2890 with_cpu=ev6
2891 ;;
2892 alphapca56*-*-*)
2893 with_cpu=pca56
2894 ;;
2895 alphaev56*-*-*)
2896 with_cpu=ev56
2897 ;;
2898 alphaev5*-*-*)
2899 with_cpu=ev5
2900 ;;
2901 frv-*-*linux* | frv400-*-*linux*)
2902 with_cpu=fr400
2903 ;;
2904 frv550-*-*linux*)
2905 with_cpu=fr550
2906 ;;
2907 m68k*-*-*)
2908 case "$with_arch" in
2909 "cf")
2910 with_cpu=${default_cf_cpu}
2911 ;;
2912 "" | "m68k")
2913 with_cpu=m${default_m68k_cpu}
2914 ;;
2915 esac
2916 ;;
2917 mips*-*-vxworks)
2918 with_arch=mips2
2919 ;;
2920 sparc-leon*-*)
2921 with_cpu=v8;
2922 ;;
2923 sparc*-*-*)
2924 with_cpu="`echo ${target} | sed 's/-.*$//'`"
2925 ;;
2926 esac
2927
2928 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
2929 case ${target} in
2930 i[34567]86-*-*|x86_64-*-*)
2931 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
2932 if test x$with_cpu_32 = x; then
2933 with_cpu_32=$with_cpu
2934 fi
2935 if test x$with_cpu_64 = x; then
2936 with_cpu_64=$with_cpu
2937 fi
2938 with_cpu=
2939 fi
2940 ;;
2941 esac
2942 fi
2943
2944 # Support for --with-arch and related options (and a few unrelated options,
2945 # too).
2946 case ${with_arch} in
2947 yes | no)
2948 echo "--with-arch must be passed a value" 1>&2
2949 exit 1
2950 ;;
2951 esac
2952
2953 # If there is no $with_arch option, try to infer one from ${target}.
2954 # This block sets nothing except for with_arch.
2955 if test x$with_arch = x ; then
2956 case ${target} in
2957 i[34567]86-*-darwin*|x86_64-*-darwin*)
2958 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2959 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2960 ;;
2961 i[34567]86-*-*)
2962 # --with-fpmath sets the default ISA to SSE2, which is the same
2963 # ISA supported by Pentium 4.
2964 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
2965 with_arch=$arch
2966 else
2967 with_arch=pentium4
2968 fi
2969 ;;
2970 x86_64-*-*)
2971 with_arch=$arch
2972 ;;
2973 esac
2974
2975 # Avoid overriding --with-arch-32 and --with-arch-64 values.
2976 case ${target} in
2977 i[34567]86-*-darwin*|x86_64-*-darwin*)
2978 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2979 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2980 ;;
2981 i[34567]86-*-*|x86_64-*-*)
2982 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
2983 if test x$with_arch_32 = x; then
2984 with_arch_32=$with_arch
2985 fi
2986 if test x$with_arch_64 = x; then
2987 if test $arch_without_64bit = yes; then
2988 # Set the default 64bit arch to x86-64 if the default arch
2989 # doesn't support 64bit.
2990 with_arch_64=x86-64
2991 else
2992 with_arch_64=$with_arch
2993 fi
2994 fi
2995 with_arch=
2996 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
2997 # Set the default 64bit arch to x86-64 if the default arch
2998 # doesn't support 64bit and we need 64bit ISA.
2999 with_arch_32=$with_arch
3000 with_arch_64=x86-64
3001 with_arch=
3002 fi
3003 ;;
3004 esac
3005 fi
3006
3007 # Support --with-fpmath.
3008 if test x$with_fpmath != x; then
3009 case ${target} in
3010 i[34567]86-*-* | x86_64-*-*)
3011 case ${with_fpmath} in
3012 avx)
3013 tm_file="${tm_file} i386/avxmath.h"
3014 ;;
3015 sse)
3016 tm_file="${tm_file} i386/ssemath.h"
3017 ;;
3018 *)
3019 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3020 exit 1
3021 ;;
3022 esac
3023 ;;
3024 *)
3025 echo "--with-fpmath isn't supported for $target." 1>&2
3026 exit 1
3027 ;;
3028 esac
3029 fi
3030
3031 # Similarly for --with-schedule.
3032 if test x$with_schedule = x; then
3033 case ${target} in
3034 hppa1*)
3035 # Override default PA8000 scheduling model.
3036 with_schedule=7100LC
3037 ;;
3038 esac
3039 fi
3040
3041 # Validate and mark as valid any --with options supported
3042 # by this target. In order to use a particular --with option
3043 # you must list it in supported_defaults; validating the value
3044 # is optional. This case statement should set nothing besides
3045 # supported_defaults.
3046
3047 supported_defaults=
3048 case "${target}" in
3049 alpha*-*-*)
3050 supported_defaults="cpu tune"
3051 for which in cpu tune; do
3052 eval "val=\$with_$which"
3053 case "$val" in
3054 "" \
3055 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3056 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3057 | 21264a)
3058 ;;
3059 *)
3060 echo "Unknown CPU used in --with-$which=$val" 1>&2
3061 exit 1
3062 ;;
3063 esac
3064 done
3065 ;;
3066
3067 arm*-*-*)
3068 supported_defaults="arch cpu float tune fpu abi mode"
3069 for which in cpu tune; do
3070 # See if it matches any of the entries in arm-cores.def
3071 eval "val=\$with_$which"
3072 if [ x"$val" = x ] \
3073 || grep "^ARM_CORE(\"$val\"," \
3074 ${srcdir}/config/arm/arm-cores.def \
3075 > /dev/null; then
3076 # Ok
3077 new_val=`grep "^ARM_CORE(\"$val\"," \
3078 ${srcdir}/config/arm/arm-cores.def | \
3079 sed -e 's/^[^,]*,[ ]*//' | \
3080 sed -e 's/,.*$//'`
3081 eval "target_${which}_cname=$new_val"
3082 echo "For $val real value is $new_val"
3083 true
3084 else
3085 echo "Unknown CPU used in --with-$which=$val" 1>&2
3086 exit 1
3087 fi
3088 done
3089
3090 case "$with_arch" in
3091 "" \
3092 | armv[23456] | armv2a | armv3m | armv4t | armv5t \
3093 | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
3094 | armv7 | armv7-a | armv7-r | armv7-m \
3095 | iwmmxt | ep9312)
3096 # OK
3097 ;;
3098 *)
3099 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3100 exit 1
3101 ;;
3102 esac
3103
3104 case "$with_float" in
3105 "" \
3106 | soft | hard | softfp)
3107 # OK
3108 ;;
3109 *)
3110 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3111 exit 1
3112 ;;
3113 esac
3114
3115 case "$with_fpu" in
3116 "" \
3117 | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 \
3118 | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3119 | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
3120 | fpv4-sp-d16 | neon-vfpv4)
3121 # OK
3122 ;;
3123 *)
3124 echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3125 exit 1
3126 ;;
3127 esac
3128
3129 case "$with_abi" in
3130 "" \
3131 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3132 #OK
3133 ;;
3134 *)
3135 echo "Unknown ABI used in --with-abi=$with_abi"
3136 exit 1
3137 ;;
3138 esac
3139
3140 case "$with_mode" in
3141 "" \
3142 | arm | thumb )
3143 #OK
3144 ;;
3145 *)
3146 echo "Unknown mode used in --with-mode=$with_mode"
3147 exit 1
3148 ;;
3149 esac
3150
3151 if test "x$with_arch" != x && test "x$with_cpu" != x; then
3152 echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3153 fi
3154 ;;
3155
3156 fr*-*-*linux*)
3157 supported_defaults=cpu
3158 case "$with_cpu" in
3159 fr400) ;;
3160 fr550) ;;
3161 *)
3162 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3163 exit 1
3164 ;;
3165 esac
3166 ;;
3167
3168 fido-*-* | m68k*-*-*)
3169 supported_defaults="arch cpu"
3170 case "$with_arch" in
3171 "" | "m68k"| "cf")
3172 m68k_arch_family="$with_arch"
3173 ;;
3174 *)
3175 echo "Invalid --with-arch=$with_arch" 1>&2
3176 exit 1
3177 ;;
3178 esac
3179
3180 # We always have a $with_cpu setting here.
3181 case "$with_cpu" in
3182 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3183 m68k_cpu_ident=$with_cpu
3184 ;;
3185 "m68020-40")
3186 m68k_cpu_ident=m68020
3187 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3188 ;;
3189 "m68020-60")
3190 m68k_cpu_ident=m68020
3191 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3192 ;;
3193 *)
3194 # We need the C identifier rather than the string.
3195 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3196 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3197 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3198 ${srcdir}/config/m68k/m68k-devices.def`
3199 if [ x"$m68k_cpu_ident" = x ] ; then
3200 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3201 exit 1
3202 fi
3203 with_cpu="mcpu=$with_cpu"
3204 ;;
3205 esac
3206 ;;
3207
3208 hppa*-*-*)
3209 supported_defaults="arch schedule"
3210
3211 case "$with_arch" in
3212 "" | 1.0 | 1.1 | 2.0)
3213 # OK
3214 ;;
3215 *)
3216 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3217 exit 1
3218 ;;
3219 esac
3220
3221 case "$with_schedule" in
3222 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3223 # OK
3224 ;;
3225 *)
3226 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3227 exit 1
3228 ;;
3229 esac
3230 ;;
3231
3232 i[34567]86-*-* | x86_64-*-*)
3233 supported_defaults="arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3234 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3235 eval "val=\$with_$which"
3236 case ${val} in
3237 i386 | i486 \
3238 | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3239 | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3240 | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
3241 | athlon-4 | athlon-xp | athlon-mp | geode \
3242 | prescott | pentium-m | pentium4m | pentium3m)
3243 case "${target}" in
3244 x86_64-*-*)
3245 case "x$which" in
3246 *_32)
3247 ;;
3248 *)
3249 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3250 exit 1
3251 ;;
3252 esac
3253 ;;
3254 esac
3255 # OK
3256 ;;
3257 "" | x86-64 | generic | native \
3258 | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
3259 | opteron-sse3 | athlon-fx | bdver1 | btver1 | amdfam10 \
3260 | barcelona | nocona | core2 | corei7 | corei7-avx | atom)
3261 # OK
3262 ;;
3263 *)
3264 echo "Unknown CPU given in --with-$which=$val." 1>&2
3265 exit 1
3266 ;;
3267 esac
3268 done
3269 ;;
3270
3271 mips*-*-*)
3272 supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64 divide llsc mips-plt synci"
3273
3274 case ${with_float} in
3275 "" | soft | hard)
3276 # OK
3277 ;;
3278 *)
3279 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3280 exit 1
3281 ;;
3282 esac
3283
3284 case ${with_abi} in
3285 "" | 32 | o64 | n32 | 64 | eabi)
3286 # OK
3287 ;;
3288 *)
3289 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3290 exit 1
3291 ;;
3292 esac
3293
3294 case ${with_divide} in
3295 "" | breaks | traps)
3296 # OK
3297 ;;
3298 *)
3299 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3300 exit 1
3301 ;;
3302 esac
3303
3304 case ${with_llsc} in
3305 yes)
3306 with_llsc=llsc
3307 ;;
3308 no)
3309 with_llsc="no-llsc"
3310 ;;
3311 "")
3312 # OK
3313 ;;
3314 *)
3315 echo "Unknown llsc type used in --with-llsc" 1>&2
3316 exit 1
3317 ;;
3318 esac
3319
3320 case ${with_mips_plt} in
3321 yes)
3322 with_mips_plt=plt
3323 ;;
3324 no)
3325 with_mips_plt=no-plt
3326 ;;
3327 "")
3328 ;;
3329 *)
3330 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3331 exit 1
3332 ;;
3333 esac
3334
3335 case ${with_synci} in
3336 yes)
3337 with_synci=synci
3338 ;;
3339 "" | no)
3340 # No is the default.
3341 with_synci=no-synci
3342 ;;
3343 *)
3344 echo "Unknown synci type used in --with-synci" 1>&2
3345 exit 1
3346 ;;
3347 esac
3348 ;;
3349
3350 powerpc*-*-* | rs6000-*-*)
3351 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3352
3353 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3354 eval "val=\$with_$which"
3355 case ${val} in
3356 default32 | default64)
3357 case $which in
3358 cpu | tune)
3359 ;;
3360 *)
3361 echo "$val only valid for --with-cpu and --with-tune." 1>&2
3362 exit 1
3363 ;;
3364 esac
3365 with_which="with_$which"
3366 eval $with_which=
3367 ;;
3368 405cr)
3369 tm_defines="${tm_defines} CONFIG_PPC405CR"
3370 eval "with_$which=405"
3371 ;;
3372 "" | common \
3373 | power | power[234567] | power6x | powerpc | powerpc64 \
3374 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3375 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3376 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3377 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3378 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | titan\
3379 | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3380 # OK
3381 ;;
3382 *)
3383 echo "Unknown cpu used in --with-$which=$val." 1>&2
3384 exit 1
3385 ;;
3386 esac
3387 done
3388 ;;
3389
3390 s390*-*-*)
3391 supported_defaults="arch mode tune"
3392
3393 for which in arch tune; do
3394 eval "val=\$with_$which"
3395 case ${val} in
3396 "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196)
3397 # OK
3398 ;;
3399 *)
3400 echo "Unknown cpu used in --with-$which=$val." 1>&2
3401 exit 1
3402 ;;
3403 esac
3404 done
3405
3406 case ${with_mode} in
3407 "" | esa | zarch)
3408 # OK
3409 ;;
3410 *)
3411 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3412 exit 1
3413 ;;
3414 esac
3415 ;;
3416
3417 sh[123456ble]-*-* | sh-*-*)
3418 supported_defaults="cpu"
3419 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3420 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3421 # OK
3422 ;;
3423 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3424 ;;
3425 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3426 ;;
3427 *)
3428 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
3429 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3430 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3431 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3432 exit 1
3433 ;;
3434 esac
3435 ;;
3436 sparc*-*-*)
3437 supported_defaults="cpu float tune"
3438
3439 for which in cpu tune; do
3440 eval "val=\$with_$which"
3441 case ${val} in
3442 "" | sparc | sparcv9 | sparc64 \
3443 | v7 | cypress \
3444 | v8 | supersparc | hypersparc | leon \
3445 | sparclite | f930 | f934 | sparclite86x \
3446 | sparclet | tsc701 \
3447 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
3448 # OK
3449 ;;
3450 *)
3451 echo "Unknown cpu used in --with-$which=$val" 1>&2
3452 exit 1
3453 ;;
3454 esac
3455 done
3456
3457 case ${with_float} in
3458 "" | soft | hard)
3459 # OK
3460 ;;
3461 *)
3462 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3463 exit 1
3464 ;;
3465 esac
3466 ;;
3467
3468 spu-*-*)
3469 supported_defaults="arch tune"
3470
3471 for which in arch tune; do
3472 eval "val=\$with_$which"
3473 case ${val} in
3474 "" | cell | celledp)
3475 # OK
3476 ;;
3477 *)
3478 echo "Unknown cpu used in --with-$which=$val." 1>&2
3479 exit 1
3480 ;;
3481 esac
3482 done
3483 ;;
3484
3485 v850*-*-*)
3486 supported_defaults=cpu
3487 case ${with_cpu} in
3488 "" | v850e | v850e1)
3489 # OK
3490 ;;
3491 *)
3492 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3493 exit 1
3494 ;;
3495 esac
3496 ;;
3497 esac
3498
3499 # Set some miscellaneous flags for particular targets.
3500 target_cpu_default2=
3501 case ${target} in
3502 alpha*-*-*)
3503 if test x$gas = xyes
3504 then
3505 target_cpu_default2="MASK_GAS"
3506 fi
3507 ;;
3508
3509 arm*-*-*)
3510 if test x$target_cpu_cname = x
3511 then
3512 target_cpu_default2=TARGET_CPU_generic
3513 else
3514 target_cpu_default2=TARGET_CPU_$target_cpu_cname
3515 fi
3516 ;;
3517
3518 hppa*-*-*)
3519 target_cpu_default2="MASK_BIG_SWITCH"
3520 if test x$gas = xyes
3521 then
3522 target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
3523 fi
3524 ;;
3525
3526 fido*-*-* | m68k*-*-*)
3527 target_cpu_default2=$m68k_cpu_ident
3528 if [ x"$m68k_arch_family" != x ]; then
3529 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3530 fi
3531 ;;
3532
3533 i[34567]86-*-darwin* | x86_64-*-darwin*)
3534 tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3535 ;;
3536 i[34567]86-*-linux* | x86_64-*-linux* | \
3537 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
3538 i[34567]86-*-gnu*)
3539 tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
3540 ;;
3541 i[34567]86-*-solaris2*)
3542 tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3543 ;;
3544 i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
3545 tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3546 ;;
3547 i[34567]86-*-freebsd* | x86_64-*-freebsd*)
3548 tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
3549 ;;
3550 ia64*-*-linux*)
3551 tmake_file="${tmake_file} ia64/t-fprules-softfp soft-fp/t-softfp"
3552 ;;
3553
3554 mips*-*-*)
3555 if test x$gnu_ld = xyes
3556 then
3557 target_cpu_default2="MASK_SPLIT_ADDRESSES"
3558 fi
3559 case ${target} in
3560 mips*el-*-*)
3561 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3562 ;;
3563 esac
3564 tmake_file="mips/t-mips $tmake_file"
3565 ;;
3566
3567 powerpc*-*-* | rs6000-*-*)
3568 # FIXME: The PowerPC port uses the value set at compile time,
3569 # although it's only cosmetic.
3570 if test "x$with_cpu" != x
3571 then
3572 target_cpu_default2="\\\"$with_cpu\\\""
3573 fi
3574 out_file=rs6000/rs6000.c
3575 c_target_objs="${c_target_objs} rs6000-c.o"
3576 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3577 tmake_file="rs6000/t-rs6000 ${tmake_file}"
3578
3579 if test x$enable_e500_double = xyes
3580 then
3581 tm_file="$tm_file rs6000/e500-double.h"
3582 fi
3583 ;;
3584
3585 sh[123456ble]*-*-* | sh-*-*)
3586 c_target_objs="${c_target_objs} sh-c.o"
3587 cxx_target_objs="${cxx_target_objs} sh-c.o"
3588 ;;
3589
3590 sparc-leon*-*)
3591 if test x$with_tune = x ; then
3592 with_tune=leon;
3593 fi
3594
3595 # The SPARC port checks this value at compile-time.
3596 target_cpu_default2="TARGET_CPU_$with_cpu"
3597 ;;
3598
3599 sparc*-*-*)
3600 # Some standard aliases.
3601 case x$with_cpu in
3602 xsparc)
3603 with_cpu=v7
3604 ;;
3605 xsparcv9 | xsparc64)
3606 with_cpu=v9
3607 ;;
3608 esac
3609
3610 # The SPARC port checks this value at compile-time.
3611 target_cpu_default2="TARGET_CPU_$with_cpu"
3612 ;;
3613
3614 v850*-*-*)
3615 # FIXME: The v850 is "special" in that it does not support
3616 # runtime CPU selection, only --with-cpu.
3617 case "x$with_cpu" in
3618 x)
3619 ;;
3620 xv850e)
3621 target_cpu_default2="TARGET_CPU_$with_cpu"
3622 ;;
3623 esac
3624 ;;
3625 esac
3626
3627 t=
3628 all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc mips-plt synci"
3629 for option in $all_defaults
3630 do
3631 eval "val=\$with_"`echo $option | sed s/-/_/g`
3632 if test -n "$val"; then
3633 case " $supported_defaults " in
3634 *" $option "*)
3635 ;;
3636 *)
3637 echo "This target does not support --with-$option." 2>&1
3638 echo "Valid --with options are: $supported_defaults" 2>&1
3639 exit 1
3640 ;;
3641 esac
3642
3643 if test "x$t" = x
3644 then
3645 t="{ \"$option\", \"$val\" }"
3646 else
3647 t="${t}, { \"$option\", \"$val\" }"
3648 fi
3649 fi
3650 done
3651
3652 if test "x$t" = x
3653 then
3654 configure_default_options="{ { NULL, NULL} }"
3655 else
3656 configure_default_options="{ ${t} }"
3657 fi
3658
3659 if test "$target_cpu_default2" != ""
3660 then
3661 if test "$target_cpu_default" != ""
3662 then
3663 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3664 else
3665 target_cpu_default=$target_cpu_default2
3666 fi
3667 fi