1 # SPDX-License-Identifier: GPL-3.0-or-later
2 # GCC target-specific configuration file.
3 # Copyright (C) 1997-2022 Free Software Foundation, Inc.
5 #This file is part of GCC.
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
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
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/>.
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.
27 # When you change the cases in the OS or target switches, consider
28 # updating ../libgcc/config.host also.
30 # This file switches on the shell variable ${target}, and also uses the
31 # following shell variables:
33 # with_* Various variables as set by configure.
35 # enable_threads Either the name, yes or no depending on whether
36 # threads support was requested.
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.
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.
58 # gas_flag Either yes or no depending on whether GNU as was
61 # gnu_ld_flag Either yes or no depending on whether GNU ld was
64 # This file sets the following shell variables for use by the
65 # autoconf-generated configure script:
67 # cpu_type The name of the cpu, if different from the first
68 # chunk of the canonical target name.
70 # tm_defines List of target macros to define for all compilations.
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}.
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.
87 # tm_p_file Location of file with declarations for functions
90 # tm_d_file A list of headers with definitions of target hook
91 # macros for the D compiler.
93 # out_file The name of the machine description C support
94 # file, if different from "$cpu_type/$cpu_type.c".
96 # common_out_file The name of the source file for code shared between
97 # the compiler proper and the driver.
99 # md_file The name of the machine-description file, if
100 # different from "$cpu_type/$cpu_type.md".
102 # tmake_file A list of machine-description-specific
103 # makefile-fragments, if different from
104 # "$cpu_type/t-$cpu_type".
106 # extra_modes The name of the file containing a list of extra
107 # machine modes, if necessary and different from
108 # "$cpu_type/$cpu_type-modes.def".
110 # extra_objs List of extra objects that should be linked into
111 # the compiler proper (cc1, cc1obj, cc1plus)
112 # depending on target.
114 # extra_gcc_objs List of extra objects that should be linked into
115 # the compiler driver (gcc) depending on target.
117 # extra_headers List of used header files from the directory
118 # config/${cpu_type}.
120 # user_headers_inc_next_pre
121 # List of header file names of internal gcc header
122 # files, which should be prefixed by an include_next.
123 # user_headers_inc_next_post
124 # List of header file names of internal gcc header
125 # files, which should be postfixed by an include_next.
126 # use_gcc_tgmath If set, add tgmath.h to the list of used header
129 # use_gcc_stdint If "wrap", install a version of stdint.h that
130 # wraps the system's copy for hosted compilations;
131 # if "provide", provide a version of systems without
132 # such a system header; otherwise "none", do not
133 # provide such a header at all.
135 # extra_programs List of extra executables compiled for this target
136 # machine, used when linking.
138 # extra_options List of target-dependent .opt files.
140 # c_target_objs List of extra target-dependent objects that be
141 # linked into the C compiler only.
143 # cxx_target_objs List of extra target-dependent objects that be
144 # linked into the C++ compiler only.
146 # d_target_objs List of extra target-dependent objects that be
147 # linked into the D compiler only.
149 # fortran_target_objs List of extra target-dependent objects that be
150 # linked into the fortran compiler only.
152 # target_gtfiles List of extra source files with type information.
154 # xm_defines List of macros to define when compiling for the
157 # xm_file List of files to include when compiling for the
160 # use_collect2 Set to yes or no, depending on whether collect2
163 # target_cpu_default Set to override the default target model.
165 # gdb_needs_out_file_path
166 # Set to yes if gdb needs a dir command with
167 # `dirname $out_file`.
169 # thread_file Set to control which thread package to use.
171 # gas Set to yes or no depending on whether the target
172 # system normally uses GNU as.
174 # configure_default_options
175 # Set to an initializer for configure_default_options
176 # in configargs.h, based on --with-cpu et cetera.
178 # native_system_header_dir
179 # Where system header files are found for this
180 # target. This defaults to /usr/include. If
181 # the --with-sysroot configure option or the
182 # --sysroot command line option is used this
183 # will be relative to the sysroot.
184 # target_type_format_char
185 # The default character to be used for formatting
187 # .type symbol_name, ${t_t_f_c}<property>
190 # The following variables are used in each case-construct to build up the
191 # outgoing variables:
193 # gnu_ld Set to yes or no depending on whether the target
194 # system normally uses GNU ld.
196 # target_has_targetcm Set to yes or no depending on whether the target
197 # has its own definition of targetcm.
199 # target_has_targetm_common Set to yes or no depending on whether the
200 # target has its own definition of targetm_common.
202 # target_has_targetdm Set to yes or no depending on whether the target
203 # has its own definition of targetdm.
209 user_headers_inc_next_pre=
210 user_headers_inc_next_post=
221 target_has_targetcm=no
222 target_has_targetm_common=yes
223 target_has_targetdm=no
226 # Set this to force installation and use of collect2.
228 # Set this to override the default target model.
230 # Set this if gdb needs a dir command with `dirname $out_file`
231 gdb_needs_out_file_path=
232 # Set this to control which thread package will be used.
234 # Reinitialize these from the flag values every loop pass, since some
235 # configure entries modify them.
237 gnu_ld="$gnu_ld_flag"
238 default_use_cxa_atexit=no
239 default_gnu_indirect_function=no
242 native_system_header_dir=/usr/include
243 target_type_format_char='@'
245 # Don't carry these over build->host->target. Please.
249 # Obsolete configurations.
253 | hppa[12]*-*-hpux10* \
254 | hppa[12]*-*-hpux11* \
257 if test "x$enable_obsolete" != xyes; then
258 echo "*** Configuration ${target} is obsolete." >&2
259 echo "*** Specify --enable-obsolete to build it anyway." >&2
260 echo "*** Support will be REMOVED in the next major release of GCC," >&2
261 echo "*** unless a maintainer comes forward." >&2
266 # Unsupported targets list. Do not put an entry in this list unless
267 # it would otherwise be caught by a more permissive pattern. The list
268 # should be in alphabetical order.
270 # Avoid special cases that are not obsolete
281 | i[34567]86-go32-* \
282 | i[34567]86-*-go32* \
286 | m68k-*-uclinuxoldabi* \
287 | mips64orion*-*-rtems* \
289 | powerpc*-*-linux*paired* \
291 | sparc-hal-solaris2* \
294 | *-*-freebsd[12] | *-*-freebsd[1234].* \
295 | *-*-freebsd*aout* \
303 | *-*-solaris2.[0-9] \
304 | *-*-solaris2.[0-9].* \
309 echo "*** Configuration ${target} not supported" 1>&2
314 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
315 # updated in each machine entry. Also set default extra_headers for some
318 cpu_type=`echo ${target} | sed 's/-.*$//'`
323 tmake_file=m32c/t-m32c
324 target_has_targetm_common=no
328 extra_headers="arm_fp16.h arm_neon.h arm_bf16.h arm_acle.h arm_sve.h"
329 c_target_objs="aarch64-c.o"
330 cxx_target_objs="aarch64-c.o"
331 d_target_objs="aarch64-d.o"
332 extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o aarch64-sve-builtins-sve2.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch-bti-insert.o aarch64-cc-fusion.o"
333 target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.cc \$(srcdir)/config/aarch64/aarch64-sve-builtins.h \$(srcdir)/config/aarch64/aarch64-sve-builtins.cc"
334 target_has_targetm_common=yes
338 extra_options="${extra_options} g.opt"
349 c_target_objs="arc-c.o"
350 cxx_target_objs="arc-c.o"
351 extra_options="${extra_options} arc/arc-tables.opt g.opt"
352 extra_headers="arc-simd.h"
356 extra_objs="arm-builtins.o arm-mve-builtins.o aarch-common.o aarch-bti-insert.o"
357 extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h arm_bf16.h arm_mve_types.h arm_mve.h arm_cde.h"
358 target_type_format_char='%'
359 c_target_objs="arm-c.o"
360 cxx_target_objs="arm-c.o"
361 d_target_objs="arm-d.o"
362 extra_options="${extra_options} arm/arm-tables.opt"
363 target_gtfiles="\$(srcdir)/config/arm/arm-builtins.cc \$(srcdir)/config/arm/arm-mve-builtins.h \$(srcdir)/config/arm/arm-mve-builtins.cc"
367 c_target_objs="avr-c.o"
368 cxx_target_objs="avr-c.o"
377 extra_options="${extra_options} g.opt"
380 target_has_targetm_common=no
382 moxie*) cpu_type=moxie
383 target_has_targetm_common=no
387 extra_headers=math-68881.h
388 extra_options="${extra_options} m68k/m68k-tables.opt"
390 i[34567]86-*-* | x86_64-*-*)
392 c_target_objs="i386-c.o"
393 cxx_target_objs="i386-c.o"
394 d_target_objs="i386-d.o"
395 extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o i386-options.o i386-builtins.o i386-expand.o i386-features.o"
396 target_gtfiles="\$(srcdir)/config/i386/i386-builtins.cc \$(srcdir)/config/i386/i386-expand.cc \$(srcdir)/config/i386/i386-options.cc"
397 extra_options="${extra_options} fused-madd.opt"
398 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
399 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
400 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
401 immintrin.h x86intrin.h avxintrin.h xopintrin.h
402 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
403 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
404 avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
405 rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
406 adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
407 avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
408 shaintrin.h clflushoptintrin.h xsavecintrin.h
409 xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
410 avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
411 avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
412 avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
413 avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
414 clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
415 gfniintrin.h cet.h avx512vbmi2intrin.h
416 avx512vbmi2vlintrin.h avx512vnniintrin.h
417 avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
418 avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
419 pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
420 waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h
421 avx512bf16intrin.h enqcmdintrin.h serializeintrin.h
422 avx512vp2intersectintrin.h avx512vp2intersectvlintrin.h
423 tsxldtrkintrin.h amxtileintrin.h amxint8intrin.h
424 amxbf16intrin.h x86gprintrin.h uintrintrin.h
425 hresetintrin.h keylockerintrin.h avxvnniintrin.h
426 mwaitintrin.h avx512fp16intrin.h avx512fp16vlintrin.h"
429 extra_headers=ia64intrin.h
430 extra_options="${extra_options} g.opt fused-madd.opt"
436 extra_options="${extra_options} g.opt"
440 extra_options="${extra_options} g.opt"
443 extra_headers=math-68881.h
444 extra_options="${extra_options} m68k/m68k-tables.opt"
448 extra_options="${extra_options} g.opt"
452 d_target_objs="mips-d.o"
453 extra_headers="loongson.h loongson-mmiintrin.h msa.h"
454 extra_objs="frame-header-opt.o"
455 extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt"
459 extra_headers="larchintrin.h"
460 extra_objs="loongarch-c.o loongarch-builtins.o loongarch-cpu.o loongarch-opts.o loongarch-def.o"
461 extra_gcc_objs="loongarch-driver.o loongarch-cpu.o loongarch-opts.o loongarch-def.o"
462 extra_options="${extra_options} g.opt fused-madd.opt"
466 extra_headers="nds32_intrinsic.h nds32_isr.h nds32_init.inc"
469 extra_options="${extra_options} nds32/nds32-linux.opt"
472 extra_options="${extra_options} nds32/nds32-elf.opt"
477 extra_objs="nds32-cost.o nds32-intrinsic.o nds32-isr.o nds32-md-auxiliary.o nds32-pipelines-auxiliary.o nds32-predicates.o nds32-memory-manipulation.o nds32-fp-as-gp.o nds32-relax-opt.o nds32-utils.o"
481 extra_options="${extra_options} g.opt"
485 c_target_objs="nvptx-c.o"
486 cxx_target_objs="nvptx-c.o"
487 extra_options="${extra_options} nvptx/nvptx-gen.opt"
494 extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o"
495 extra_objs="${extra_objs} rs6000-call.o rs6000-pcrel-opt.o"
496 extra_objs="${extra_objs} rs6000-builtins.o rs6000-builtin.o"
497 extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
498 extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
499 extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
500 extra_headers="${extra_headers} mmintrin.h x86intrin.h"
501 extra_headers="${extra_headers} pmmintrin.h tmmintrin.h smmintrin.h"
502 extra_headers="${extra_headers} nmmintrin.h immintrin.h x86gprintrin.h"
503 extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
504 extra_headers="${extra_headers} amo.h"
506 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower10|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
510 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
511 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.cc \$(srcdir)/config/rs6000/rs6000-call.cc"
512 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-pcrel-opt.cc"
513 target_gtfiles="$target_gtfiles ./rs6000-builtins.h"
520 extra_objs="riscv-builtins.o riscv-c.o riscv-sr.o riscv-shorten-memrefs.o"
521 d_target_objs="riscv-d.o"
524 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
525 extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o"
526 extra_objs="${extra_objs} rs6000-call.o rs6000-pcrel-opt.o"
527 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.cc \$(srcdir)/config/rs6000/rs6000-call.cc"
528 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-pcrel-opt.cc"
532 c_target_objs="sparc-c.o"
533 cxx_target_objs="sparc-c.o"
534 d_target_objs="sparc-d.o"
535 extra_headers="visintrin.h"
539 d_target_objs="s390-d.o"
540 extra_options="${extra_options} fused-madd.opt"
541 extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
543 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
544 sh[123456789lbe]*-*-* | sh-*-*)
546 extra_options="${extra_options} fused-madd.opt"
547 extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o"
554 extra_headers="c6x_intrinsics.h"
555 extra_options="${extra_options} c6x/c6x-tables.opt"
558 extra_options="${extra_options} fused-madd.opt"
568 tm_file=${cpu_type}/${cpu_type}.h
569 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
571 tm_p_file=${cpu_type}/${cpu_type}-protos.h
575 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-d.h
577 tm_d_file="${tm_d_file} ${cpu_type}/${cpu_type}-d.h"
581 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
583 extra_modes=${cpu_type}/${cpu_type}-modes.def
585 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
587 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
592 tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
595 if test "x$with_multilib_list" = xilp32; then
596 tm_file="aarch64/biarchilp32.h ${tm_file}"
598 tm_file="aarch64/biarchlp64.h ${tm_file}"
602 tm_file="aarch64/biarchilp32.h ${tm_file}"
605 tm_file="aarch64/biarchlp64.h ${tm_file}"
608 echo "Unknown ABI used in --with-abi=$with_abi"
613 if test "x$with_abi" != x; then
614 echo "This target does not support --with-abi."
623 if test "x$with_multilib_list" = xmx32; then
624 tm_file="i386/biarchx32.h ${tm_file}"
626 tm_file="i386/biarch64.h ${tm_file}"
630 tm_file="i386/biarch64.h ${tm_file}"
633 tm_file="i386/biarchx32.h ${tm_file}"
636 echo "Unknown ABI used in --with-abi=$with_abi"
641 tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h"
645 # On a.out targets, we need to use collect2.
652 # Common C libraries.
653 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
655 # 32-bit x86 processors supported by --with-arch=. Each processor
656 # MUST be separated by exactly one space.
657 x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
658 athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
659 i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
660 pentium4 pentium4m pentiumpro prescott lakemont samuel-2 nehemiah \
663 # 64-bit x86 processors supported by --with-arch=. Each processor
664 # MUST be separated by exactly one space.
665 x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
666 bdver3 bdver4 znver1 znver2 znver3 znver4 btver1 btver2 k8 k8-sse3 opteron \
667 opteron-sse3 nocona core2 corei7 corei7-avx core-avx-i core-avx2 atom \
668 slm nehalem westmere sandybridge ivybridge haswell broadwell bonnell \
669 silvermont knl knm skylake-avx512 cannonlake icelake-client icelake-server \
670 skylake goldmont goldmont-plus tremont cascadelake tigerlake cooperlake \
671 sapphirerapids alderlake rocketlake eden-x2 nano nano-1000 nano-2000 nano-3000 \
672 nano-x2 eden-x4 nano-x4 x86-64 x86-64-v2 x86-64-v3 x86-64-v4 native"
674 # Additional x86 processors supported by --with-cpu=. Each processor
675 # MUST be separated by exactly one space.
676 x86_cpus="generic intel"
678 # Common parts for widely ported systems.
681 tmake_file="t-darwin "
682 tm_file="${tm_file} darwin.h"
683 darwin_os=`echo ${target} | sed 's/.*darwin\([0-9.]*\).*$/\1/'`
684 darwin_maj=`expr "$darwin_os" : '\([0-9]*\).*'`
685 macos_min=`expr "$darwin_os" : '[0-9]*\.\([0-9]*\).*'`
687 if test x"${macos_min}" = x; then
691 # Tools hosted on earlier versions of Darwin constrained all object
692 # alignment to be 2^15 or smaller. From Darwin11 (macOS 10.7) the
693 # alignment of non-common is allowed to be up to 2^28. Note that the
694 #Â larger alignment is permitted when targeting 10.6 from 10.7 so that
695 #Â the constraint only need be applied per host (and only if the host
698 *-*-darwin[4-9]* | *-*-darwin10*)
699 tm_defines="$tm_defines L2_MAX_OFILE_ALIGNMENT=15U"
702 tm_defines="$tm_defines L2_MAX_OFILE_ALIGNMENT=28U"
706 # Darwin 4 to 19 correspond to macOS 10.0 to 10.15
707 *-*-darwin[4-9]* | *-*-darwin1[0-9]*)
708 macos_min=`expr $darwin_maj - 4`
711 # Darwin 20 corresponds to macOS 11, Darwin 21 to macOS 12.
712 macos_maj=`expr $darwin_maj - 9`
717 aarch64) macos_maj=11 ;;
718 x86_64) macos_min=6 ;;
722 *-*-darwin*) tm_defines="$tm_defines DARWIN_USE_KERNEL_VERS" ;;
724 # If configuring a cross-compiler then we will have set some
725 #Â default above, but it is probably not what was intended.
726 echo "Warning: Using ${target} is only suitable for Darwin hosts" 1>&2
727 echo "configure with an explicit target version" 1>&2
732 echo "Error: configuring for an unreleased macOS version ${target}" 1>&2
736 tm_defines="$tm_defines DEF_MIN_OSX_VERSION=\\\"${macos_maj}.${macos_min}\\\""
737 tm_defines="$tm_defines DEF_LD64=\\\"${def_ld64}\\\""
738 tm_file="${tm_file} ${cpu_type}/darwin.h"
739 tm_p_file="${tm_p_file} darwin-protos.h"
740 target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.cc"
741 extra_options="${extra_options} rpath.opt darwin.opt"
742 c_target_objs="${c_target_objs} darwin-c.o"
743 cxx_target_objs="${cxx_target_objs} darwin-c.o"
744 d_target_objs="${d_target_objs} darwin-d.o"
745 fortran_target_objs="darwin-f.o"
746 target_has_targetcm=yes
747 target_has_targetdm=yes
748 extra_objs="${extra_objs} darwin.o"
749 extra_gcc_objs="darwin-driver.o"
750 default_use_cxa_atexit=yes
752 case ${enable_threads} in
753 "" | yes | posix) thread_file='posix' ;;
759 tmake_file="t-slibgcc"
760 case ${enable_threads} in
765 # Let these non-posix thread selections fall through if requested
768 echo 'Unknown thread configuration for DragonFly BSD'
772 extra_options="$extra_options rpath.opt dragonfly.opt"
773 default_use_cxa_atexit=yes
775 d_target_objs="${d_target_objs} dragonfly-d.o"
776 tmake_file="${tmake_file} t-dragonfly"
777 target_has_targetdm=yes
780 # This is the generic ELF configuration of FreeBSD. Later
781 # machine-specific sections may refine and add to this
784 # Due to tm_file entry ordering issues that vary between cpu
785 # architectures, we only define fbsd_tm_file to allow the
786 # machine-specific section to dictate the final order of all
787 # entries of tm_file with the minor exception that components
788 # of the tm_file set here will always be of the form:
790 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
792 # The machine-specific section should not tamper with this
793 # ordering but may order all other entries of tm_file as it
794 # pleases around the provided core setting.
797 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
798 if test "$fbsd_major" = ""; then
799 echo "Specify the major version number of the targeted FreeBSD release"
800 echo "like this: --target=amd64-unknown-freebsd10.1"
803 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
804 tmake_file="t-slibgcc"
805 case ${enable_threads} in
807 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
813 echo 'Unknown thread configuration for FreeBSD'
817 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
818 extra_options="$extra_options rpath.opt freebsd.opt"
823 default_use_cxa_atexit=yes;;
826 d_target_objs="${d_target_objs} freebsd-d.o"
827 tmake_file="${tmake_file} t-freebsd"
828 target_has_targetdm=yes
831 native_system_header_dir=/include
833 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi)
834 extra_options="$extra_options gnu-user.opt"
837 case ${enable_threads} in
838 "" | yes | posix) thread_file='posix' ;;
840 tmake_file="t-slibgcc"
842 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
845 native_system_header_dir=/include
848 # Linux C libraries selection switch: glibc / uclibc / bionic.
849 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
852 tm_p_file="${tm_p_file} linux-protos.h"
853 tmake_file="${tmake_file} t-linux"
854 extra_objs="${extra_objs} linux.o"
855 extra_options="${extra_options} linux.opt"
860 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
862 *-*-*uclibc* | *-*-uclinuxfdpiceabi)
863 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
866 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
869 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
872 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
874 default_use_cxa_atexit=yes
877 # Enable compilation for Android by default for *android* targets.
880 tm_defines="$tm_defines ANDROID_DEFAULT=1"
883 tm_defines="$tm_defines ANDROID_DEFAULT=0"
886 c_target_objs="${c_target_objs} glibc-c.o"
887 cxx_target_objs="${cxx_target_objs} glibc-c.o"
888 d_target_objs="${d_target_objs} glibc-d.o"
889 tmake_file="${tmake_file} t-glibc"
890 target_has_targetcm=yes
891 target_has_targetdm=yes
893 *-*-*uclibc* | *-*-uclinuxfdpiceabi)
896 # Linux targets always support .init_array.
897 gcc_cv_initfini_array=yes
902 tm_p_file="${tm_p_file} netbsd-protos.h"
903 tmake_file="t-netbsd t-slibgcc"
904 extra_objs="${extra_objs} netbsd.o"
905 d_target_objs="${d_target_objs} netbsd-d.o"
909 case ${enable_threads} in
910 "" | yes | posix) thread_file='posix' ;;
912 nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
913 default_use_cxa_atexit=yes
914 target_has_targetdm=yes
916 arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*)
917 default_gnu_indirect_function=yes
922 tmake_file="t-openbsd"
923 case ${enable_threads} in
929 *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
930 default_use_cxa_atexit=yes
933 d_target_objs="${d_target_objs} openbsd-d.o"
934 target_has_targetdm=yes
939 default_use_cxa_atexit=yes
942 case ${enable_threads} in
943 "" | yes | rtems) thread_file='rtems' ;;
944 posix) thread_file='posix' ;;
947 echo 'Unknown thread configuration for RTEMS'
951 tmake_file="${tmake_file} t-rtems"
952 extra_options="${extra_options} rtems.opt"
953 default_use_cxa_atexit=yes
957 extra_options="$extra_options gnu-user.opt"
959 case ${enable_threads} in
960 "" | yes | posix) thread_file='posix' ;;
962 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
968 # i?86-*-solaris2* needs to insert headers between cpu default and
969 # Solaris 2 specific ones.
970 sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
971 sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
972 sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
974 *-*-solaris2.1[1-9]*)
975 # __cxa_atexit was introduced in Solaris 11.4.
976 default_use_cxa_atexit=yes
980 if test x$gnu_ld = xyes; then
981 tm_file="usegld.h ${tm_file}"
983 if test x$gas = xyes; then
984 tm_file="usegas.h ${tm_file}"
986 tm_p_file="${tm_p_file} sol2-protos.h"
987 tmake_file="${tmake_file} t-sol2 t-slibgcc"
988 c_target_objs="${c_target_objs} sol2-c.o"
989 cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
990 d_target_objs="${d_target_objs} sol2-d.o"
991 extra_objs="${extra_objs} sol2.o sol2-stubs.o"
992 extra_options="${extra_options} sol2.opt"
993 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
994 "":yes:* | yes:yes:* )
998 target_has_targetdm=yes
1001 extra_options="${extra_options} vms/vms.opt"
1002 xmake_file=vms/x-vms
1003 tmake_file="vms/t-vms t-slibgcc"
1005 target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.cc"
1006 tm_p_file="${tm_p_file} vms/vms-protos.h"
1007 xm_file="vms/xm-vms.h"
1008 c_target_objs="vms-c.o"
1009 cxx_target_objs="vms-c.o"
1010 fortran_target_objs="vms-f.o"
1011 use_gcc_stdint=provide
1012 tm_file="${tm_file} vms/vms-stdint.h"
1013 if test x$gnu_ld != xyes; then
1014 # Build wrappers for native case.
1015 extra_programs="ld\$(exeext) ar\$(exeext)"
1016 tmake_file="$tmake_file vms/t-vmsnative"
1020 tmake_file=t-vxworks
1023 extra_options="${extra_options} vxworks.opt"
1024 extra_objs="$extra_objs vxworks.o"
1026 c_target_objs="${c_target_objs} vxworks-c.o"
1027 cxx_target_objs="${cxx_target_objs} vxworks-c.o"
1028 extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
1029 target_has_targetcm="yes"
1031 # This private header exposes a consistent interface for checks on
1032 # the VxWorks version our runtime header files need to perform, based on
1033 # what the system headers adverstise:
1035 extra_headers="${extra_headers} ../vxworks/_vxworks-versions.h"
1037 # Starting from VxWorks 7, the system comes with a Dinkumware
1038 # environment which requires the inclusion of "yvals.h" before other
1039 # system headers. We provide wrapped versions of a few headers to
1040 # accomodate such constraints:
1042 extra_headers="${extra_headers} ../vxworks/_yvals.h"
1043 extra_headers="${extra_headers} ../vxworks/_yvals-wrapper.h"
1045 extra_headers="${extra_headers} ../vxworks/math.h ../vxworks/complex.h"
1046 extra_headers="${extra_headers} ../vxworks/inttypes.h ../vxworks/setjmp.h"
1048 # We provide (a tailored version of) stdint.h
1049 tm_file="${tm_file} vxworks-stdint.h"
1050 use_gcc_stdint=provide
1052 case ${enable_threads} in
1054 "" | yes | vxworks) thread_file='vxworks' ;;
1055 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
1058 # A few common macro definitions conveying general characteristics
1059 # of the configuration at hand. Note that by VxWorks 7, we mean the
1060 # the SR6xx major update or beyond in vendor parlance:
1064 tm_defines="$tm_defines TARGET_VXWORKS7=1"
1069 tm_defines="$tm_defines TARGET_VXWORKS64=1"
1073 # Then a few build configuration controls for VxWorks 7, which
1074 # has specificities on top of which we aim to provide more complete
1079 # VxWorks 7 always has init/fini_array support and it is simpler to
1080 # just leverage this, sticking to what the system toolchain does:
1081 gcc_cv_initfini_array=yes
1085 *-*-elf|arc*-*-elf*)
1086 # Assume that newlib is being used and so __cxa_atexit is provided.
1087 default_use_cxa_atexit=yes
1093 aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
1094 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
1095 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h"
1096 tmake_file="${tmake_file} aarch64/t-aarch64"
1102 tm_file="${tm_file} fuchsia.h"
1105 tm_file="${tm_file} aarch64/rtems.h rtems.h"
1110 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1113 aarch64_multilibs="${with_multilib_list}"
1114 if test "$aarch64_multilibs" = "default"; then
1115 aarch64_multilibs="lp64,ilp32"
1117 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1118 for aarch64_multilib in ${aarch64_multilibs}; do
1119 case ${aarch64_multilib} in
1121 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1124 echo "--with-multilib-list=${aarch64_multilib} not supported."
1128 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1130 aarch64*-*-freebsd*)
1131 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
1132 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h"
1133 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
1134 tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
1137 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
1138 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-netbsd.h"
1139 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
1140 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1143 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
1144 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-linux.h"
1145 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
1146 tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
1149 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1152 aarch64_multilibs="${with_multilib_list}"
1153 if test "$aarch64_multilibs" = "default"; then
1154 # TODO: turn on ILP32 multilib build after its support is mature.
1155 # aarch64_multilibs="lp64,ilp32"
1156 aarch64_multilibs="lp64"
1158 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1159 for aarch64_multilib in ${aarch64_multilibs}; do
1160 case ${aarch64_multilib} in
1162 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1165 echo "--with-multilib-list=${aarch64_multilib} not supported."
1169 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1171 aarch64*-wrs-vxworks*)
1172 tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
1173 tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
1174 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-vxworks"
1177 tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
1178 tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
1179 extra_options="${extra_options} alpha/elf.opt"
1182 tm_file="elfos.h ${tm_file} ${nbsd_tm_file} alpha/elf.h alpha/netbsd.h"
1183 tmake_file="${tmake_file} alpha/t-alpha"
1184 extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
1188 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
1189 tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
1190 tmake_file="${tmake_file} alpha/t-alpha"
1191 extra_options="${extra_options} openbsd.opt alpha/elf.opt"
1192 # default x-alpha is only appropriate for dec-osf.
1195 tm_file="${tm_file} vms/vms.h alpha/vms.h"
1196 tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
1199 tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
1200 tmake_file="arc/t-multilib arc/t-arc"
1201 extra_gcc_objs="driver-arc.o"
1202 if test "x$with_cpu" != x; then
1203 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1205 if test x${with_endian} = x; then
1207 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1208 *) with_endian=little ;;
1211 case ${with_endian} in
1213 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1215 case ${with_endian} in
1216 big*) tm_file="arc/big.h ${tm_file}"
1220 tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
1221 tmake_file="${tmake_file} arc/t-multilib-linux arc/t-arc"
1222 extra_gcc_objs="driver-arc.o"
1223 if test "x$with_cpu" != x; then
1224 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1226 if test x${with_endian} = x; then
1228 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1229 *) with_endian=little ;;
1232 case ${with_endian} in
1234 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1236 case ${with_endian} in
1237 big*) tm_file="arc/big.h ${tm_file}"
1239 # Force .init_array support. The configure script cannot always
1240 # automatically detect that GAS supports it, yet we require it.
1241 gcc_cv_initfini_array=yes
1244 # We only support VxWorks 7 now on ARM, post SR600. Pre SR600
1245 # VxWorks 7 was transitory and major versions prior to 7 were based
1246 # on long deprecated ABI, not supported at all any more regardless
1248 extra_options="${extra_options} arm/vxworks.opt"
1249 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks arm/t-bpabi"
1250 tm_file="elfos.h arm/elf.h arm/bpabi.h arm/aout.h ${tm_file}"
1251 tm_file="${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1252 target_cpu_cname="generic-armv7-a"
1253 need_64bit_hwint=yes
1255 arm*-*-freebsd*) # ARM FreeBSD EABI
1256 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
1259 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1262 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
1263 tm_file="${tm_file} arm/bpabi.h arm/freebsd.h arm/aout.h arm/arm.h"
1266 target_cpu_cname="arm1176jzf-s"
1267 if test $fbsd_major -ge 11; then
1268 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1272 target_cpu_cname="generic-armv7-a"
1273 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1276 target_cpu_cname="arm9"
1279 with_tls=${with_tls:-gnu}
1282 target_cpu_cname="strongarm"
1283 tmake_file="${tmake_file} arm/t-arm"
1284 tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
1285 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1287 arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
1290 arm*-*-netbsdelf-*eabi*)
1291 tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
1292 tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
1295 tm_file="$tm_file arm/netbsd-elf.h"
1296 tmake_file="$tmake_file arm/t-netbsd"
1299 tm_file="${tm_file} arm/aout.h arm/arm.h"
1301 arm*-*-netbsdelf-*eabihf*)
1302 # Hard-float requires at least Arm v5te
1303 target_cpu_cname="arm10e"
1304 tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
1308 armv6*) target_cpu_cname="arm1176jzf-s";;
1309 armv7*) target_cpu_cname="generic-armv7-a";;
1312 arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
1313 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"
1314 extra_options="${extra_options} linux-android.opt"
1317 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1320 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
1321 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
1323 arm*-*-uclinuxfdpiceabi)
1324 tm_file="$tm_file arm/uclinuxfdpiceabi.h"
1327 # Generation of floating-point instructions requires at least ARMv5te.
1328 if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then
1329 target_cpu_cname="arm10e"
1331 target_cpu_cname="arm10tdmi"
1333 # Define multilib configuration for arm-linux-androideabi.
1336 tmake_file="$tmake_file arm/t-linux-androideabi"
1339 # The EABI requires the use of __cxa_atexit.
1340 default_use_cxa_atexit=yes
1341 with_tls=${with_tls:-gnu}
1343 arm*-*-uclinux*eabi*) # ARM ucLinux
1344 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
1345 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
1346 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h"
1347 target_cpu_cname="arm7tdmi"
1348 # The EABI requires the use of __cxa_atexit.
1349 default_use_cxa_atexit=yes
1352 tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1353 tm_file="${tm_file} newlib-stdint.h phoenix.h"
1354 tm_file="${tm_file} arm/aout.h arm/arm.h"
1355 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
1356 target_cpu_cname="arm7tdmi"
1358 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
1361 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1363 default_use_cxa_atexit=yes
1364 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1365 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
1366 target_cpu_cname="arm7tdmi"
1369 tm_file="$tm_file newlib-stdint.h"
1370 tmake_file="${tmake_file} arm/t-bpabi"
1374 tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h"
1375 tmake_file="${tmake_file} arm/t-bpabi arm/t-fuchsia"
1376 target_cpu_cname="generic-armv7-a"
1379 tm_file="${tm_file} arm/rtems.h rtems.h newlib-stdint.h"
1380 tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
1383 tm_file="${tm_file} arm/symbian.h"
1384 # We do not include t-bpabi for Symbian OS because the system
1385 # provides its own implementation of the BPABI functions.
1386 tmake_file="${tmake_file} arm/t-symbian"
1387 target_cpu_cname="arm10tdmi"
1390 tm_file="${tm_file} arm/aout.h arm/arm.h"
1393 tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
1394 if test x${with_avrlibc} != xno; then
1395 tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1396 tm_defines="${tm_defines} WITH_AVRLIBC"
1398 # Work out avr_double_comparison which is 2 or 3 and is used in
1399 # target hook FLOAT_LIB_COMPARE_RETURNS_BOOL to determine whether
1400 # DFmode comparisons return 3-state or 2-state results.
1401 case y${with_double_comparison} in
1403 avr_double_comparison=3
1406 avr_double_comparison=2
1409 echo "Error: --with-double-comparison= can only be used with: 'tristate', 'bool', 'libf7'" 1>&2
1413 case "y${with_libf7}" in
1415 # avr_double_comparison as set above.
1418 avr_double_comparison=2
1419 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1421 y | yyes | ymath-symbols)
1422 avr_double_comparison=2
1423 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1424 tm_defines="${tm_defines} WITH_LIBF7_MATH"
1425 tm_defines="${tm_defines} WITH_LIBF7_MATH_SYMBOLS"
1428 avr_double_comparison=2
1429 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1430 tm_defines="${tm_defines} WITH_LIBF7_MATH"
1433 echo "Error: --with-libf7=${with_libf7} but can only be used with: 'libgcc', 'math', 'math-symbols', 'yes', 'no'" 1>&2
1437 tm_defines="${tm_defines} WITH_DOUBLE_COMPARISON=${avr_double_comparison}"
1438 case y${with_double} in
1441 tm_defines="${tm_defines} HAVE_DOUBLE32"
1445 tm_defines="${tm_defines} HAVE_DOUBLE64"
1449 avr_double_multilib=1
1450 tm_defines="${tm_defines} HAVE_DOUBLE32"
1451 tm_defines="${tm_defines} HAVE_DOUBLE64"
1452 tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
1456 avr_double_multilib=1
1457 tm_defines="${tm_defines} HAVE_DOUBLE32"
1458 tm_defines="${tm_defines} HAVE_DOUBLE64"
1459 tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
1462 echo "Error: --with-double= can only be used with: '32', '32,64', '64,32', '64'" 1>&2
1466 case y${with_long_double} in
1469 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1473 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1477 avr_long_double_multilib=1
1478 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1479 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1480 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
1484 avr_long_double_multilib=1
1485 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1486 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1487 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
1490 avr_long_double=${avr_double}
1491 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_IS_DOUBLE"
1492 if test y${avr_double_multilib} = y1; then
1493 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1494 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1496 tm_defines="${tm_defines} HAVE_LONG_DOUBLE${avr_long_double}"
1500 echo "Error: --with-long_double= can only be used with: '32', '32,64', '64,32', '64', 'double'" 1>&2
1504 if test ${avr_long_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 32xy1z; then
1505 if test y${with_long_double} != ydouble; then
1506 echo "Error: --with-double=${with_double} requests a multilib for double, but long double is always 32 bits wide due to --with-long-double=${with_long_double}" 1>&2
1510 if test ${avr_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 64x1yz; then
1511 echo "Error: --with-long-double=${with_long_double} requests a multilib for long double, but double is always 64 bits wide due to --with-double=64" 1>&2
1514 if test y${avr_double}${avr_long_double} = y6432; then
1515 echo "Error: double default of 64 bits from --with-double=${with_double} conflicts with default of 32 bits for long double from --with-long-double=${with_long_double}" 1>&2
1518 tm_defines="${tm_defines} WITH_DOUBLE${avr_double}"
1519 tm_defines="${tm_defines} WITH_LONG_DOUBLE${avr_long_double}"
1520 tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
1522 extra_gcc_objs="driver-avr.o avr-devices.o"
1523 extra_objs="avr-devices.o avr-log.o"
1526 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1527 tmake_file=bfin/t-bfin-elf
1531 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
1532 tmake_file=bfin/t-bfin-uclinux
1535 bfin*-linux-uclibc*)
1536 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"
1537 tmake_file="${tmake_file} bfin/t-bfin-linux"
1541 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
1542 tmake_file="${tmake_file} bfin/t-rtems"
1545 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1550 tm_file="elfos.h ${tm_file}"
1551 tmake_file="${tmake_file} bpf/t-bpf"
1553 extra_headers="bpf-helpers.h"
1554 use_gcc_stdint=provide
1555 extra_objs="coreout.o"
1556 target_gtfiles="$target_gtfiles \$(srcdir)/config/bpf/coreout.cc"
1559 tm_file="elfos.h ${tm_file} newlib-stdint.h"
1560 tmake_file="${tmake_file} cr16/t-cr16 "
1563 cris-*-elf | cris-*-none)
1564 tm_file="elfos.h newlib-stdint.h ${tm_file}"
1565 tmake_file="cris/t-cris cris/t-elfmulti"
1567 extra_options="${extra_options} cris/elf.opt"
1571 if test x${with_endian} != x; then
1572 case ${with_endian} in
1575 echo "with_endian=${with_endian} not supported."
1580 if test x${with_float} != x; then
1581 case ${with_float} in
1584 "Unknown floating point type used in --with-float=$with_float"
1589 tm_file="csky/csky.h"
1590 md_file="csky/csky.md"
1591 out_file="csky/csky.cc"
1592 tm_p_file="${tm_p_file} csky/csky-protos.h"
1593 extra_options="${extra_options} csky/csky_tables.opt"
1595 if test x${enable_tpf_debug} = xyes; then
1596 tm_defines="${tm_defines} ENABLE_TPF_DEBUG"
1601 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h"
1602 tmake_file="csky/t-csky csky/t-csky-elf"
1603 default_use_cxa_atexit=no
1607 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h"
1608 tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux"
1612 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
1613 # Force .init_array support. The configure script cannot always
1614 # automatically detect that GAS supports it, yet we require it.
1615 gcc_cv_initfini_array=yes
1617 csky-*-linux-uclibc*)
1618 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
1619 default_use_cxa_atexit=no
1622 echo "Unknown target $target"
1628 echo "Unknown target $target"
1633 epiphany-*-elf | epiphany-*-rtems*)
1634 tm_file="dbxelf.h elfos.h ${tm_file}"
1635 tmake_file="${tmake_file} epiphany/t-epiphany"
1638 tm_file="${tm_file} epiphany/rtems.h rtems.h newlib-stdint.h"
1641 tm_file="${tm_file} newlib-stdint.h"
1644 extra_options="${extra_options} fused-madd.opt"
1645 extra_objs="${extra_objs} mode-switch-use.o resolve-sw-modes.o"
1646 tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1647 extra_headers="epiphany_intrinsics.h"
1650 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1653 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1654 tmake_file=frv/t-frv
1657 tm_file="dbxelf.h elfos.h ${tm_file} \
1658 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1659 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1664 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1665 tmake_file="${tmake_file} ft32/t-ft32"
1668 tm_file="elfos.h gcn/gcn-hsa.h gcn/gcn.h newlib-stdint.h"
1669 tmake_file="gcn/t-gcn-hsa"
1670 native_system_header_dir=/include
1671 extra_modes=gcn/gcn-modes.def
1672 extra_objs="${extra_objs} gcn-tree.o"
1673 extra_gcc_objs="driver-gcn.o"
1675 x86_64*-*-linux-gnu )
1676 if test "$ac_cv_search_dlopen" != no; then
1677 extra_programs="${extra_programs} gcn-run\$(exeext)"
1681 if test x$enable_as_accelerator = xyes; then
1682 extra_programs="${extra_programs} mkoffload\$(exeext)"
1683 tm_file="${tm_file} gcn/offload.h"
1685 # Force .init_array support.
1686 gcc_cv_initfini_array=yes
1692 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1693 tmake_file="${tmake_file} moxie/t-moxie"
1698 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1699 tmake_file="${tmake_file} moxie/t-moxie"
1702 tmake_file="${tmake_file} moxie/t-moxie"
1703 tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1708 tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
1709 tmake_file="${tmake_file} moxie/t-moxiebox"
1712 tmake_file="h8300/t-h8300"
1713 tm_file="h8300/h8300.h elfos.h newlib-stdint.h h8300/elf.h"
1716 tmake_file="${tmake_file} h8300/t-h8300 h8300/t-linux"
1717 tm_file="h8300/h8300.h elfos.h gnu-user.h linux.h glibc-stdint.h h8300/linux.h"
1720 target_cpu_default="MASK_PA_11|MASK_PA_20"
1721 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1722 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1724 tmake_file="${tmake_file} pa/t-pa pa/t-linux"
1725 d_target_objs="${d_target_objs} pa-d.o"
1729 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
1730 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1731 pa/pa32-regs.h pa/pa32-linux.h"
1732 tmake_file="${tmake_file} pa/t-pa pa/t-linux"
1733 d_target_objs="${d_target_objs} pa-d.o"
1736 target_cpu_default="MASK_PA_11"
1737 tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1738 pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1739 extra_options="${extra_options} openbsd.opt"
1740 tmake_file="pa/t-pa"
1741 d_target_objs="${d_target_objs} pa-d.o"
1746 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1747 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} \
1748 pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h"
1749 tmake_file="${tmake_file}"
1750 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
1751 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1753 hppa[12]*-*-hpux10*)
1755 hppa1.1-*-* | hppa2*-*-*)
1756 target_cpu_default="MASK_PA_11"
1759 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1760 pa/pa-hpux.h pa/pa-hpux10.h"
1761 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1764 tm_file="${tm_file} pa/pa-hpux1010.h"
1765 extra_options="${extra_options} pa/pa-hpux1010.opt"
1768 use_gcc_stdint=provide
1769 tm_file="${tm_file} hpux-stdint.h"
1770 tmake_file="pa/t-pa t-slibgcc"
1771 d_target_objs="${d_target_objs} pa-d.o"
1772 case ${enable_threads} in
1774 if test x$have_pthread_h = xyes ; then
1775 tmake_file="${tmake_file} pa/t-dce-thr"
1779 tmake_file="${tmake_file} pa/t-dce-thr"
1784 if test "x$with_dwarf2" != x; then
1785 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1790 target_cpu_default="MASK_PA_11|MASK_PA_20"
1791 if test x$gnu_ld = xyes
1793 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1795 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1796 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1800 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1801 extra_options="${extra_options} pa/pa-hpux1111.opt"
1804 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1805 extra_options="${extra_options} pa/pa-hpux1131.opt"
1808 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1811 extra_options="${extra_options} pa/pa-hpux.opt \
1812 pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1813 tmake_file="pa/t-pa t-slibgcc"
1814 d_target_objs="${d_target_objs} pa-d.o"
1815 case x${enable_threads} in
1823 use_gcc_stdint=provide
1824 tm_file="${tm_file} hpux-stdint.h"
1828 tm_file="${tm_file} hpux-stdint.h"
1832 hppa[12]*-*-hpux11*)
1834 hppa1.1-*-* | hppa2*-*-*)
1835 target_cpu_default="MASK_PA_11"
1838 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1839 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1840 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1844 tm_file="${tm_file} pa/pa-hpux1111.h"
1845 extra_options="${extra_options} pa/pa-hpux1111.opt"
1848 tm_file="${tm_file} pa/pa-hpux1131.h"
1849 extra_options="${extra_options} pa/pa-hpux1131.opt"
1852 tmake_file="pa/t-pa t-slibgcc"
1853 d_target_objs="${d_target_objs} pa-d.o"
1854 case x${enable_threads} in
1863 use_gcc_stdint=provide
1864 tm_file="${tm_file} hpux-stdint.h"
1868 tm_file="${tm_file} hpux-stdint.h"
1871 if test "x$with_dwarf2" != x; then
1872 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1876 i[34567]86-*-darwin1[89]* | i[34567]86-*-darwin2*)
1877 echo "Error: 32bit target is not supported after Darwin17" 1>&2
1879 i[34567]86-*-darwin*)
1881 # Baseline choice for a machine that allows m64 support.
1882 with_cpu=${with_cpu:-core2}
1883 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch t-slibgcc"
1884 tm_file="${cpu_type}/darwin32-biarch.h ${tm_file} "
1886 x86_64-*-darwin1[89]* | x86_64-*-darwin2*)
1888 tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=(OPTION_MASK_ISA_64BIT|OPTION_MASK_ABI_64)"
1889 tm_defines="${tm_defines} TARGET_BI_ARCH=0"
1890 with_cpu=${with_cpu:-core2}
1891 tmake_file="${tmake_file} t-slibgcc"
1894 with_cpu=${with_cpu:-core2}
1895 tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
1896 tm_file="${cpu_type}/darwin64-biarch.h ${tm_file} "
1898 i[34567]86-*-elfiamcu)
1899 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
1902 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1905 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1908 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
1911 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1914 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
1915 tmake_file="i386/t-i386elf t-svr4"
1917 i[34567]86-*-dragonfly*)
1918 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
1919 tmake_file="${tmake_file} i386/t-crtstuff"
1921 x86_64-*-dragonfly*)
1922 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
1923 tmake_file="${tmake_file} i386/t-crtstuff"
1925 i[34567]86-*-freebsd*)
1926 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1929 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"
1931 i[34567]86-*-netbsdelf*)
1932 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
1933 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1936 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
1937 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1939 i[34567]86-*-openbsd*)
1940 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1941 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1942 extra_options="${extra_options} openbsd.opt"
1947 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1948 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1949 extra_options="${extra_options} openbsd.opt"
1953 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1954 # Intel 80386's running GNU/*
1955 # with ELF format using glibc 2
1956 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1958 i[34567]86-*-linux*)
1959 tm_file="${tm_file} linux.h linux-android.h"
1960 extra_options="${extra_options} linux-android.opt"
1961 if test x$enable_targets = xall; then
1962 tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
1963 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1964 tmake_file="${tmake_file} i386/t-linux64"
1965 x86_multilibs="${with_multilib_list}"
1966 if test "$x86_multilibs" = "default"; then
1967 x86_multilibs="m64,m32"
1969 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1970 for x86_multilib in ${x86_multilibs}; do
1971 case ${x86_multilib} in
1973 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1976 echo "--with-multilib-list=${x86_with_multilib} not supported."
1980 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1982 if test x$with_cpu = x; then
1983 if test x$with_cpu_64 = x; then
1987 case " $x86_cpus $x86_archs $x86_64_archs " in
1991 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1992 echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1998 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
2001 i[34567]86-*-kfreebsd*-gnu)
2002 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
2004 i[34567]86-*-kopensolaris*-gnu)
2005 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
2008 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
2012 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
2013 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
2014 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
2017 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
2018 extra_options="${extra_options} linux-android.opt"
2020 x86_64-*-kfreebsd*-gnu)
2021 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
2024 tmake_file="${tmake_file} i386/t-linux64"
2025 x86_multilibs="${with_multilib_list}"
2026 if test "$x86_multilibs" = "default"; then
2029 x86_multilibs="mx32"
2032 x86_multilibs="m64,m32"
2036 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
2037 for x86_multilib in ${x86_multilibs}; do
2038 case ${x86_multilib} in
2040 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
2043 echo "--with-multilib-list=${x86_with_multilib} not supported."
2047 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
2049 i[34567]86-pc-msdosdjgpp*)
2050 xm_file=i386/xm-djgpp.h
2051 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
2052 native_system_header_dir=/dev/env/DJDIR/include
2053 extra_options="${extra_options} i386/djgpp.opt"
2058 i[34567]86-*-lynxos*)
2060 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
2061 tmake_file="${tmake_file} t-lynx"
2062 extra_options="${extra_options} lynx.opt"
2067 i[34567]86-*-nto-qnx*)
2068 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
2069 extra_options="${extra_options} i386/nto.opt"
2073 i[34567]86-*-rtems*)
2074 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"
2075 tmake_file="${tmake_file} i386/t-rtems"
2077 i[34567]86-*-solaris2* | x86_64-*-solaris2*)
2078 # Set default arch_32 to pentium4, tune_32 to generic like the other
2079 # i386 targets, although config.guess defaults to i386-pc-solaris2*.
2080 with_arch_32=${with_arch_32:-pentium4}
2081 with_tune_32=${with_tune_32:-generic}
2082 tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file_head} i386/x86-64.h ${sol2_tm_file_tail}"
2083 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
2084 tmake_file="$tmake_file i386/t-sol2"
2086 if test x$with_cpu = x; then
2087 if test x$with_cpu_64 = x; then
2091 case " $x86_cpus $x86_archs $x86_64_archs " in
2095 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
2096 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
2102 i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks7*)
2103 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
2107 tm_file="${tm_file} i386/x86-64.h"
2110 tm_file="${tm_file} vx-common.h"
2113 tm_file="${tm_file} vxworksae.h i386/vxworks.h i386/vxworksae.h"
2114 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
2117 tm_file="${tm_file} vxworks.h i386/vxworks.h"
2118 tmake_file="${tmake_file} i386/t-vxworks"
2122 i[34567]86-*-cygwin*)
2123 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"
2124 xm_file=i386/xm-cygwin.h
2125 tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
2126 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
2127 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
2128 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
2129 c_target_objs="${c_target_objs} msformat-c.o"
2130 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
2131 d_target_objs="${d_target_objs} winnt-d.o"
2132 target_has_targetdm="yes"
2133 if test x$enable_threads = xyes; then
2136 default_use_cxa_atexit=yes
2141 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
2142 xm_file=i386/xm-cygwin.h
2143 tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
2144 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
2145 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
2146 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
2147 c_target_objs="${c_target_objs} msformat-c.o"
2148 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
2149 d_target_objs="${d_target_objs} winnt-d.o"
2150 target_has_targetdm="yes"
2151 if test x$enable_threads = xyes; then
2154 default_use_cxa_atexit=yes
2156 tm_defines="${tm_defines} TARGET_CYGWIN64=1"
2158 i[34567]86-*-mingw* | x86_64-*-mingw*)
2159 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
2160 xm_file=i386/xm-mingw32.h
2161 c_target_objs="${c_target_objs} winnt-c.o"
2162 cxx_target_objs="${cxx_target_objs} winnt-c.o"
2163 d_target_objs="${d_target_objs} winnt-d.o"
2164 target_has_targetcm="yes"
2165 target_has_targetdm="yes"
2167 x86_64-*-* | *-w64-*)
2173 if test x$enable_threads = xposix ; then
2174 tm_file="${tm_file} i386/mingw-pthread.h"
2176 tm_file="${tm_file} i386/mingw32.h"
2177 # This makes the logic if mingw's or the w64 feature set has to be used
2180 user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
2181 user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
2182 tm_file="${tm_file} i386/mingw-w64.h"
2183 if test x$enable_targets = xall; then
2184 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
2185 if test x$with_cpu = x; then
2186 if test x$with_cpu_64 = x; then
2190 case " $x86_cpus $x86_archs $x86_64_archs " in
2194 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
2195 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
2205 tm_file="${tm_file} i386/mingw-stdint.h"
2206 tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
2209 tmake_file="${tmake_file} i386/t-mingw-w64"
2212 tmake_file="${tmake_file} i386/t-mingw-w32"
2215 native_system_header_dir=/mingw/include
2216 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
2217 extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
2220 extra_options="${extra_options} i386/mingw-w64.opt"
2225 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
2226 c_target_objs="${c_target_objs} msformat-c.o"
2227 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
2230 default_use_cxa_atexit=yes
2232 case ${enable_threads} in
2242 tm_file="${tm_file} i386/crtdll.h"
2244 *mingw32msv* | *mingw*)
2249 tmake_file="${tmake_file} i386/t-x86_64-elf"
2250 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
2253 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
2254 tmake_file="ia64/t-ia64"
2255 target_cpu_default="0"
2256 if test x$gas = xyes
2258 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2260 if test x$gnu_ld = xyes
2262 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
2266 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
2267 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2268 tmake_file="${tmake_file} ia64/t-ia64"
2271 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
2272 tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
2273 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2276 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
2277 tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
2278 target_cpu_default="MASK_GNU_AS"
2279 case x$enable_threads in
2285 c_target_objs="ia64-c.o"
2286 cxx_target_objs="ia64-c.o"
2287 extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
2289 tm_file="${tm_file} hpux-stdint.h"
2292 tm_file="${tm_file} ia64/hpux-unix2003.h"
2297 tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
2298 tmake_file="${tmake_file} ia64/t-ia64"
2299 target_cpu_default="0"
2300 if test x$gas = xyes
2302 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2304 extra_options="${extra_options} ia64/vms.opt"
2307 tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
2308 out_file=iq2000/iq2000.cc
2309 md_file=iq2000/iq2000.md
2312 tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
2313 tmake_file="${tmake_file} lm32/t-lm32"
2316 tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
2317 tmake_file="${tmake_file} lm32/t-lm32"
2318 tmake_file="${tmake_file} lm32/t-rtems"
2321 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
2322 tmake_file="${tmake_file} lm32/t-lm32"
2325 tm_file="elfos.h newlib-stdint.h ${tm_file}"
2328 tm_file="elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
2330 m68k-*-elf* | fido-*-elf*)
2333 # Check that $with_cpu makes sense.
2338 echo "Cannot accept --with-cpu=$with_cpu"
2345 default_m68k_cpu=68020
2349 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"
2350 tm_defines="${tm_defines} MOTOROLA=1"
2351 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
2352 # Add multilibs for targets other than fido.
2357 tmake_file="$tmake_file m68k/t-mlibs"
2362 default_m68k_cpu=68020
2364 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
2365 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2366 tm_defines="${tm_defines} MOTOROLA=1 CHAR_FAST8=1 SHORT_FAST16=1"
2368 m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
2369 # with uClibc, using the new GNU/Linux-style
2371 default_m68k_cpu=68020
2373 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"
2374 extra_options="${extra_options} m68k/uclinux.opt"
2375 tm_defines="${tm_defines} MOTOROLA=1"
2376 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
2378 m68k-*-linux*) # Motorola m68k's running GNU/Linux
2379 # with ELF format using glibc 2
2380 # aka the GNU/Linux C library 6.
2381 default_m68k_cpu=68020
2383 with_arch=${with_arch:-m68k}
2384 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
2385 extra_options="${extra_options} m68k/ieee.opt"
2386 tm_defines="${tm_defines} MOTOROLA=1"
2387 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
2390 default_m68k_cpu=68020
2392 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
2393 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"
2394 tm_defines="${tm_defines} MOTOROLA=1"
2397 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
2398 tmake_file=mcore/t-mcore
2404 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2407 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2410 tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
2411 tm_file="${tm_file} glibc-stdint.h"
2412 c_target_objs="${c_target_objs} microblaze-c.o"
2413 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2414 tmake_file="${tmake_file} microblaze/t-microblaze"
2415 tmake_file="${tmake_file} microblaze/t-microblaze-linux"
2417 microblaze*-*-rtems*)
2420 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2423 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2426 tm_file="${tm_file} dbxelf.h"
2427 tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
2428 c_target_objs="${c_target_objs} microblaze-c.o"
2429 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2430 tmake_file="${tmake_file} microblaze/t-microblaze"
2431 tmake_file="${tmake_file} microblaze/t-rtems"
2436 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2439 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2442 tm_file="${tm_file} dbxelf.h newlib-stdint.h"
2443 c_target_objs="${c_target_objs} microblaze-c.o"
2444 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2445 tmake_file="${tmake_file} microblaze/t-microblaze"
2448 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
2449 case "x${enable_multilib}" in
2451 xyes) tmake_file="${tmake_file} riscv/t-linux-multilib" ;;
2452 *) echo "Unknown value for enable_multilib"; exit 1
2454 tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
2458 riscv32be-*|riscv64be-*)
2459 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2462 # Force .init_array support. The configure script cannot always
2463 # automatically detect that GAS supports it, yet we require it.
2464 gcc_cv_initfini_array=yes
2466 riscv*-*-elf* | riscv*-*-rtems*)
2467 tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
2470 tm_file="${tm_file} riscv/rtems.h rtems.h"
2471 tmake_file="${tmake_file} riscv/t-rtems"
2474 if test "x${with_multilib_generator}" == xdefault; then
2475 case "x${enable_multilib}" in
2477 xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
2478 *) echo "Unknown value for enable_multilib"; exit 1
2482 tmake_file="${tmake_file} riscv/t-riscv"
2486 riscv32be-*|riscv64be-*)
2487 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2490 # Force .init_array support. The configure script cannot always
2491 # automatically detect that GAS supports it, yet we require it.
2492 gcc_cv_initfini_array=yes
2495 tm_file="${tm_file} elfos.h ${fbsd_tm_file} riscv/freebsd.h"
2496 tmake_file="${tmake_file} riscv/t-riscv"
2500 riscv32be-*|riscv64be-*)
2501 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2504 # Force .init_array support. The configure script cannot always
2505 # automatically detect that GAS supports it, yet we require it.
2506 gcc_cv_initfini_array=yes
2509 loongarch*-*-linux*)
2510 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file}"
2511 tm_file="${tm_file} loongarch/gnu-user.h loongarch/linux.h"
2512 extra_options="${extra_options} linux-android.opt"
2513 tmake_file="${tmake_file} loongarch/t-linux"
2517 # Force .init_array support. The configure script cannot always
2518 # automatically detect that GAS supports it, yet we require it.
2519 gcc_cv_initfini_array=yes
2522 mips*-*-netbsd*) # NetBSD/mips, either endian.
2523 target_cpu_default="MASK_ABICALLS"
2524 tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h"
2525 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2528 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
2529 extra_options="${extra_options} linux-android.opt"
2530 tmake_file="${tmake_file} mips/t-img-linux"
2531 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32"
2532 with_arch_32="mips32r6"
2533 with_arch_64="mips64r6"
2538 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
2539 extra_options="${extra_options} linux-android.opt"
2540 tmake_file="${tmake_file} mips/t-mti-linux"
2541 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32"
2542 with_arch_32="mips32r2"
2543 with_arch_64="mips64r2"
2547 mips*-*-linux*) # Linux MIPS, either endian.
2548 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
2549 extra_options="${extra_options} linux-android.opt"
2552 default_mips_arch=mips32r6
2555 default_mips_arch=mips32r2
2558 default_mips_arch=mips32
2560 mips64el-st-linux-gnu)
2561 default_mips_abi=n32
2562 tm_file="${tm_file} mips/st.h"
2563 tmake_file="${tmake_file} mips/t-st"
2564 enable_mips_multilibs="yes"
2566 mips64octeon*-*-linux*)
2567 default_mips_abi=n32
2568 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
2569 target_cpu_default=MASK_SOFT_FLOAT_ABI
2570 enable_mips_multilibs="yes"
2572 mipsisa64r6*-*-linux-gnuabi64)
2574 default_mips_arch=mips64r6
2575 enable_mips_multilibs="yes"
2577 mipsisa64r6*-*-linux*)
2578 default_mips_abi=n32
2579 default_mips_arch=mips64r6
2580 enable_mips_multilibs="yes"
2582 mipsisa64r2*-*-linux-gnuabi64)
2584 default_mips_arch=mips64r2
2585 enable_mips_multilibs="yes"
2587 mipsisa64r2*-*-linux*)
2588 default_mips_abi=n32
2589 default_mips_arch=mips64r2
2590 enable_mips_multilibs="yes"
2592 mips64*-*-linux-gnuabi64 | mipsisa64*-*-linux-gnuabi64)
2594 enable_mips_multilibs="yes"
2596 mips64*-*-linux* | mipsisa64*-*-linux*)
2597 default_mips_abi=n32
2598 enable_mips_multilibs="yes"
2601 if test x$enable_targets = xall; then
2602 enable_mips_multilibs="yes"
2604 if test x$enable_mips_multilibs = xyes; then
2605 tmake_file="${tmake_file} mips/t-linux64"
2609 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2610 tmake_file="mips/t-mti-elf"
2611 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32"
2612 with_arch_32="mips32r2"
2613 with_arch_64="mips64r2"
2616 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2617 tmake_file="mips/t-img-elf"
2618 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32"
2619 with_arch_32="mips32r6"
2620 with_arch_64="mips64r6"
2623 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
2624 tmake_file="mips/t-sde"
2625 extra_options="${extra_options} mips/sde.opt"
2626 case "${with_newlib}" in
2628 # newlib / libgloss.
2631 # MIPS toolkit libraries.
2632 tm_file="$tm_file mips/sdemtk.h"
2633 tmake_file="$tmake_file mips/t-sdemtk"
2634 case ${enable_threads} in
2636 thread_file='mipssde'
2643 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32"
2646 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32"
2649 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32 MIPS_ABI_DEFAULT=ABI_32"
2652 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6 MIPS_ABI_DEFAULT=ABI_N32"
2655 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2 MIPS_ABI_DEFAULT=ABI_N32"
2658 tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64 MIPS_ABI_DEFAULT=ABI_N32"
2662 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2663 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
2664 mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
2665 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
2666 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
2667 mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
2668 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2669 tmake_file="mips/t-isa3264"
2672 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6"
2675 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2"
2678 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32"
2681 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6"
2684 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2"
2687 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64"
2691 mipsisa32*-*-elfoabi*)
2692 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2693 tm_file="${tm_file} mips/elfoabi.h"
2695 mipsisa64*-*-elfoabi*)
2696 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2697 tm_file="${tm_file} mips/elfoabi.h"
2700 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2704 mipsisa64sr71k-*-elf*)
2705 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2706 tmake_file=mips/t-sr71k
2707 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2709 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
2710 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2711 tmake_file="mips/t-elf mips/t-sb1"
2712 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
2714 mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
2715 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2716 tmake_file="mips/t-elf"
2718 mips64r5900-*-elf* | mips64r5900el-*-elf*)
2719 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
2720 tmake_file="mips/t-elf"
2721 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS3 MIPS_ABI_DEFAULT=ABI_N32"
2723 mips64-*-elf* | mips64el-*-elf*)
2724 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2725 tmake_file="mips/t-elf"
2726 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS3 MIPS_ABI_DEFAULT=ABI_O64"
2728 mips64vr-*-elf* | mips64vrel-*-elf*)
2729 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2730 tmake_file=mips/t-vr
2731 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2733 mips64orion-*-elf* | mips64orionel-*-elf*)
2734 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
2735 tmake_file="mips/t-elf"
2736 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS3 MIPS_ABI_DEFAULT=ABI_O64"
2739 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
2740 tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
2743 tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
2744 tmake_file="${tmake_file} mips/t-vxworks"
2746 mipstx39-*-elf* | mipstx39el-*-elf*)
2747 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
2748 tmake_file="mips/t-r3900"
2750 mmix-knuth-mmixware)
2751 tm_file="${tm_file} newlib-stdint.h"
2755 tm_file="elfos.h newlib-stdint.h ${tm_file}"
2760 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2761 c_target_objs="msp430-c.o"
2762 cxx_target_objs="msp430-c.o"
2763 tmake_file="${tmake_file} msp430/t-msp430"
2764 extra_objs="${extra_objs} msp430-devices.o"
2765 extra_gcc_objs="driver-msp430.o msp430-devices.o"
2766 # Enable .init_array unless it has been explicitly disabled.
2767 # The MSP430 EABI mandates the use of .init_array, and the Newlib CRT
2768 # code since mid-2019 expects it.
2769 if test x${disable_initfini_array} != xyes; then
2770 gcc_cv_initfini_array=yes
2774 # __cxa_atexit increases code size, and we don't need to support
2775 # dynamic shared objects on MSP430, so regular Newlib atexit is a
2776 # fine replacement as it also supports registration of more than 32
2778 default_use_cxa_atexit=no
2779 # This target does not match the generic *-*-elf case above which
2780 # sets use_gcc_stdint=wrap, so explicitly set it here.
2786 target_cpu_default="0"
2787 tm_defines="${tm_defines}"
2792 target_cpu_default="${target_cpu_default}|MASK_BIG_ENDIAN"
2793 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2798 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/elf.h nds32/nds32_intrinsic.h"
2799 tmake_file="nds32/t-nds32 nds32/t-elf"
2802 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h"
2803 tmake_file="${tmake_file} nds32/t-nds32 nds32/t-linux"
2804 gcc_cv_initfini_array=yes
2808 # Handle --enable-default-relax setting.
2809 if test x${enable_default_relax} = xyes; then
2810 tm_defines="${tm_defines} TARGET_DEFAULT_RELAX=1"
2812 # Handle --with-ext-dsp
2813 if test x${with_ext_dsp} = xyes; then
2814 tm_defines="${tm_defines} TARGET_DEFAULT_EXT_DSP=1"
2818 tm_file="elfos.h ${tm_file}"
2819 tmake_file="${tmake_file} nios2/t-nios2"
2822 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2825 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2826 extra_options="${extra_options} nios2/elf.opt"
2829 tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2830 tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2835 tm_file="${tm_file} newlib-stdint.h"
2837 tmake_file="nvptx/t-nvptx"
2838 if test x$enable_as_accelerator = xyes; then
2839 extra_programs="${extra_programs} mkoffload\$(exeext)"
2840 tm_file="${tm_file} nvptx/offload.h"
2844 tm_file="elfos.h ${tm_file}"
2845 tmake_file="${tmake_file} or1k/t-or1k"
2846 # Force .init_array support. The configure script cannot always
2847 # automatically detect that GAS supports it, yet we require it.
2848 gcc_cv_initfini_array=yes
2850 # Handle --with-multilib-list=...
2851 or1k_multilibs="${with_multilib_list}"
2852 if test "$or1k_multilibs" = "default"; then
2853 or1k_multilibs="mcmov,msoft-mul,msoft-div"
2855 or1k_multilibs=`echo $or1k_multilibs | sed -e 's/,/ /g'`
2856 for or1k_multilib in ${or1k_multilibs}; do
2857 case ${or1k_multilib} in
2858 mcmov | msext | msfimm | \
2860 mhard-float | mdouble-float | munordered-float | msoft-float | \
2861 mhard-div | mhard-mul | \
2862 msoft-div | msoft-mul )
2863 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${or1k_multilib}"
2866 echo "--with-multilib-list=${with_multilib_list} not supported."
2870 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
2874 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h"
2875 tm_file="${tm_file} or1k/linux.h"
2878 tm_file="${tm_file} newlib-stdint.h or1k/elf.h"
2879 extra_options="${extra_options} or1k/elf.opt"
2882 tm_file="${tm_file} newlib-stdint.h or1k/rtems.h rtems.h"
2883 tmake_file="${tmake_file} or1k/t-rtems"
2888 tm_file="${tm_file} newlib-stdint.h"
2891 # port not yet contributed
2892 #powerpc-*-openbsd*)
2893 # tmake_file="${tmake_file} rs6000/t-fprules"
2897 extra_options="${extra_options} ${cpu_type}/darwin.opt"
2899 *-darwin1[0-9]* | *-darwin9*)
2900 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2901 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2904 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2905 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2908 tm_file="${tm_file} ${cpu_type}/darwin7.h"
2911 # Earlier - ingle arch, with 32b only
2912 # OS X 10.0, the first edition is Darwin4
2915 tmake_file="${tmake_file} t-slibgcc"
2917 powerpc64-*-darwin*)
2918 extra_options="${extra_options} ${cpu_type}/darwin.opt"
2919 tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
2920 tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
2922 powerpc*-*-freebsd*)
2923 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
2924 extra_options="${extra_options} rs6000/sysv4.opt"
2925 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2928 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2932 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2933 tmake_file="${tmake_file} rs6000/t-freebsd64"
2934 extra_options="${extra_options} rs6000/linux64.opt"
2935 if test $fbsd_major -ge 13; then
2936 tm_defines="${tm_defines} TARGET_FREEBSD32_SECURE_PLT=1"
2940 if test $fbsd_major -ge 13; then
2941 tm_file="rs6000/secureplt.h ${tm_file}"
2943 tm_file="${tm_file} rs6000/freebsd.h"
2948 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2949 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2950 tmake_file="${tmake_file} rs6000/t-netbsd"
2951 extra_options="${extra_options} rs6000/sysv4.opt"
2953 powerpc-*-eabisimaltivec*)
2954 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
2955 extra_options="${extra_options} rs6000/sysv4.opt"
2956 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2960 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
2961 extra_options="${extra_options} rs6000/sysv4.opt"
2962 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2966 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2967 extra_options="${extra_options} rs6000/sysv4.opt"
2968 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2970 powerpc-*-eabialtivec*)
2971 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
2972 extra_options="${extra_options} rs6000/sysv4.opt"
2973 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2977 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
2978 extra_options="${extra_options} rs6000/sysv4.opt"
2979 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2983 tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
2984 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2985 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2988 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
2989 extra_options="${extra_options} rs6000/sysv4.opt"
2990 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
2991 extra_objs="$extra_objs rs6000-linux.o"
2994 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2996 case ${target}:${with_cpu} in
2997 powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
2999 maybe_biarch=${cpu_is_64bit}
3000 case ${enable_targets} in
3001 *powerpc64*) maybe_biarch=yes ;;
3002 all) maybe_biarch=yes ;;
3004 case ${target}:${enable_targets}:${maybe_biarch} in
3005 powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
3006 | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
3007 | powerpcle-*:*powerpc64le*:yes)
3008 if test x$cpu_is_64bit = xyes; then
3009 tm_file="${tm_file} rs6000/default64.h"
3011 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
3012 tmake_file="$tmake_file rs6000/t-linux64"
3015 tmake_file="$tmake_file rs6000/t-linux64le"
3016 case ${enable_targets} in
3017 all | *powerpc64-* | *powerpc-*)
3018 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
3021 case ${enable_targets} in
3022 all | *powerpc64le-* | *powerpcle-*)
3023 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
3026 extra_options="${extra_options} rs6000/linux64.opt"
3029 tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
3030 extra_options="${extra_options} rs6000/linux64.opt"
3031 tmake_file="${tmake_file} rs6000/t-linux"
3034 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
3035 tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
3039 powerpc*-*-linux*ppc476*)
3040 tm_file="${tm_file} rs6000/476.h"
3041 extra_options="${extra_options} rs6000/476.opt" ;;
3042 powerpc*-*-linux*altivec*)
3043 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
3047 enable_secureplt=yes ;;
3049 if test x${enable_secureplt} = xyes; then
3050 tm_file="rs6000/secureplt.h ${tm_file}"
3053 powerpc*-wrs-vxworks7r*)
3055 # Wind River 7 post SR0600 is mostly like Linux so we setup
3056 # our config in a very similar fashion and adjust to a few
3059 # The system compiler is configured with secureplt by default.
3060 tm_file="${tm_file} rs6000/secureplt.h"
3062 tm_file="${tm_file} elfos.h gnu-user.h linux.h freebsd-spec.h"
3063 tm_file="${tm_file} rs6000/sysv4.h rs6000/biarch64.h rs6000/default64.h rs6000/linux64.h"
3064 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
3066 extra_options="${extra_options} rs6000/sysv4.opt linux.opt rs6000/linux64.opt"
3068 tmake_file="${tmake_file} t-linux rs6000/t-linux64 rs6000/t-fprules rs6000/t-ppccomm"
3069 tmake_file="${tmake_file} rs6000/t-vxworks"
3071 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
3072 extra_objs="$extra_objs linux.o rs6000-linux.o"
3074 powerpc-wrs-vxworks*)
3075 tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
3076 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
3077 extra_options="${extra_options} rs6000/sysv4.opt"
3078 extra_headers="${extra_headers} ppc-asm.h"
3081 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
3082 tmake_file="${tmake_file} rs6000/t-vxworksmils"
3085 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
3086 tmake_file="${tmake_file} rs6000/t-vxworksae"
3089 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
3095 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
3096 tmake_file="t-lynx rs6000/t-lynx"
3097 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
3103 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
3104 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3105 extra_options="${extra_options} rs6000/sysv4.opt"
3107 powerpcle-*-eabisim*)
3108 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
3109 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3110 extra_options="${extra_options} rs6000/sysv4.opt"
3114 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3115 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3116 extra_options="${extra_options} rs6000/sysv4.opt"
3120 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3121 tmake_file="${tmake_file} pru/t-pru"
3122 extra_objs="pru-pragma.o pru-passes.o"
3125 rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
3126 tmake_file="rs6000/t-aix52 t-slibgcc"
3127 if test x$cpu_is_64bit = xyes; then
3128 tm_file="${tm_file} rs6000/biarch64.h"
3129 tmake_file="rs6000/t-aix64 t-slibgcc"
3131 tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
3132 extra_options="${extra_options} rs6000/aix64.opt"
3136 default_use_cxa_atexit=yes
3138 rs6000-ibm-aix7.2.* | powerpc-ibm-aix7.2.*)
3139 tmake_file="rs6000/t-aix52 t-slibgcc"
3140 if test x$cpu_is_64bit = xyes; then
3141 tm_file="${tm_file} rs6000/biarch64.h"
3142 tmake_file="rs6000/t-aix64 t-slibgcc"
3144 tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
3145 extra_options="${extra_options} rs6000/aix64.opt"
3149 default_use_cxa_atexit=yes
3151 rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
3152 tmake_file="rs6000/t-aix52 t-slibgcc"
3153 if test x$cpu_is_64bit = xyes; then
3154 tm_file="${tm_file} rs6000/biarch64.h"
3155 tmake_file="rs6000/t-aix64 t-slibgcc"
3157 tm_file="${tm_file} rs6000/aix.h rs6000/aix73.h rs6000/xcoff.h rs6000/aix-stdint.h"
3158 extra_options="${extra_options} rs6000/aix64.opt"
3162 default_use_cxa_atexit=yes
3165 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3166 target_has_targetm_common=no
3167 c_target_objs="rl78-c.o"
3168 cxx_target_objs="rl78-c.o"
3169 tmake_file="${tmake_file} rl78/t-rl78"
3172 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
3173 tmake_file="${tmake_file} rx/t-rx"
3174 extra_options="${extra_options} rx/elf.opt"
3177 tm_file="elfos.h linux.h glibc-stdint.h rx/linux.h ../../libgcc/config/rx/rx-abi.h"
3178 tmake_file="${tmake_file} rx/t-linux"
3181 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
3182 c_target_objs="${c_target_objs} s390-c.o"
3183 cxx_target_objs="${cxx_target_objs} s390-c.o"
3184 if test x$enable_targets = xall; then
3185 tmake_file="${tmake_file} s390/t-linux64"
3187 tmake_file="${tmake_file} s390/t-s390"
3190 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
3191 tm_p_file="linux-protos.h s390/s390-protos.h"
3192 c_target_objs="${c_target_objs} s390-c.o"
3193 cxx_target_objs="${cxx_target_objs} s390-c.o"
3194 md_file=s390/s390.md
3195 extra_modes=s390/s390-modes.def
3196 out_file=s390/s390.cc
3197 tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
3200 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h glibc-stdint.h s390/tpf.h"
3201 tm_p_file=s390/s390-protos.h
3202 c_target_objs="${c_target_objs} s390-c.o"
3203 cxx_target_objs="${cxx_target_objs} s390-c.o"
3204 md_file=s390/s390.md
3205 extra_modes=s390/s390-modes.def
3206 out_file=s390/s390.cc
3208 extra_options="${extra_options} s390/tpf.opt"
3209 tmake_file="${tmake_file} s390/t-s390"
3211 sh-*-elf* | sh[12346l]*-*-elf* | \
3212 sh-*-linux* | sh[2346lbe]*-*-linux* | \
3213 sh-*-netbsdelf* | shl*-*-netbsdelf*)
3214 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
3215 if test x${with_endian} = x; then
3217 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
3218 shbe-*-* | sheb-*-*) with_endian=big,little ;;
3219 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
3220 shl* | sh*-*-linux* | \
3221 sh-superh-elf) with_endian=little,big ;;
3222 sh[1234]*-*-*) with_endian=big ;;
3223 *) with_endian=big,little ;;
3226 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
3227 # First word : the default endian.
3228 # Second word: the secondary endian (optional).
3229 case ${with_endian} in
3230 big) TM_ENDIAN_CONFIG=mb ;;
3231 little) TM_ENDIAN_CONFIG=ml ;;
3232 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
3233 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
3234 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
3236 case ${with_endian} in
3237 little*) tm_file="sh/little.h ${tm_file}" ;;
3239 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
3241 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
3242 if test x$enable_fdpic = xyes; then
3243 tm_defines="$tm_defines FDPIC_DEFAULT=1"
3245 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
3247 tm_file="${tm_file} ${nbsd_tm_file} sh/netbsd-elf.h"
3248 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3251 sh*-superh-elf) if test x$with_libgloss != xno; then
3253 tm_file="${tm_file} sh/newlib.h"
3255 tm_file="${tm_file} sh/embed-elf.h"
3256 tm_file="${tm_file} sh/superh.h"
3257 extra_options="${extra_options} sh/superh.opt" ;;
3258 *) if test x$with_newlib = xyes \
3259 && test x$with_libgloss = xyes; then
3260 tm_file="${tm_file} sh/newlib.h"
3262 tm_file="${tm_file} sh/embed-elf.h" ;;
3268 tm_file="${tm_file} newlib-stdint.h"
3271 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
3272 case `echo ${target} | sed 's/e[lb]-/-/'` in
3273 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
3274 sh4a_single*) sh_cpu_target=sh4a-single ;;
3275 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
3276 sh4al) sh_cpu_target=sh4al ;;
3277 sh4a*) sh_cpu_target=sh4a ;;
3278 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
3279 sh4_single*) sh_cpu_target=sh4-single ;;
3280 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
3281 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
3282 sh3e*) sh_cpu_target=sh3e ;;
3283 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
3284 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
3285 sh2a_single*) sh_cpu_target=sh2a-single ;;
3286 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
3287 sh2a*) sh_cpu_target=sh2a ;;
3288 sh2e*) sh_cpu_target=sh2e ;;
3289 sh2*) sh_cpu_target=sh2 ;;
3290 *) sh_cpu_target=sh1 ;;
3292 # did the user say --without-fp ?
3293 if test x$with_fp = xno; then
3294 case ${sh_cpu_target} in
3296 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
3297 sh4*) sh_cpu_target=sh4-nofpu ;;
3298 sh3*) sh_cpu_target=sh3 ;;
3299 sh2a*) sh_cpu_target=sh2a-nofpu ;;
3300 sh2*) sh_cpu_target=sh2 ;;
3301 *) echo --without-fp not available for $target: ignored
3303 tm_defines="$tm_defines STRICT_NOFPU=1"
3305 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
3306 case $sh_cpu_default in
3307 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
3308 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
3309 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
3310 sh3e | sh3 | sh2e | sh2 | sh1) ;;
3311 "") sh_cpu_default=${sh_cpu_target} ;;
3312 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
3314 sh_multilibs=${with_multilib_list}
3315 if test "$sh_multilibs" = "default" ; then
3317 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
3318 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
3319 sh*-*-linux*) sh_multilibs=m1,m2,m2a,m3e,m4 ;;
3320 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
3321 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
3323 if test x$with_fp = xno; then
3324 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`"
3327 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
3328 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
3329 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
3330 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
3331 for sh_multilib in ${sh_multilibs}; do
3332 case ${sh_multilib} in
3333 m1 | m2 | m2e | m3 | m3e | \
3334 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
3335 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
3336 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3337 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
3338 # It is passed to MULTIILIB_OPTIONS verbatim.
3339 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
3340 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
3342 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
3343 # It is passed the MULTILIB_EXCEPTIONS verbatim.
3344 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
3346 echo "with_multilib_list=${sh_multilib} not supported."
3351 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
3352 if test x${enable_incomplete_targets} = xyes ; then
3353 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
3355 tm_file="$tm_file ./sysroot-suffix.h"
3356 tmake_file="$tmake_file t-sysroot-suffix"
3359 tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
3360 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
3363 tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
3364 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
3367 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
3370 tmake_file="sparc/t-sparc sparc/t-leon"
3373 tmake_file="sparc/t-sparc sparc/t-leon3"
3376 tmake_file="sparc/t-sparc sparc/t-elf"
3381 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
3382 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
3385 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
3386 extra_options="${extra_options} sparc/long-double-switch.opt"
3389 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
3392 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
3395 tmake_file="${tmake_file} sparc/t-sparc"
3398 if test x$enable_targets = xall; then
3399 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
3400 tmake_file="${tmake_file} sparc/t-linux64"
3402 tm_file="${tm_file} sparc/linux.h"
3403 tmake_file="${tmake_file} sparc/t-linux"
3407 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3408 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3409 extra_options="${extra_options} sparc/long-double-switch.opt"
3410 tmake_file="${tmake_file} sparc/t-sparc"
3413 tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
3415 sparc64-*-* | sparcv9-*-*)
3416 tm_file="sparc/default64.h ${tm_file}"
3419 test x$with_cpu != x || with_cpu=v9
3422 tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
3425 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
3426 tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
3429 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
3430 extra_options="${extra_options}"
3431 tmake_file="${tmake_file} sparc/t-sparc"
3434 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
3435 extra_options="${extra_options}"
3436 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
3439 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
3440 extra_options="${extra_options} sparc/long-double-switch.opt"
3441 tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
3443 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
3444 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
3445 extra_options="${extra_options} sparc/long-double-switch.opt"
3446 case "x$with_cpu" in
3448 x) with_cpu=ultrasparc ;;
3449 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
3451 tmake_file="${tmake_file} sparc/t-sparc"
3454 tm_file="sparc/biarch64.h ${tm_file}"
3455 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3456 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3457 extra_options="${extra_options} sparc/long-double-switch.opt"
3458 tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
3461 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
3462 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
3463 extra_options="${extra_options} openbsd.opt"
3464 extra_options="${extra_options}"
3467 tmake_file="${tmake_file} sparc/t-sparc"
3470 tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
3471 tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
3472 tmake_file="c6x/t-c6x c6x/t-c6x-elf"
3476 tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
3477 tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
3478 tm_file="${tm_file} ./sysroot-suffix.h"
3479 tmake_file="t-sysroot-suffix t-slibgcc"
3480 tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
3484 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
3485 tmake_file="${tmake_file} tilegx/t-tilegx"
3486 extra_objs="${extra_objs} mul-tables.o"
3487 c_target_objs="${c_target_objs} tilegx-c.o"
3488 cxx_target_objs="${cxx_target_objs} tilegx-c.o"
3489 extra_headers="feedback.h"
3492 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3497 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
3498 tmake_file="${tmake_file} tilepro/t-tilepro"
3499 extra_objs="${extra_objs} mul-tables.o"
3500 c_target_objs="${c_target_objs} tilepro-c.o"
3501 cxx_target_objs="${cxx_target_objs} tilepro-c.o"
3502 extra_headers="feedback.h"
3505 target_cpu_default="TARGET_CPU_generic"
3506 tm_file="elfos.h v850/v850.h"
3507 tm_file="${tm_file} v850/rtems.h rtems.h newlib-stdint.h"
3508 tmake_file="${tmake_file} v850/t-v850"
3509 tmake_file="${tmake_file} v850/t-rtems"
3511 c_target_objs="v850-c.o"
3512 cxx_target_objs="v850-c.o"
3517 target_cpu_default="TARGET_CPU_v850e3v5"
3520 target_cpu_default="TARGET_CPU_v850e2v3"
3523 target_cpu_default="TARGET_CPU_v850e2"
3525 v850e1-*-* | v850es-*-*)
3526 target_cpu_default="TARGET_CPU_v850e1"
3529 target_cpu_default="TARGET_CPU_v850e"
3532 target_cpu_default="TARGET_CPU_generic"
3535 tm_file="elfos.h newlib-stdint.h v850/v850.h"
3537 c_target_objs="v850-c.o"
3538 cxx_target_objs="v850-c.o"
3542 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
3543 extra_options="${extra_options} vax/elf.opt"
3546 tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h"
3547 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
3548 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
3551 tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
3552 tmake_file="visium/t-visium visium/t-crtstuff"
3555 # For historical reasons, the target files omit the 'x'.
3556 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
3557 tm_p_file=stormy16/stormy16-protos.h
3558 md_file=stormy16/stormy16.md
3559 out_file=stormy16/stormy16.cc
3560 extra_options=stormy16/stormy16.opt
3561 tmake_file="stormy16/t-stormy16"
3564 tm_file="${tm_file} elfos.h newlib-stdint.h xtensa/elf.h"
3565 extra_options="${extra_options} xtensa/elf.opt"
3568 tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
3569 tmake_file="${tmake_file} xtensa/t-xtensa"
3572 tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
3573 tmake_file="${tmake_file} xtensa/t-xtensa"
3574 extra_options="${extra_options} xtensa/uclinux.opt"
3577 tm_file="mn10300/mn10300.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
3582 tm_file="elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
3583 c_target_objs="m32c-pragma.o"
3584 cxx_target_objs="m32c-pragma.o"
3587 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3588 c_target_objs="m32c-pragma.o"
3589 cxx_target_objs="m32c-pragma.o"
3592 echo "*** Configuration ${target} not supported" 1>&2
3598 i[34567]86-*-linux* | x86_64-*-linux*)
3599 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
3601 i[34567]86-*-* | x86_64-*-*)
3602 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
3604 powerpc*-*-* | rs6000-*-*)
3605 tm_file="${tm_file} ${cpu_type}/option-defaults.h"
3611 tmake_file="${tmake_file} t-musl"
3614 tmake_file="${tmake_file} t-uclibc"
3618 # Assume the existence of indirect function support and allow the use of the
3619 # resolver attribute.
3621 *-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
3623 *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
3625 *-*-linux* | *-*-gnu*)
3627 aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-* | loongarch*-*)
3628 default_gnu_indirect_function=yes
3634 # Build mkoffload tool
3636 *-intelmic-* | *-intelmicemul-*)
3637 tmake_file="${tmake_file} i386/t-intelmic"
3638 tm_file="${tm_file} i386/intelmic-offload.h"
3642 if [ "$target_has_targetcm" = "no" ]; then
3643 c_target_objs="$c_target_objs default-c.o"
3644 cxx_target_objs="$cxx_target_objs default-c.o"
3647 if [ "$common_out_file" = "" ]; then
3648 if [ "$target_has_targetm_common" = "yes" ]; then
3649 common_out_file="$cpu_type/$cpu_type-common.cc"
3651 common_out_file="default-common.cc"
3655 if [ "$target_has_targetdm" = "no" ]; then
3656 d_target_objs="$d_target_objs default-d.o"
3659 # Support for --with-cpu and related options (and a few unrelated options,
3663 echo "--with-cpu must be passed a value" 1>&2
3668 # Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
3669 # to generic if there is no processor scheduler model for the target.
3672 arch_without_sse2=no
3673 arch_without_64bit=no
3676 if test $fbsd_major -ge 6; then
3682 arch_without_sse2=yes
3683 arch_without_64bit=yes
3688 arch_without_sse2=yes
3689 arch_without_64bit=yes
3694 arch_without_sse2=yes
3695 arch_without_64bit=yes
3700 arch_without_sse2=yes
3701 arch_without_64bit=yes
3704 arch_without_sse2=yes
3705 arch_without_64bit=yes
3706 case ${target_noncanonical} in
3719 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
3729 i686-*-* | i786-*-*)
3730 case ${target_noncanonical} in
3771 amdfam10-*|barcelona-*)
3775 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3779 k8-*|opteron-*|athlon64-*|athlon_fx-*)
3783 athlon_xp-*|athlon_mp-*|athlon_4-*)
3786 arch_without_sse2=yes
3787 arch_without_64bit=yes
3789 athlon_tbird-*|athlon-*)
3792 arch_without_sse2=yes
3797 arch_without_sse2=yes
3802 arch_without_sse2=yes
3804 pentium3-*|pentium3m-*)
3807 arch_without_sse2=yes
3809 pentium4-*|pentium4m-*)
3848 arch_without_sse2=yes
3853 arch_without_sse2=yes
3854 arch_without_64bit=yes
3859 case ${target_noncanonical} in
3900 amdfam10-*|barcelona-*)
3904 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3908 k8-*|opteron-*|athlon_64-*)
3940 # If there is no $with_cpu option, try to infer one from ${target}.
3941 # This block sets nothing except for with_cpu.
3942 if test x$with_cpu = x ; then
3944 i[34567]86-*-elfiamcu)
3947 i[34567]86-*-*|x86_64-*-*)
3965 frv-*-*linux* | frv400-*-*linux*)
3972 case "$with_arch" in
3974 with_cpu=${default_cf_cpu}
3977 with_cpu=m${default_m68k_cpu}
3993 with_cpu="`echo ${target} | sed 's/-.*$//'`"
4002 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
4004 i[34567]86-*-*|x86_64-*-*)
4005 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
4006 if test x$with_cpu_32 = x; then
4007 with_cpu_32=$with_cpu
4009 if test x$with_cpu_64 = x; then
4010 with_cpu_64=$with_cpu
4018 # Support for --with-arch and related options (and a few unrelated options,
4020 case ${with_arch} in
4022 echo "--with-arch must be passed a value" 1>&2
4027 # If there is no $with_arch option, try to infer one from ${target}.
4028 # This block sets nothing except for with_arch.
4029 if test x$with_arch = x ; then
4031 i[34567]86-*-darwin*|x86_64-*-darwin*)
4032 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
4033 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
4035 i[34567]86-*-elfiamcu)
4039 # --with-fpmath sets the default ISA to SSE2, which is the same
4040 # ISA supported by Pentium 4.
4041 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
4050 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4058 # Avoid overriding --with-arch-32 and --with-arch-64 values.
4060 i[34567]86-*-darwin*|x86_64-*-darwin*)
4061 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
4062 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
4064 i[34567]86-*-*|x86_64-*-*)
4065 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
4066 if test x$with_arch_32 = x; then
4067 with_arch_32=$with_arch
4069 if test x$with_arch_64 = x; then
4070 if test $arch_without_64bit = yes; then
4071 # Set the default 64bit arch to x86-64 if the default arch
4072 # doesn't support 64bit.
4075 with_arch_64=$with_arch
4079 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
4080 # Set the default 64bit arch to x86-64 if the default arch
4081 # doesn't support 64bit and we need 64bit ISA.
4082 with_arch_32=$with_arch
4090 # Infer a default setting for --with-float.
4091 if test x$with_float = x; then
4093 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4094 # The R5900 doesn't support 64-bit float. 32-bit float doesn't
4095 # comply with IEEE 754.
4101 # Infer a default setting for --with-fpu.
4102 if test x$with_fpu = x; then
4104 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4105 # The R5900 FPU only supports single precision.
4111 # Support --with-fpmath.
4112 if test x$with_fpmath != x; then
4114 i[34567]86-*-* | x86_64-*-*)
4115 case ${with_fpmath} in
4117 tm_file="${tm_file} i386/avxmath.h"
4120 tm_file="${tm_file} i386/ssemath.h"
4123 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
4129 echo "--with-fpmath isn't supported for $target." 1>&2
4135 # Similarly for --with-schedule.
4136 if test x$with_schedule = x; then
4139 # Override default PA8000 scheduling model.
4140 with_schedule=7100LC
4145 # Infer a default setting for --with-llsc.
4146 if test x$with_llsc = x; then
4149 # The kernel emulates LL and SC where necessary.
4152 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4153 # The R5900 doesn't support LL(D) and SC(D).
4159 # Validate and mark as valid any --with options supported
4160 # by this target. In order to use a particular --with option
4161 # you must list it in supported_defaults; validating the value
4162 # is optional. This case statement should set nothing besides
4163 # supported_defaults.
4168 supported_defaults="abi cpu cpu_64 arch arch_64 tune tune_64"
4169 if test x$with_cpu_64 != x && test x$with_cpu = x; then
4170 with_cpu=$with_cpu_64
4172 if test x$with_arch_64 != x && test x$with_arch = x; then
4173 with_arch=$with_arch_64
4175 if test x$with_tune_64 != x && test x$with_tune = x; then
4176 with_tune=$with_tune_64
4178 for which in cpu arch tune; do
4179 eval "val=\$with_$which"
4180 base_val=`echo $val | sed -e 's/\+.*//'`
4181 ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
4183 if [ $which = arch ]; then
4184 def=aarch64-arches.def
4185 pattern=AARCH64_ARCH
4187 def=aarch64-cores.def
4188 pattern=AARCH64_CORE
4191 ext_mask=AARCH64_CPU_DEFAULT_FLAGS
4193 # Find the base CPU or ARCH id in aarch64-cores.def or
4194 # aarch64-arches.def
4195 if [ x"$base_val" = x ] \
4196 || grep "^$pattern(\"$base_val\"," \
4197 ${srcdir}/config/aarch64/$def \
4200 if [ $which = arch ]; then
4201 base_id=`grep "^$pattern(\"$base_val\"," \
4202 ${srcdir}/config/aarch64/$def | \
4203 sed -e 's/^[^,]*,[ ]*//' | \
4205 # Extract the architecture flags from aarch64-arches.def
4206 ext_mask=`grep "^$pattern(\"$base_val\"," \
4207 ${srcdir}/config/aarch64/$def | \
4211 base_id=`grep "^$pattern(\"$base_val\"," \
4212 ${srcdir}/config/aarch64/$def | \
4213 sed -e 's/^[^,]*,[ ]*//' | \
4217 # Disallow extensions in --with-tune=cortex-a53+crc.
4218 if [ $which = tune ] && [ x"$ext_val" != x ]; then
4219 echo "Architecture extensions not supported in --with-$which=$val" 1>&2
4223 # Use the pre-processor to strip flatten the options.
4224 # This makes the format less rigid than if we use
4225 # grep and sed directly here.
4226 opt_macro="AARCH64_OPT_EXTENSION(A, B, C, D, E, F)=A, B, C, D, E, F"
4227 options_parsed="`$ac_cv_prog_CPP -D"$opt_macro" -x c \
4228 ${srcdir}/config/aarch64/aarch64-option-extensions.def`"
4230 # Match one element inside AARCH64_OPT_EXTENSION, we
4231 # consume anything that's not a ,.
4232 elem="[ ]*\([^,]\+\)[ ]*"
4234 # Repeat the pattern for the number of entries in the
4235 # AARCH64_OPT_EXTENSION, currently 6 times.
4236 sed_patt="^$elem,$elem,$elem,$elem,$elem,$elem"
4238 while [ x"$ext_val" != x ]
4240 ext_val=`echo $ext_val | sed -e 's/\+//'`
4241 ext=`echo $ext_val | sed -e 's/\+.*//'`
4242 base_ext=`echo $ext | sed -e 's/^no//'`
4243 opt_line=`echo -e "$options_parsed" | \
4244 grep "^\"$base_ext\""`
4246 if [ x"$base_ext" = x ] \
4247 || [[ -n $opt_line ]]; then
4249 # These regexp extract the elements based on
4250 # their group match index in the regexp.
4251 ext_canon=`echo -e "$opt_line" | \
4252 sed -e "s/$sed_patt/\2/"`
4253 ext_on=`echo -e "$opt_line" | \
4254 sed -e "s/$sed_patt/\3/"`
4255 ext_off=`echo -e "$opt_line" | \
4256 sed -e "s/$sed_patt/\4/"`
4258 if [ $ext = $base_ext ]; then
4260 ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
4262 # Removing extension
4263 ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
4268 echo "Unknown extension used in --with-$which=$val" 1>&2
4271 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
4274 ext_mask="(("$ext_mask") << TARGET_CPU_NBITS)"
4275 if [ x"$base_id" != x ]; then
4276 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
4280 # Allow --with-$which=native.
4281 if [ "$val" = native ]; then
4284 echo "Unknown $which used in --with-$which=$val" 1>&2
4292 supported_defaults="cpu tune"
4293 for which in cpu tune; do
4294 eval "val=\$with_$which"
4297 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
4298 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
4302 echo "Unknown CPU used in --with-$which=$val" 1>&2
4310 supported_defaults="cpu fpu"
4313 if [ x"$with_cpu" = x ] \
4314 || grep -q -E "^ARC_CPU[[:blank:]]*\($with_cpu," \
4315 ${srcdir}/config/arc/arc-cpus.def
4320 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4324 # see if --with-fpu matches any of the supported FPUs
4329 fpus | fpus_div | fpus_fma | fpus_all)
4333 fpuda | fpuda_div | fpuda_fma | fpuda_all)
4337 fpud | fpud_div | fpud_fma | fpud_all)
4342 echo "Unknown floating point type used in "\
4343 "--with-fpu=$with_fpu" 1>&2
4348 if [ -n "$flags_ok" ] \
4349 && ! grep -q -E "^ARC_CPU[[:blank:]]*\($new_cpu,[[:blank:]]*$flags_ok," \
4350 ${srcdir}/config/arc/arc-cpus.def
4352 echo "Unknown floating point type used in "\
4353 "--with-fpu=$with_fpu for cpu $new_cpu" 1>&2
4359 # Handle --with-multilib-list.
4360 if test "x${with_multilib_list}" != xdefault; then
4361 TM_MULTILIB_CONFIG="${with_multilib_list}"
4366 supported_defaults="cpu endian float"
4370 supported_defaults="arch cpu float tune fpu abi mode tls"
4371 for which in cpu tune arch; do
4372 # See if it matches a supported value
4373 eval "val=\$with_$which"
4374 if [ x"$val" != x ]; then
4375 cpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
4376 -v cmd="chk$which $val" \
4377 ${srcdir}/config/arm/arm-cpus.in`
4378 if [ "$cpu" = "error" ]; then
4379 echo "Unknown target in --with-$which=$val" 1>&2
4383 eval "target_${which}_cname=$new_val"
4384 echo "For $val real value is $new_val"
4389 case "$with_float" in
4391 | soft | hard | softfp)
4395 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4400 # see if --with-fpu matches any of the supported FPUs
4401 if [ x"$with_fpu" != x ] ; then
4403 fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
4404 -v cmd="chkfpu $val" \
4405 ${srcdir}/config/arm/arm-cpus.in`
4406 if [ "$fpu" = "error" ]
4408 echo "Unknown target in --with-fpu=$val" 1>&2
4415 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
4419 echo "Unknown ABI used in --with-abi=$with_abi"
4424 case "$with_mode" in
4430 echo "Unknown mode used in --with-mode=$with_mode"
4441 echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
4446 if test "x$with_arch" != x && test "x$with_cpu" != x; then
4447 echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\"" 1>&2
4451 if test "x$with_cpu" != x && test "x$with_tune" != x; then
4452 echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\"" 1>&2
4456 # Add extra multilibs
4457 if test "x$with_multilib_list" != x; then
4459 arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
4460 if test "x${arm_multilibs}" != xdefault ; then
4461 for arm_multilib in ${arm_multilibs}; do
4462 case ${arm_multilib} in
4464 tmake_profile_file="arm/t-multilib"
4465 tm_mlib_file="arm/arm-mlib.h"
4468 ml=`echo "X$arm_multilib" | sed '1s,^X@,,'`
4469 if test -f "${srcdir}/config/arm/${ml}"; then
4470 tmake_file="${tmake_file} arm/${ml}"
4472 echo "Error: ${ml} does not exist in ${srcdir}/config/arm" >&2
4477 echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
4484 if test "x${tmake_profile_file}" != x ; then
4485 # arm/t-aprofile and arm/t-rmprofile are only
4486 # designed to work without any with-cpu,
4487 # with-arch, with-mode, with-fpu or with-float
4489 if test "x$with_arch" != x \
4490 || test "x$with_cpu" != x \
4491 || test "x$with_float" != x \
4492 || test "x$with_fpu" != x \
4493 || test "x$with_mode" != x ; then
4494 echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
4496 elif test "x$ml" != x ; then
4497 echo "Error: You cannot use builtin multilib profiles along with custom ones" 1>&2
4500 # But pass the default value for float-abi
4501 # through to the multilib selector
4503 tmake_file="${tmake_file} ${tmake_profile_file}"
4504 tm_file="$tm_file $tm_mlib_file"
4505 TM_MULTILIB_CONFIG="$with_multilib_list"
4508 target_cpu_cname=${target_cpu_cname:-arm7tdmi}
4509 with_cpu=${with_cpu:-$target_cpu_cname}
4513 supported_defaults=cpu
4518 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4524 fido-*-* | m68k*-*-*)
4525 supported_defaults="arch cpu"
4526 case "$with_arch" in
4528 m68k_arch_family="$with_arch"
4531 echo "Invalid --with-arch=$with_arch" 1>&2
4536 # We always have a $with_cpu setting here.
4538 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
4539 m68k_cpu_ident=$with_cpu
4542 m68k_cpu_ident=m68020
4543 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
4546 m68k_cpu_ident=m68020
4547 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
4550 # We need the C identifier rather than the string.
4551 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
4552 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
4553 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
4554 ${srcdir}/config/m68k/m68k-devices.def`
4555 if [ x"$m68k_cpu_ident" = x ] ; then
4556 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
4559 with_cpu="mcpu=$with_cpu"
4565 supported_defaults="arch tune"
4567 for which in arch tune; do
4568 eval "val=\$with_$which"
4570 "" | fiji | gfx900 | gfx906 )
4574 echo "Unknown cpu used in --with-$which=$val." 1>&2
4579 [ "x$with_arch" = x ] && with_arch=fiji
4583 supported_defaults="arch schedule"
4585 case "$with_arch" in
4586 "" | 1.0 | 1.1 | 2.0)
4590 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
4595 case "$with_schedule" in
4596 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
4600 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
4606 i[34567]86-*-* | x86_64-*-*)
4607 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
4608 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
4609 eval "val=\$with_$which"
4610 case " $x86_archs " in
4618 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
4627 if test x${val} != x; then
4628 case " $x86_64_archs " in
4630 # Disallow x86-64-v* for --with-cpu=/--with-tune=
4631 case "x$which$val" in
4632 xcpu*x86-64-v*|xtune*x86-64-v*)
4633 echo "Unknown CPU given in --with-$which=$val." 1>&2
4642 # Allow $x86_cpus --with-cpu=/--with-tune=
4645 case " $x86_cpus " in
4650 echo "Unknown CPU given in --with-$which=$val." 1>&2
4656 echo "Unknown CPU given in --with-$which=$val." 1>&2
4669 supported_defaults="abi arch tune riscv_attribute isa_spec"
4672 riscv-* | riscv32*) xlen=32 ;;
4673 riscv64*) xlen=64 ;;
4674 *) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;;
4677 case "${with_isa_spec}" in
4678 ""|default|20191213|201912)
4679 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20191213"
4680 with_isa_spec=20191213
4683 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_2P2"
4686 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20190608"
4687 with_isa_spec=20190608
4690 echo "--with-isa-spec only accept 2.2, 20191213, 201912, 20190608 or 201906" 1>&2
4694 case "${with_riscv_attribute}" in
4696 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4699 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
4702 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4705 echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2
4711 # Infer arch from --with-arch, --target, and --with-abi.
4712 case "${with_arch}" in
4713 rv32e* | rv32i* | rv32g* | rv64i* | rv64g*)
4717 # Infer XLEN, but otherwise assume GC.
4718 case "${with_abi}" in
4719 ilp32e) with_arch="rv32e" ;;
4720 ilp32 | ilp32f | ilp32d) with_arch="rv32gc" ;;
4721 lp64 | lp64f | lp64d) with_arch="rv64gc" ;;
4722 *) with_arch="rv${xlen}gc" ;;
4726 echo "--with-arch=${with_arch} is not supported. The argument must begin with rv32e, rv32i, rv32g, rv64i, or rv64g." 1>&2
4730 PYTHON=`which python || which python3 || which python2`
4731 if test "x${PYTHON}" != x; then
4732 with_arch=`${PYTHON} ${srcdir}/config/riscv/arch-canonicalize -misa-spec=${with_isa_spec} ${with_arch}`
4734 tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ARCH=${with_arch}"
4736 # Make sure --with-abi is valid. If it was not specified,
4737 # pick a default based on the ISA, preferring soft-float
4738 # unless the D extension is present.
4739 case "${with_abi}" in
4740 ilp32 | ilp32e | ilp32f | ilp32d | lp64 | lp64f | lp64d)
4743 case "${with_arch}" in
4744 rv32*d* | rv32g*) with_abi=ilp32d ;;
4745 rv32e*) with_abi=ilp32e ;;
4746 rv32*) with_abi=ilp32 ;;
4747 rv64*d* | rv64g*) with_abi=lp64d ;;
4748 rv64*) with_abi=lp64 ;;
4752 echo "--with-abi=${with_abi} is not supported" 1>&2
4756 tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ABI=${with_abi}"
4758 # Make sure ABI and ISA are compatible.
4759 case "${with_abi},${with_arch}" in
4760 ilp32,rv32* | ilp32e,rv32e* \
4761 | ilp32f,rv32*f* | ilp32f,rv32g* \
4762 | ilp32d,rv32*d* | ilp32d,rv32g* \
4764 | lp64f,rv64*f* | lp64f,rv64g* \
4765 | lp64d,rv64*d* | lp64d,rv64g*)
4768 echo "--with-abi=${with_abi} is not supported for ISA ${with_arch}" 1>&2
4772 # Handle --with-multilib-generator.
4773 if test "x${with_multilib_generator}" != xdefault; then
4774 if test "x${with_multilib_list}" != xdefault; then
4775 echo "--with-multilib-list= can't used with --with-multilib-generator= at same time" 1>&2
4780 if ${srcdir}/config/riscv/multilib-generator \
4781 -misa-spec=${with_isa_spec} \
4782 `echo ${with_multilib_generator} | sed 's/;/ /g'`\
4783 > t-multilib-config;
4785 tmake_file="${tmake_file} riscv/t-withmultilib-generator"
4787 echo "invalid option for --with-multilib-generator" 1>&2
4792 echo "--with-multilib-generator= is not supported for ${target}, only supported for riscv*-*-elf*" 1>&2
4798 # Handle --with-multilib-list.
4799 if test "x${with_multilib_list}" != xdefault; then
4800 tmake_file="${tmake_file} riscv/t-withmultilib"
4802 case ${with_multilib_list} in
4803 ilp32 | ilp32f | ilp32d \
4804 | lp64 | lp64f | lp64d )
4805 TM_MULTILIB_CONFIG="${with_arch},${with_multilib_list}"
4808 echo "--with-multilib-list=${with_multilib_list} not supported."
4815 supported_defaults="abi arch arch_32 arch_64 float fpu nan fp_32 odd_spreg_32 tune tune_32 tune_64 divide llsc mips-plt synci lxc1-sxc1 madd4"
4817 case ${with_float} in
4822 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4828 "" | single | double)
4832 echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
4842 echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
4847 case ${with_fp_32} in
4852 echo "Unknown FP mode used in --with-fp-32=$with_fp_32" 1>&2
4857 case ${with_odd_spreg_32} in
4859 with_odd_spreg_32="odd-spreg"
4862 with_odd_spreg_32="no-odd-spreg"
4868 echo "Unknown odd-spreg-32 type used in --with-odd-spreg-32=$with_odd_spreg_32" 1>&2
4874 "" | 32 | o64 | n32 | 64 | eabi)
4878 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
4883 case ${with_divide} in
4884 "" | breaks | traps)
4888 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
4893 case ${with_llsc} in
4904 echo "Unknown llsc type used in --with-llsc" 1>&2
4909 case ${with_mips_plt} in
4914 with_mips_plt=no-plt
4919 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
4924 case ${with_synci} in
4934 echo "Unknown synci type used in --with-synci" 1>&2
4939 case ${with_lxc1_sxc1} in
4941 with_lxc1_sxc1=lxc1-sxc1
4944 with_lxc1_sxc1=no-lxc1-sxc1
4949 echo "Unknown lxc1-sxc1 type used in --with-lxc1-sxc1" 1>&2
4954 case ${with_madd4} in
4964 echo "Unknown madd4 type used in --with-madd4" 1>&2
4971 supported_defaults="abi arch tune fpu"
4975 abi_pattern abi_default \
4976 abiext_pattern abiext_default \
4977 arch_pattern arch_default \
4978 fpu_pattern fpu_default \
4979 tune_pattern tune_default \
4980 triplet_os triplet_abi
4982 # Infer ABI from the triplet.
4984 loongarch64-*-*-*f64)
4988 loongarch64-*-*-*f32)
4992 loongarch64-*-*-*sf)
4997 abi_pattern="lp64[dfs]"
5002 echo "Unsupported target ${target}." 1>&2
5008 abiext_default="base"
5010 # Get the canonical triplet (multiarch specifier).
5012 *-linux-gnu*) triplet_os="linux-gnu";;
5013 *-linux-musl*) triplet_os="linux-musl";;
5015 echo "Unsupported target ${target}." 1>&2
5020 la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
5023 # Perform initial sanity checks on --with-* options.
5024 case ${with_arch} in
5025 "" | loongarch64 | la464) ;; # OK, append here.
5027 if test x${host} != x${target}; then
5028 echo "--with-arch=native is illegal for cross-compiler." 1>&2
5033 echo "Please set a default value for \${with_arch}" \
5034 "according to your target triplet \"${target}\"." 1>&2
5038 echo "Unknown arch in --with-arch=$with_arch" 1>&2
5044 "" | lp64d | lp64f | lp64s) ;; # OK, append here.
5046 echo "Unsupported ABI given in --with-abi=$with_abi" 1>&2
5051 case ${with_abiext} in
5052 "" | base) ;; # OK, append here.
5054 echo "Unsupported ABI extention type $with_abiext" 1>&2
5060 "" | none | 32 | 64) ;; # OK, append here.
5062 # Convert "0" to "none" for upcoming checks.
5066 echo "Unknown fpu type in --with-fpu=$with_fpu" 1>&2
5072 # Set default value for with_abi.
5075 if test x${abi_default} != x; then
5076 with_abi=${abi_default}
5078 with_abi=${abi_pattern}
5083 if echo "${with_abi}" | grep -E "^${abi_pattern}$" > /dev/null; then
5086 echo "Incompatible options:" \
5087 "--with-abi=${with_abi} and --target=${target}." 1>&2
5093 # Set default value for with_abiext (internal)
5094 case ${with_abiext} in
5096 if test x${abiext_default} != x; then
5097 with_abiext=${abiext_default}
5099 with_abiext=${abiext_pattern}
5104 if echo "${with_abiext}" | grep -E "^${abiext_pattern}$" > /dev/null; then
5107 echo "The ABI extension type \"${with_abiext}\"" \
5108 "is incompatible with --target=${target}." 1>&2
5115 # Infer ISA-related default options from the ABI: pass 1
5116 case ${with_abi}/${with_abiext} in
5118 # architectures that support lp64* ABI
5119 arch_pattern="native|loongarch64|la464"
5120 # default architecture for lp64* ABI
5121 arch_default="loongarch64"
5124 echo "Unsupported ABI type ${with_abi}/${with_abiext}." 1>&2
5129 # Infer ISA-related default options from the ABI: pass 2
5130 case ${with_abi}/${with_abiext} in
5139 fpu_pattern="none|32|64"
5143 echo "Unsupported ABI type ${with_abi}/${with_abiext}." 1>&2
5148 ## Set default value for with_arch.
5149 case ${with_arch} in
5151 if test x${arch_default} != x; then
5152 with_arch=${arch_default}
5154 with_arch=${arch_pattern}
5159 if echo "${with_arch}" | grep -E "^${arch_pattern}$" > /dev/null; then
5162 echo "${with_abi}/${with_abiext} ABI cannot be implemented with" \
5163 "--with-arch=${with_arch}." 1>&2
5169 ## Set default value for with_fpu.
5172 if test x${fpu_default} != x; then
5173 with_fpu=${fpu_default}
5175 with_fpu=${fpu_pattern}
5180 if echo "${with_fpu}" | grep -E "^${fpu_pattern}$" > /dev/null; then
5183 echo "${with_abi}/${with_abiext} ABI cannot be implemented with" \
5184 "--with-fpu=${with_fpu}." 1>&2
5191 # Infer default with_tune from with_arch: pass 1
5192 case ${with_arch} in
5195 tune_default="native"
5198 tune_pattern="loongarch64|la464"
5199 tune_default="la464"
5202 # By default, $with_tune == $with_arch
5203 tune_pattern="$with_arch"
5207 ## Set default value for with_tune.
5208 case ${with_tune} in
5210 if test x${tune_default} != x; then
5211 with_tune=${tune_default}
5213 with_tune=${tune_pattern}
5218 if echo "${with_tune}" | grep -E "^${tune_pattern}$" > /dev/null; then
5221 echo "Incompatible options: --with-tune=${with_tune}" \
5222 "and --with-arch=${with_arch}." 1>&2
5228 # Handle --with-multilib-list.
5229 if test x"${with_multilib_list}" = x \
5230 || test x"${with_multilib_list}" = xno \
5231 || test x"${with_multilib_list}" = xdefault \
5232 || test x"${enable_multilib}" != xyes; then
5234 with_multilib_list="${with_abi}/${with_abiext}"
5237 # Check if the configured default ABI combination is included in
5238 # ${with_multilib_list}.
5239 loongarch_multilib_list_sane=no
5241 # This one goes to TM_MULTILIB_CONFIG, for use in t-linux.
5242 loongarch_multilib_list_make=""
5244 # This one goes to tm_defines, for use in loongarch-driver.c.
5245 loongarch_multilib_list_c=""
5247 # ${with_multilib_list} should not contain whitespaces,
5248 # consecutive commas or slashes.
5249 if echo "${with_multilib_list}" \
5250 | grep -E -e "[[:space:]]" -e '[,/][,/]' -e '[,/]$' -e '^[,/]' > /dev/null; then
5251 echo "Invalid argument to --with-multilib-list." 1>&2
5255 unset component idx elem_abi_base elem_abi_ext elem_tmp
5256 for elem in $(echo "${with_multilib_list}" | tr ',' ' '); do
5260 component=$(echo "${elem}" | awk -F'/' '{print $'"${idx}"'}')
5264 # Component 1: Base ABI type
5265 case ${component} in
5266 lp64d) elem_tmp="ABI_BASE_LP64D,";;
5267 lp64f) elem_tmp="ABI_BASE_LP64F,";;
5268 lp64s) elem_tmp="ABI_BASE_LP64S,";;
5270 echo "Unknown base ABI \"${component}\" in --with-multilib-list." 1>&2
5274 loongarch_multilib_list_c="${loongarch_multilib_list_c}${elem_tmp}"
5275 loongarch_multilib_list_make="${loongarch_multilib_list_make}mabi=${component}"
5276 elem_abi_base="${component}"
5280 # Component 2: ABI extension type
5281 case ${component} in
5284 elem_tmp="ABI_EXT_BASE,"
5287 echo "Unknown ABI extension \"${component}\" in --with-multilib-list." 1>&2
5291 loongarch_multilib_list_c="${loongarch_multilib_list_c}${elem_tmp}"
5292 loongarch_multilib_list_make="${loongarch_multilib_list_make}" # Add nothing for now.
5293 elem_abi_ext="${component}"
5297 # Component 3 and on: optional stuff
5298 case ${component} in
5300 # End of component list.
5304 echo "Unknown ABI \"${elem}\" in --with-multilib-list." 1>&2
5312 if test x${elem_abi_base} = x${with_abi} \
5313 && test x${elem_abi_ext} = x${with_abiext}; then
5314 loongarch_multilib_list_sane=yes
5316 loongarch_multilib_list_make="${loongarch_multilib_list_make},"
5319 # Check if the default ABI combination is in the default list.
5320 if test x${loongarch_multilib_list_sane} = xno; then
5321 if test x${with_abiext} = xbase; then
5324 with_abiext="/${with_abiext}"
5327 echo "Default ABI combination (${with_abi}${with_abiext})" \
5328 "not found in --with-multilib-list." 1>&2
5332 # Remove the excessive appending comma.
5333 loongarch_multilib_list_c=${loongarch_multilib_list_c%,}
5334 loongarch_multilib_list_make=${loongarch_multilib_list_make%,}
5338 supported_defaults="arch cpu nds32_lib float fpu_config"
5340 # process --with-arch
5341 case "${with_arch}" in
5343 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
5347 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
5350 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
5353 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
5357 echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
5362 case "${with_cpu}" in
5366 n6 | n7 |n8 | e8 | s8 | n9 | n10 | d10 | n12 | n13 | n15)
5370 echo "Cannot accept --with-cpu=$with_cpu, available values are: n6 n7 n8 e8 s8 n9 n10 d10 n12 n13 n15" 1>&2
5375 # process --with-nds32-lib
5376 case "${with_nds32_lib}" in
5380 with_nds32_lib=ulibc
5383 with_nds32_lib=glibc
5386 with_nds32_lib=newlib
5387 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
5393 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
5397 # for the arch=v3f or arch=v3s under mculib toolchain,
5398 # we would like to set -fno-math-errno as default
5399 case "${with_arch}" in
5401 tm_defines="${tm_defines} TARGET_DEFAULT_NO_MATH_ERRNO=1"
5409 echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib glibc uclibc" 1>&2
5414 # process --with-float
5415 case "${with_float}" in
5420 echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
5425 # process --with-config-fpu
5426 case "${with_config_fpu}" in
5431 echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
5439 supported_defaults="arch"
5440 case "$with_arch" in
5445 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
5451 powerpc*-*-* | rs6000-*-*)
5452 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
5454 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
5455 eval "val=\$with_$which"
5457 default32 | default64)
5462 echo "$val only valid for --with-cpu and --with-tune." 1>&2
5466 with_which="with_$which"
5470 tm_defines="${tm_defines} CONFIG_PPC405CR"
5471 eval "with_$which=405"
5473 "" | common | native \
5474 | power[3456789] | power10 | power5+ | power6x \
5475 | powerpc | powerpc64 | powerpc64le \
5477 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
5478 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
5479 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
5480 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
5481 | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
5485 echo "Unknown cpu used in --with-$which=$val." 1>&2
5492 "" | elfv1 | elfv2 )
5496 echo "Unknown ABI used in --with-abi=$with_abi"
5501 if test "x$with_advance_toolchain" != x; then
5502 if test -d "/opt/$with_advance_toolchain/." -a \
5503 -d "/opt/$with_advance_toolchain/bin/." -a \
5504 -d "/opt/$with_advance_toolchain/include/."; then
5506 tm_file="$tm_file ./advance-toolchain.h"
5507 (at="/opt/$with_advance_toolchain"
5508 echo "/* Use Advance Toolchain $at */"
5510 echo "#undef LINK_OS_NEW_DTAGS_SPEC"
5511 echo "#define LINK_OS_NEW_DTAGS_SPEC" \
5512 "\"--enable-new-dtags\""
5514 echo "#undef DYNAMIC_LINKER_PREFIX"
5515 echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
5517 echo "#undef MD_EXEC_PREFIX"
5518 echo "#define MD_EXEC_PREFIX \"$at/bin/\""
5520 echo "#undef MD_STARTFILE_PREFIX"
5521 echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\""
5523 echo "#undef MD_STARTFILE_PREFIX_1"
5524 echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \
5525 > advance-toolchain.h
5527 echo "Unknown advance-toolchain $with_advance_toolchain"
5532 # Set up the default long double format if the user changed it.
5533 if test x$with_long_double_format = xieee; then
5534 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
5536 elif test x$with_long_double_format = xibm; then
5537 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
5542 supported_defaults="arch mode tune"
5544 for which in arch tune; do
5545 eval "val=\$with_$which"
5547 "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | z16 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 | arch14 )
5551 echo "Unknown cpu used in --with-$which=$val." 1>&2
5557 case ${with_mode} in
5562 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
5568 sh[123456ble]*-*-* | sh-*-*)
5569 supported_defaults="cpu"
5570 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
5571 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
5574 m2a | m2a-single | m2a-single-only | m2a-nofpu)
5576 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
5579 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
5580 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
5581 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
5582 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
5588 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
5590 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
5591 eval "val=\$with_$which"
5593 "" | sparc | sparcv9 | sparc64 \
5595 | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
5596 | sparclite | f930 | f934 | sparclite86x \
5597 | sparclet | tsc701 \
5598 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
5599 | niagara3 | niagara4 | niagara7 | m8)
5603 echo "Unknown cpu used in --with-$which=$val" 1>&2
5609 case ${with_float} in
5614 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
5621 supported_defaults="arch"
5623 case ${with_arch} in
5624 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
5628 echo "Unknown arch used in --with-arch=$with_arch." 1>&2
5635 supported_defaults=cpu
5637 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
5641 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5647 supported_defaults="cpu"
5651 *) echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5658 # Targets for which there is at least one VxWorks port should include
5659 # vxworks-dummy.h to allow safe references to various TARGET_VXWORKS kinds
5660 # of markers from other files in the port, including the vxworks*.h files to
5661 # distinguish VxWorks variants such as VxWorks 7 or 64).
5664 arm*-*-* | i[34567]86-*-* | mips*-*-* | powerpc*-*-* | sh*-*-* \
5665 | sparc*-*-* | x86_64-*-*)
5666 tm_file="vxworks-dummy.h ${tm_file}"
5670 # Set some miscellaneous flags for particular targets.
5671 target_cpu_default2=
5674 if test x"$target_cpu_cname" != x
5676 target_cpu_default2=$target_cpu_cname
5681 if test x$with_cpu = x
5683 echo "Don't know the target cpu" 1>&2
5686 target_cpu_default2="\\\"$with_cpu\\\""
5691 if test x$gas = xyes
5693 target_cpu_default2="MASK_GAS"
5697 fido*-*-* | m68k*-*-*)
5698 target_cpu_default2=$m68k_cpu_ident
5699 tmake_file="m68k/t-opts $tmake_file"
5700 if [ x"$m68k_arch_family" != x ]; then
5701 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
5705 i[34567]86-*-darwin* | x86_64-*-darwin*)
5707 i[34567]86-*-linux* | x86_64-*-linux*)
5708 extra_objs="${extra_objs} gnu-property.o"
5709 tmake_file="$tmake_file i386/t-linux i386/t-gnu-property"
5711 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
5712 tmake_file="$tmake_file i386/t-kfreebsd"
5715 tmake_file="$tmake_file i386/t-gnu"
5717 i[34567]86-*-msdosdjgpp*)
5718 tmake_file="${tmake_file} i386/t-djgpp"
5720 i[34567]86-*-solaris2* | x86_64-*-solaris2*)
5722 i[34567]86-*-cygwin* | x86_64-*-cygwin*)
5724 i[34567]86-*-mingw* | x86_64-*-mingw*)
5726 i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
5728 i[34567]86-*-freebsd*)
5731 tmake_file="${tmake_file} i386/t-freebsd64"
5737 if test x$gnu_ld = xyes
5739 target_cpu_default2="MASK_SPLIT_ADDRESSES"
5743 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
5746 if test x$with_arch != x; then
5747 default_mips_arch=$with_arch
5749 if test x$with_abi != x; then
5750 default_mips_abi=$with_abi
5752 case ${default_mips_arch} in
5753 mips1) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS1" ;;
5754 mips2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS2" ;;
5755 mips3) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS3" ;;
5756 mips4) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS4" ;;
5757 mips32) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32" ;;
5758 mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2" ;;
5759 mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6" ;;
5760 mips64) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64" ;;
5761 mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2" ;;
5762 mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6" ;;
5764 case ${default_mips_abi} in
5765 32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
5766 o64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;;
5767 n32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;;
5768 64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;;
5769 eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;;
5771 tmake_file="mips/t-mips $tmake_file"
5775 # Export canonical triplet.
5776 tm_defines="${tm_defines} LA_MULTIARCH_TRIPLET=${la_canonical_triplet}"
5778 # Define macro LA_DISABLE_MULTILIB if --disable-multilib
5779 tm_defines="${tm_defines} TM_MULTILIB_LIST=${loongarch_multilib_list_c}"
5780 if test x$enable_multilib = xyes; then
5781 TM_MULTILIB_CONFIG="${loongarch_multilib_list_make}"
5783 tm_defines="${tm_defines} LA_DISABLE_MULTILIB"
5786 # Let --with- flags initialize the enum variables from loongarch.opt.
5787 # See macro definitions from loongarch-opts.h and loongarch-cpu.h.
5788 case ${with_arch} in
5789 native) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_NATIVE" ;;
5790 la464) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_LA464" ;;
5791 loongarch64) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_LOONGARCH64" ;;
5794 case ${with_tune} in
5795 native) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_NATIVE" ;;
5796 la464) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_LA464" ;;
5797 loongarch64) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_LOONGARCH64" ;;
5801 lp64d) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64D" ;;
5802 lp64f) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64F" ;;
5803 lp64s) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64S" ;;
5806 case ${with_abiext} in
5807 base) tm_defines="${tm_defines} DEFAULT_ABI_EXT=ABI_EXT_BASE" ;;
5811 none) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_NOFPU" ;;
5812 32) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_FPU32" ;;
5813 64) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_FPU64" ;;
5816 tmake_file="loongarch/t-loongarch $tmake_file"
5819 powerpc*-*-* | rs6000-*-*)
5820 # FIXME: The PowerPC port uses the value set at compile time,
5821 # although it's only cosmetic.
5822 if test "x$with_cpu" != x
5824 target_cpu_default2="\\\"$with_cpu\\\""
5826 out_file="${cpu_type}/${cpu_type}.cc"
5827 c_target_objs="${c_target_objs} ${cpu_type}-c.o"
5828 cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
5829 d_target_objs="${d_target_objs} ${cpu_type}-d.o"
5830 tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
5833 sh[123456ble]*-*-* | sh-*-*)
5834 c_target_objs="${c_target_objs} sh-c.o"
5835 cxx_target_objs="${cxx_target_objs} sh-c.o"
5839 # Some standard aliases.
5844 xsparcv9 | xsparc64)
5849 if test x$with_tune = x ; then
5860 # The SPARC port checks this value at compile-time.
5861 target_cpu_default2="TARGET_CPU_$with_cpu"
5865 case "x$with_cpu" in
5868 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
5869 target_cpu_default2="TARGET_CPU_$with_cpu"
5872 target_cpu_default2="TARGET_CPU_v850e1"
5877 target_cpu_default2="TARGET_CPU_$with_cpu"
5882 all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan fp_32 odd_spreg_32 divide llsc mips-plt synci tls lxc1-sxc1 madd4 isa_spec"
5883 for option in $all_defaults
5885 eval "val=\$with_"`echo $option | sed s/-/_/g`
5886 if test -n "$val"; then
5887 case " $supported_defaults " in
5891 echo "This target does not support --with-$option." 2>&1
5892 echo "Valid --with options are: $supported_defaults" 2>&1
5899 t="{ \"$option\", \"$val\" }"
5901 t="${t}, { \"$option\", \"$val\" }"
5908 configure_default_options="{ { NULL, NULL} }"
5910 configure_default_options="{ ${t} }"
5913 if test "$target_cpu_default2" != ""
5915 if test "$target_cpu_default" != ""
5917 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5919 target_cpu_default=$target_cpu_default2
5924 i[34567]86-*-* | x86_64-*-*)
5925 if test x$enable_as_accelerator = xyes; then
5926 extra_programs="mkoffload\$(exeext)"