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 aarch64-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"
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"
2839 if test x$enable_as_accelerator = xyes; then
2840 extra_programs="${extra_programs} mkoffload\$(exeext)"
2841 tm_file="${tm_file} nvptx/offload.h"
2845 tm_file="elfos.h ${tm_file}"
2846 tmake_file="${tmake_file} or1k/t-or1k"
2847 # Force .init_array support. The configure script cannot always
2848 # automatically detect that GAS supports it, yet we require it.
2849 gcc_cv_initfini_array=yes
2851 # Handle --with-multilib-list=...
2852 or1k_multilibs="${with_multilib_list}"
2853 if test "$or1k_multilibs" = "default"; then
2854 or1k_multilibs="mcmov,msoft-mul,msoft-div"
2856 or1k_multilibs=`echo $or1k_multilibs | sed -e 's/,/ /g'`
2857 for or1k_multilib in ${or1k_multilibs}; do
2858 case ${or1k_multilib} in
2859 mcmov | msext | msfimm | \
2861 mhard-float | mdouble-float | munordered-float | msoft-float | \
2862 mhard-div | mhard-mul | \
2863 msoft-div | msoft-mul )
2864 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${or1k_multilib}"
2867 echo "--with-multilib-list=${with_multilib_list} not supported."
2871 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
2875 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h"
2876 tm_file="${tm_file} or1k/linux.h"
2879 tm_file="${tm_file} newlib-stdint.h or1k/elf.h"
2880 extra_options="${extra_options} or1k/elf.opt"
2883 tm_file="${tm_file} newlib-stdint.h or1k/rtems.h rtems.h"
2884 tmake_file="${tmake_file} or1k/t-rtems"
2889 tm_file="${tm_file} newlib-stdint.h"
2892 # port not yet contributed
2893 #powerpc-*-openbsd*)
2894 # tmake_file="${tmake_file} rs6000/t-fprules"
2898 extra_options="${extra_options} ${cpu_type}/darwin.opt"
2900 *-darwin1[0-9]* | *-darwin9*)
2901 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2902 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2905 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2906 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2909 tm_file="${tm_file} ${cpu_type}/darwin7.h"
2912 # Earlier - ingle arch, with 32b only
2913 # OS X 10.0, the first edition is Darwin4
2916 tmake_file="${tmake_file} t-slibgcc"
2918 powerpc64-*-darwin*)
2919 extra_options="${extra_options} ${cpu_type}/darwin.opt"
2920 tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
2921 tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
2923 powerpc*-*-freebsd*)
2924 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
2925 extra_options="${extra_options} rs6000/sysv4.opt"
2926 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2929 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2933 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2934 tmake_file="${tmake_file} rs6000/t-freebsd64"
2935 extra_options="${extra_options} rs6000/linux64.opt"
2936 if test $fbsd_major -ge 13; then
2937 tm_defines="${tm_defines} TARGET_FREEBSD32_SECURE_PLT=1"
2941 if test $fbsd_major -ge 13; then
2942 tm_file="rs6000/secureplt.h ${tm_file}"
2944 tm_file="${tm_file} rs6000/freebsd.h"
2949 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2950 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2951 tmake_file="${tmake_file} rs6000/t-netbsd"
2952 extra_options="${extra_options} rs6000/sysv4.opt"
2954 powerpc-*-eabisimaltivec*)
2955 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"
2956 extra_options="${extra_options} rs6000/sysv4.opt"
2957 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2961 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"
2962 extra_options="${extra_options} rs6000/sysv4.opt"
2963 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2967 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2968 extra_options="${extra_options} rs6000/sysv4.opt"
2969 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2971 powerpc-*-eabialtivec*)
2972 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"
2973 extra_options="${extra_options} rs6000/sysv4.opt"
2974 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2978 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"
2979 extra_options="${extra_options} rs6000/sysv4.opt"
2980 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2984 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"
2985 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2986 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2989 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
2990 extra_options="${extra_options} rs6000/sysv4.opt"
2991 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
2992 extra_objs="$extra_objs rs6000-linux.o"
2995 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2997 case ${target}:${with_cpu} in
2998 powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
3000 maybe_biarch=${cpu_is_64bit}
3001 case ${enable_targets} in
3002 *powerpc64*) maybe_biarch=yes ;;
3003 all) maybe_biarch=yes ;;
3005 case ${target}:${enable_targets}:${maybe_biarch} in
3006 powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
3007 | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
3008 | powerpcle-*:*powerpc64le*:yes)
3009 if test x$cpu_is_64bit = xyes; then
3010 tm_file="${tm_file} rs6000/default64.h"
3012 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
3013 tmake_file="$tmake_file rs6000/t-linux64"
3016 tmake_file="$tmake_file rs6000/t-linux64le"
3017 case ${enable_targets} in
3018 all | *powerpc64-* | *powerpc-*)
3019 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
3022 case ${enable_targets} in
3023 all | *powerpc64le-* | *powerpcle-*)
3024 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
3027 extra_options="${extra_options} rs6000/linux64.opt"
3030 tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
3031 extra_options="${extra_options} rs6000/linux64.opt"
3032 tmake_file="${tmake_file} rs6000/t-linux"
3035 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
3036 tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
3040 powerpc*-*-linux*ppc476*)
3041 tm_file="${tm_file} rs6000/476.h"
3042 extra_options="${extra_options} rs6000/476.opt" ;;
3043 powerpc*-*-linux*altivec*)
3044 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
3048 enable_secureplt=yes ;;
3050 if test x${enable_secureplt} = xyes; then
3051 tm_file="rs6000/secureplt.h ${tm_file}"
3054 powerpc*-wrs-vxworks7r*)
3056 # Wind River 7 post SR0600 is mostly like Linux so we setup
3057 # our config in a very similar fashion and adjust to a few
3060 # The system compiler is configured with secureplt by default.
3061 tm_file="${tm_file} rs6000/secureplt.h"
3063 tm_file="${tm_file} elfos.h gnu-user.h linux.h freebsd-spec.h"
3064 tm_file="${tm_file} rs6000/sysv4.h rs6000/biarch64.h rs6000/default64.h rs6000/linux64.h"
3065 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
3067 extra_options="${extra_options} rs6000/sysv4.opt linux.opt rs6000/linux64.opt"
3069 tmake_file="${tmake_file} t-linux rs6000/t-linux64 rs6000/t-fprules rs6000/t-ppccomm"
3070 tmake_file="${tmake_file} rs6000/t-vxworks"
3072 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
3073 extra_objs="$extra_objs linux.o rs6000-linux.o"
3075 powerpc-wrs-vxworks*)
3076 tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
3077 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
3078 extra_options="${extra_options} rs6000/sysv4.opt"
3079 extra_headers="${extra_headers} ppc-asm.h"
3082 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
3083 tmake_file="${tmake_file} rs6000/t-vxworksmils"
3086 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
3087 tmake_file="${tmake_file} rs6000/t-vxworksae"
3090 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
3096 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
3097 tmake_file="t-lynx rs6000/t-lynx"
3098 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
3104 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"
3105 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3106 extra_options="${extra_options} rs6000/sysv4.opt"
3108 powerpcle-*-eabisim*)
3109 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"
3110 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3111 extra_options="${extra_options} rs6000/sysv4.opt"
3115 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"
3116 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
3117 extra_options="${extra_options} rs6000/sysv4.opt"
3121 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3122 tmake_file="${tmake_file} pru/t-pru"
3123 extra_objs="pru-pragma.o pru-passes.o"
3126 rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
3127 tmake_file="rs6000/t-aix52 t-slibgcc"
3128 if test x$cpu_is_64bit = xyes; then
3129 tm_file="${tm_file} rs6000/biarch64.h"
3130 tmake_file="rs6000/t-aix64 t-slibgcc"
3132 tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
3133 extra_options="${extra_options} rs6000/aix64.opt"
3137 default_use_cxa_atexit=yes
3139 rs6000-ibm-aix7.2.* | powerpc-ibm-aix7.2.*)
3140 tmake_file="rs6000/t-aix52 t-slibgcc"
3141 if test x$cpu_is_64bit = xyes; then
3142 tm_file="${tm_file} rs6000/biarch64.h"
3143 tmake_file="rs6000/t-aix64 t-slibgcc"
3145 tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
3146 extra_options="${extra_options} rs6000/aix64.opt"
3150 default_use_cxa_atexit=yes
3152 rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
3153 tmake_file="rs6000/t-aix52 t-slibgcc"
3154 if test x$cpu_is_64bit = xyes; then
3155 tm_file="${tm_file} rs6000/biarch64.h"
3156 tmake_file="rs6000/t-aix64 t-slibgcc"
3158 tm_file="${tm_file} rs6000/aix.h rs6000/aix73.h rs6000/xcoff.h rs6000/aix-stdint.h"
3159 extra_options="${extra_options} rs6000/aix64.opt"
3163 default_use_cxa_atexit=yes
3166 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3167 target_has_targetm_common=no
3168 c_target_objs="rl78-c.o"
3169 cxx_target_objs="rl78-c.o"
3170 tmake_file="${tmake_file} rl78/t-rl78"
3173 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
3174 tmake_file="${tmake_file} rx/t-rx"
3175 extra_options="${extra_options} rx/elf.opt"
3178 tm_file="elfos.h linux.h glibc-stdint.h rx/linux.h ../../libgcc/config/rx/rx-abi.h"
3179 tmake_file="${tmake_file} rx/t-linux"
3182 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
3183 c_target_objs="${c_target_objs} s390-c.o"
3184 cxx_target_objs="${cxx_target_objs} s390-c.o"
3185 if test x$enable_targets = xall; then
3186 tmake_file="${tmake_file} s390/t-linux64"
3188 tmake_file="${tmake_file} s390/t-s390"
3191 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
3192 tm_p_file="linux-protos.h s390/s390-protos.h"
3193 c_target_objs="${c_target_objs} s390-c.o"
3194 cxx_target_objs="${cxx_target_objs} s390-c.o"
3195 md_file=s390/s390.md
3196 extra_modes=s390/s390-modes.def
3197 out_file=s390/s390.cc
3198 tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
3201 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h glibc-stdint.h s390/tpf.h"
3202 tm_p_file=s390/s390-protos.h
3203 c_target_objs="${c_target_objs} s390-c.o"
3204 cxx_target_objs="${cxx_target_objs} s390-c.o"
3205 md_file=s390/s390.md
3206 extra_modes=s390/s390-modes.def
3207 out_file=s390/s390.cc
3209 extra_options="${extra_options} s390/tpf.opt"
3210 tmake_file="${tmake_file} s390/t-s390"
3212 sh-*-elf* | sh[12346l]*-*-elf* | \
3213 sh-*-linux* | sh[2346lbe]*-*-linux* | \
3214 sh-*-netbsdelf* | shl*-*-netbsdelf*)
3215 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
3216 if test x${with_endian} = x; then
3218 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
3219 shbe-*-* | sheb-*-*) with_endian=big,little ;;
3220 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
3221 shl* | sh*-*-linux* | \
3222 sh-superh-elf) with_endian=little,big ;;
3223 sh[1234]*-*-*) with_endian=big ;;
3224 *) with_endian=big,little ;;
3227 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
3228 # First word : the default endian.
3229 # Second word: the secondary endian (optional).
3230 case ${with_endian} in
3231 big) TM_ENDIAN_CONFIG=mb ;;
3232 little) TM_ENDIAN_CONFIG=ml ;;
3233 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
3234 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
3235 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
3237 case ${with_endian} in
3238 little*) tm_file="sh/little.h ${tm_file}" ;;
3240 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
3242 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
3243 if test x$enable_fdpic = xyes; then
3244 tm_defines="$tm_defines FDPIC_DEFAULT=1"
3246 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
3248 tm_file="${tm_file} ${nbsd_tm_file} sh/netbsd-elf.h"
3249 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3252 sh*-superh-elf) if test x$with_libgloss != xno; then
3254 tm_file="${tm_file} sh/newlib.h"
3256 tm_file="${tm_file} sh/embed-elf.h"
3257 tm_file="${tm_file} sh/superh.h"
3258 extra_options="${extra_options} sh/superh.opt" ;;
3259 *) if test x$with_newlib = xyes \
3260 && test x$with_libgloss = xyes; then
3261 tm_file="${tm_file} sh/newlib.h"
3263 tm_file="${tm_file} sh/embed-elf.h" ;;
3269 tm_file="${tm_file} newlib-stdint.h"
3272 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
3273 case `echo ${target} | sed 's/e[lb]-/-/'` in
3274 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
3275 sh4a_single*) sh_cpu_target=sh4a-single ;;
3276 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
3277 sh4al) sh_cpu_target=sh4al ;;
3278 sh4a*) sh_cpu_target=sh4a ;;
3279 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
3280 sh4_single*) sh_cpu_target=sh4-single ;;
3281 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
3282 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
3283 sh3e*) sh_cpu_target=sh3e ;;
3284 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
3285 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
3286 sh2a_single*) sh_cpu_target=sh2a-single ;;
3287 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
3288 sh2a*) sh_cpu_target=sh2a ;;
3289 sh2e*) sh_cpu_target=sh2e ;;
3290 sh2*) sh_cpu_target=sh2 ;;
3291 *) sh_cpu_target=sh1 ;;
3293 # did the user say --without-fp ?
3294 if test x$with_fp = xno; then
3295 case ${sh_cpu_target} in
3297 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
3298 sh4*) sh_cpu_target=sh4-nofpu ;;
3299 sh3*) sh_cpu_target=sh3 ;;
3300 sh2a*) sh_cpu_target=sh2a-nofpu ;;
3301 sh2*) sh_cpu_target=sh2 ;;
3302 *) echo --without-fp not available for $target: ignored
3304 tm_defines="$tm_defines STRICT_NOFPU=1"
3306 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
3307 case $sh_cpu_default in
3308 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
3309 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
3310 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
3311 sh3e | sh3 | sh2e | sh2 | sh1) ;;
3312 "") sh_cpu_default=${sh_cpu_target} ;;
3313 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
3315 sh_multilibs=${with_multilib_list}
3316 if test "$sh_multilibs" = "default" ; then
3318 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
3319 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
3320 sh*-*-linux*) sh_multilibs=m1,m2,m2a,m3e,m4 ;;
3321 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
3322 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
3324 if test x$with_fp = xno; then
3325 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`"
3328 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
3329 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
3330 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
3331 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
3332 for sh_multilib in ${sh_multilibs}; do
3333 case ${sh_multilib} in
3334 m1 | m2 | m2e | m3 | m3e | \
3335 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
3336 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
3337 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3338 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
3339 # It is passed to MULTIILIB_OPTIONS verbatim.
3340 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
3341 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
3343 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
3344 # It is passed the MULTILIB_EXCEPTIONS verbatim.
3345 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
3347 echo "with_multilib_list=${sh_multilib} not supported."
3352 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
3353 if test x${enable_incomplete_targets} = xyes ; then
3354 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
3356 tm_file="$tm_file ./sysroot-suffix.h"
3357 tmake_file="$tmake_file t-sysroot-suffix"
3360 tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
3361 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
3364 tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
3365 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
3368 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
3371 tmake_file="sparc/t-sparc sparc/t-leon"
3374 tmake_file="sparc/t-sparc sparc/t-leon3"
3377 tmake_file="sparc/t-sparc sparc/t-elf"
3382 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
3383 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
3386 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
3387 extra_options="${extra_options} sparc/long-double-switch.opt"
3390 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
3393 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
3396 tmake_file="${tmake_file} sparc/t-sparc"
3399 if test x$enable_targets = xall; then
3400 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
3401 tmake_file="${tmake_file} sparc/t-linux64"
3403 tm_file="${tm_file} sparc/linux.h"
3404 tmake_file="${tmake_file} sparc/t-linux"
3408 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3409 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3410 extra_options="${extra_options} sparc/long-double-switch.opt"
3411 tmake_file="${tmake_file} sparc/t-sparc"
3414 tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
3416 sparc64-*-* | sparcv9-*-*)
3417 tm_file="sparc/default64.h ${tm_file}"
3420 test x$with_cpu != x || with_cpu=v9
3423 tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
3426 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
3427 tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
3430 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
3431 extra_options="${extra_options}"
3432 tmake_file="${tmake_file} sparc/t-sparc"
3435 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
3436 extra_options="${extra_options}"
3437 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
3440 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"
3441 extra_options="${extra_options} sparc/long-double-switch.opt"
3442 tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
3444 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
3445 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
3446 extra_options="${extra_options} sparc/long-double-switch.opt"
3447 case "x$with_cpu" in
3449 x) with_cpu=ultrasparc ;;
3450 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
3452 tmake_file="${tmake_file} sparc/t-sparc"
3455 tm_file="sparc/biarch64.h ${tm_file}"
3456 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3457 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3458 extra_options="${extra_options} sparc/long-double-switch.opt"
3459 tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
3462 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
3463 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
3464 extra_options="${extra_options} openbsd.opt"
3465 extra_options="${extra_options}"
3468 tmake_file="${tmake_file} sparc/t-sparc"
3471 tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
3472 tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
3473 tmake_file="c6x/t-c6x c6x/t-c6x-elf"
3477 tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
3478 tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
3479 tm_file="${tm_file} ./sysroot-suffix.h"
3480 tmake_file="t-sysroot-suffix t-slibgcc"
3481 tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
3485 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
3486 tmake_file="${tmake_file} tilegx/t-tilegx"
3487 extra_objs="${extra_objs} mul-tables.o"
3488 c_target_objs="${c_target_objs} tilegx-c.o"
3489 cxx_target_objs="${cxx_target_objs} tilegx-c.o"
3490 extra_headers="feedback.h"
3493 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3498 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
3499 tmake_file="${tmake_file} tilepro/t-tilepro"
3500 extra_objs="${extra_objs} mul-tables.o"
3501 c_target_objs="${c_target_objs} tilepro-c.o"
3502 cxx_target_objs="${cxx_target_objs} tilepro-c.o"
3503 extra_headers="feedback.h"
3506 target_cpu_default="TARGET_CPU_generic"
3507 tm_file="elfos.h v850/v850.h"
3508 tm_file="${tm_file} v850/rtems.h rtems.h newlib-stdint.h"
3509 tmake_file="${tmake_file} v850/t-v850"
3510 tmake_file="${tmake_file} v850/t-rtems"
3512 c_target_objs="v850-c.o"
3513 cxx_target_objs="v850-c.o"
3518 target_cpu_default="TARGET_CPU_v850e3v5"
3521 target_cpu_default="TARGET_CPU_v850e2v3"
3524 target_cpu_default="TARGET_CPU_v850e2"
3526 v850e1-*-* | v850es-*-*)
3527 target_cpu_default="TARGET_CPU_v850e1"
3530 target_cpu_default="TARGET_CPU_v850e"
3533 target_cpu_default="TARGET_CPU_generic"
3536 tm_file="elfos.h newlib-stdint.h v850/v850.h"
3538 c_target_objs="v850-c.o"
3539 cxx_target_objs="v850-c.o"
3543 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
3544 extra_options="${extra_options} vax/elf.opt"
3547 tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h"
3548 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
3549 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
3552 tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
3553 tmake_file="visium/t-visium visium/t-crtstuff"
3556 # For historical reasons, the target files omit the 'x'.
3557 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
3558 tm_p_file=stormy16/stormy16-protos.h
3559 md_file=stormy16/stormy16.md
3560 out_file=stormy16/stormy16.cc
3561 extra_options=stormy16/stormy16.opt
3562 tmake_file="stormy16/t-stormy16"
3565 tm_file="${tm_file} elfos.h newlib-stdint.h xtensa/elf.h"
3566 extra_options="${extra_options} xtensa/elf.opt"
3569 tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
3570 tmake_file="${tmake_file} xtensa/t-xtensa"
3573 tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
3574 tmake_file="${tmake_file} xtensa/t-xtensa"
3575 extra_options="${extra_options} xtensa/uclinux.opt"
3578 tm_file="mn10300/mn10300.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
3583 tm_file="elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
3584 c_target_objs="m32c-pragma.o"
3585 cxx_target_objs="m32c-pragma.o"
3588 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3589 c_target_objs="m32c-pragma.o"
3590 cxx_target_objs="m32c-pragma.o"
3593 echo "*** Configuration ${target} not supported" 1>&2
3599 i[34567]86-*-linux* | x86_64-*-linux*)
3600 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
3602 i[34567]86-*-* | x86_64-*-*)
3603 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
3605 powerpc*-*-* | rs6000-*-*)
3606 tm_file="${tm_file} ${cpu_type}/option-defaults.h"
3612 tmake_file="${tmake_file} t-musl"
3615 tmake_file="${tmake_file} t-uclibc"
3619 # Assume the existence of indirect function support and allow the use of the
3620 # resolver attribute.
3622 *-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
3624 *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
3626 *-*-linux* | *-*-gnu*)
3628 aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-* | loongarch*-*)
3629 default_gnu_indirect_function=yes
3635 # Build mkoffload tool
3637 *-intelmic-* | *-intelmicemul-*)
3638 tmake_file="${tmake_file} i386/t-intelmic"
3639 tm_file="${tm_file} i386/intelmic-offload.h"
3643 if [ "$target_has_targetcm" = "no" ]; then
3644 c_target_objs="$c_target_objs default-c.o"
3645 cxx_target_objs="$cxx_target_objs default-c.o"
3648 if [ "$common_out_file" = "" ]; then
3649 if [ "$target_has_targetm_common" = "yes" ]; then
3650 common_out_file="$cpu_type/$cpu_type-common.cc"
3652 common_out_file="default-common.cc"
3656 if [ "$target_has_targetdm" = "no" ]; then
3657 d_target_objs="$d_target_objs default-d.o"
3660 # Support for --with-cpu and related options (and a few unrelated options,
3664 echo "--with-cpu must be passed a value" 1>&2
3669 # Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
3670 # to generic if there is no processor scheduler model for the target.
3673 arch_without_sse2=no
3674 arch_without_64bit=no
3677 if test $fbsd_major -ge 6; then
3683 arch_without_sse2=yes
3684 arch_without_64bit=yes
3689 arch_without_sse2=yes
3690 arch_without_64bit=yes
3695 arch_without_sse2=yes
3696 arch_without_64bit=yes
3701 arch_without_sse2=yes
3702 arch_without_64bit=yes
3705 arch_without_sse2=yes
3706 arch_without_64bit=yes
3707 case ${target_noncanonical} in
3720 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
3730 i686-*-* | i786-*-*)
3731 case ${target_noncanonical} in
3772 amdfam10-*|barcelona-*)
3776 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3780 k8-*|opteron-*|athlon64-*|athlon_fx-*)
3784 athlon_xp-*|athlon_mp-*|athlon_4-*)
3787 arch_without_sse2=yes
3788 arch_without_64bit=yes
3790 athlon_tbird-*|athlon-*)
3793 arch_without_sse2=yes
3798 arch_without_sse2=yes
3803 arch_without_sse2=yes
3805 pentium3-*|pentium3m-*)
3808 arch_without_sse2=yes
3810 pentium4-*|pentium4m-*)
3849 arch_without_sse2=yes
3854 arch_without_sse2=yes
3855 arch_without_64bit=yes
3860 case ${target_noncanonical} in
3901 amdfam10-*|barcelona-*)
3905 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3909 k8-*|opteron-*|athlon_64-*)
3941 # If there is no $with_cpu option, try to infer one from ${target}.
3942 # This block sets nothing except for with_cpu.
3943 if test x$with_cpu = x ; then
3945 i[34567]86-*-elfiamcu)
3948 i[34567]86-*-*|x86_64-*-*)
3966 frv-*-*linux* | frv400-*-*linux*)
3973 case "$with_arch" in
3975 with_cpu=${default_cf_cpu}
3978 with_cpu=m${default_m68k_cpu}
3994 with_cpu="`echo ${target} | sed 's/-.*$//'`"
4003 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
4005 i[34567]86-*-*|x86_64-*-*)
4006 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
4007 if test x$with_cpu_32 = x; then
4008 with_cpu_32=$with_cpu
4010 if test x$with_cpu_64 = x; then
4011 with_cpu_64=$with_cpu
4019 # Support for --with-arch and related options (and a few unrelated options,
4021 case ${with_arch} in
4023 echo "--with-arch must be passed a value" 1>&2
4028 # If there is no $with_arch option, try to infer one from ${target}.
4029 # This block sets nothing except for with_arch.
4030 if test x$with_arch = x ; then
4032 i[34567]86-*-darwin*|x86_64-*-darwin*)
4033 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
4034 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
4036 i[34567]86-*-elfiamcu)
4040 # --with-fpmath sets the default ISA to SSE2, which is the same
4041 # ISA supported by Pentium 4.
4042 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
4051 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4062 # Avoid overriding --with-arch-32 and --with-arch-64 values.
4064 i[34567]86-*-darwin*|x86_64-*-darwin*)
4065 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
4066 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
4068 i[34567]86-*-*|x86_64-*-*)
4069 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
4070 if test x$with_arch_32 = x; then
4071 with_arch_32=$with_arch
4073 if test x$with_arch_64 = x; then
4074 if test $arch_without_64bit = yes; then
4075 # Set the default 64bit arch to x86-64 if the default arch
4076 # doesn't support 64bit.
4079 with_arch_64=$with_arch
4083 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
4084 # Set the default 64bit arch to x86-64 if the default arch
4085 # doesn't support 64bit and we need 64bit ISA.
4086 with_arch_32=$with_arch
4094 # Infer a default setting for --with-float.
4095 if test x$with_float = x; then
4097 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4098 # The R5900 doesn't support 64-bit float. 32-bit float doesn't
4099 # comply with IEEE 754.
4105 # Infer a default setting for --with-fpu.
4106 if test x$with_fpu = x; then
4108 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4109 # The R5900 FPU only supports single precision.
4115 # Support --with-fpmath.
4116 if test x$with_fpmath != x; then
4118 i[34567]86-*-* | x86_64-*-*)
4119 case ${with_fpmath} in
4121 tm_file="${tm_file} i386/avxmath.h"
4124 tm_file="${tm_file} i386/ssemath.h"
4127 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
4133 echo "--with-fpmath isn't supported for $target." 1>&2
4139 # Similarly for --with-schedule.
4140 if test x$with_schedule = x; then
4143 # Override default PA8000 scheduling model.
4144 with_schedule=7100LC
4149 # Infer a default setting for --with-llsc.
4150 if test x$with_llsc = x; then
4153 # The kernel emulates LL and SC where necessary.
4156 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4157 # The R5900 doesn't support LL(D) and SC(D).
4163 # Validate and mark as valid any --with options supported
4164 # by this target. In order to use a particular --with option
4165 # you must list it in supported_defaults; validating the value
4166 # is optional. This case statement should set nothing besides
4167 # supported_defaults.
4172 supported_defaults="abi cpu cpu_64 arch arch_64 tune tune_64"
4173 if test x$with_cpu_64 != x && test x$with_cpu = x; then
4174 with_cpu=$with_cpu_64
4176 if test x$with_arch_64 != x && test x$with_arch = x; then
4177 with_arch=$with_arch_64
4179 if test x$with_tune_64 != x && test x$with_tune = x; then
4180 with_tune=$with_tune_64
4182 for which in cpu arch tune; do
4183 eval "val=\$with_$which"
4184 base_val=`echo $val | sed -e 's/\+.*//'`
4185 ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
4187 if [ $which = arch ]; then
4188 def=aarch64-arches.def
4189 pattern=AARCH64_ARCH
4191 def=aarch64-cores.def
4192 pattern=AARCH64_CORE
4195 ext_mask=AARCH64_CPU_DEFAULT_FLAGS
4197 # Find the base CPU or ARCH id in aarch64-cores.def or
4198 # aarch64-arches.def
4199 if [ x"$base_val" = x ] \
4200 || grep "^$pattern(\"$base_val\"," \
4201 ${srcdir}/config/aarch64/$def \
4204 if [ $which = arch ]; then
4205 base_id=`grep "^$pattern(\"$base_val\"," \
4206 ${srcdir}/config/aarch64/$def | \
4207 sed -e 's/^[^,]*,[ ]*//' | \
4209 # Extract the architecture flags from aarch64-arches.def
4210 ext_mask=`grep "^$pattern(\"$base_val\"," \
4211 ${srcdir}/config/aarch64/$def | \
4215 base_id=`grep "^$pattern(\"$base_val\"," \
4216 ${srcdir}/config/aarch64/$def | \
4217 sed -e 's/^[^,]*,[ ]*//' | \
4221 # Disallow extensions in --with-tune=cortex-a53+crc.
4222 if [ $which = tune ] && [ x"$ext_val" != x ]; then
4223 echo "Architecture extensions not supported in --with-$which=$val" 1>&2
4227 # Use the pre-processor to strip flatten the options.
4228 # This makes the format less rigid than if we use
4229 # grep and sed directly here.
4230 opt_macro="AARCH64_OPT_EXTENSION(A, B, C, D, E, F)=A, B, C, D, E, F"
4231 options_parsed="`$ac_cv_prog_CPP -D"$opt_macro" -x c \
4232 ${srcdir}/config/aarch64/aarch64-option-extensions.def`"
4234 # Match one element inside AARCH64_OPT_EXTENSION, we
4235 # consume anything that's not a ,.
4236 elem="[ ]*\([^,]\+\)[ ]*"
4238 # Repeat the pattern for the number of entries in the
4239 # AARCH64_OPT_EXTENSION, currently 6 times.
4240 sed_patt="^$elem,$elem,$elem,$elem,$elem,$elem"
4242 while [ x"$ext_val" != x ]
4244 ext_val=`echo $ext_val | sed -e 's/\+//'`
4245 ext=`echo $ext_val | sed -e 's/\+.*//'`
4246 base_ext=`echo $ext | sed -e 's/^no//'`
4247 opt_line=`echo -e "$options_parsed" | \
4248 grep "^\"$base_ext\""`
4250 if [ x"$base_ext" = x ] \
4251 || [[ -n $opt_line ]]; then
4253 # These regexp extract the elements based on
4254 # their group match index in the regexp.
4255 ext_canon=`echo -e "$opt_line" | \
4256 sed -e "s/$sed_patt/\2/"`
4257 ext_on=`echo -e "$opt_line" | \
4258 sed -e "s/$sed_patt/\3/"`
4259 ext_off=`echo -e "$opt_line" | \
4260 sed -e "s/$sed_patt/\4/"`
4262 if [ $ext = $base_ext ]; then
4264 ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
4266 # Removing extension
4267 ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
4272 echo "Unknown extension used in --with-$which=$val" 1>&2
4275 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
4278 ext_mask="(("$ext_mask") << TARGET_CPU_NBITS)"
4279 if [ x"$base_id" != x ]; then
4280 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
4284 # Allow --with-$which=native.
4285 if [ "$val" = native ]; then
4288 echo "Unknown $which used in --with-$which=$val" 1>&2
4296 supported_defaults="cpu tune"
4297 for which in cpu tune; do
4298 eval "val=\$with_$which"
4301 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
4302 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
4306 echo "Unknown CPU used in --with-$which=$val" 1>&2
4314 supported_defaults="cpu fpu"
4317 if [ x"$with_cpu" = x ] \
4318 || grep -q -E "^ARC_CPU[[:blank:]]*\($with_cpu," \
4319 ${srcdir}/config/arc/arc-cpus.def
4324 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4328 # see if --with-fpu matches any of the supported FPUs
4333 fpus | fpus_div | fpus_fma | fpus_all)
4337 fpuda | fpuda_div | fpuda_fma | fpuda_all)
4341 fpud | fpud_div | fpud_fma | fpud_all)
4346 echo "Unknown floating point type used in "\
4347 "--with-fpu=$with_fpu" 1>&2
4352 if [ -n "$flags_ok" ] \
4353 && ! grep -q -E "^ARC_CPU[[:blank:]]*\($new_cpu,[[:blank:]]*$flags_ok," \
4354 ${srcdir}/config/arc/arc-cpus.def
4356 echo "Unknown floating point type used in "\
4357 "--with-fpu=$with_fpu for cpu $new_cpu" 1>&2
4363 # Handle --with-multilib-list.
4364 if test "x${with_multilib_list}" != xdefault; then
4365 TM_MULTILIB_CONFIG="${with_multilib_list}"
4370 supported_defaults="cpu endian float"
4374 supported_defaults="arch cpu float tune fpu abi mode tls"
4375 for which in cpu tune arch; do
4376 # See if it matches a supported value
4377 eval "val=\$with_$which"
4378 if [ x"$val" != x ]; then
4379 cpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
4380 -v cmd="chk$which $val" \
4381 ${srcdir}/config/arm/arm-cpus.in`
4382 if [ "$cpu" = "error" ]; then
4383 echo "Unknown target in --with-$which=$val" 1>&2
4387 eval "target_${which}_cname=$new_val"
4388 echo "For $val real value is $new_val"
4393 case "$with_float" in
4395 | soft | hard | softfp)
4399 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4404 # see if --with-fpu matches any of the supported FPUs
4405 if [ x"$with_fpu" != x ] ; then
4407 fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
4408 -v cmd="chkfpu $val" \
4409 ${srcdir}/config/arm/arm-cpus.in`
4410 if [ "$fpu" = "error" ]
4412 echo "Unknown target in --with-fpu=$val" 1>&2
4419 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
4423 echo "Unknown ABI used in --with-abi=$with_abi"
4428 case "$with_mode" in
4434 echo "Unknown mode used in --with-mode=$with_mode"
4445 echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
4450 if test "x$with_arch" != x && test "x$with_cpu" != x; then
4451 echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\"" 1>&2
4455 if test "x$with_cpu" != x && test "x$with_tune" != x; then
4456 echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\"" 1>&2
4460 # Add extra multilibs
4461 if test "x$with_multilib_list" != x; then
4463 arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
4464 if test "x${arm_multilibs}" != xdefault ; then
4465 for arm_multilib in ${arm_multilibs}; do
4466 case ${arm_multilib} in
4468 tmake_profile_file="arm/t-multilib"
4471 ml=`echo "X$arm_multilib" | sed '1s,^X@,,'`
4472 if test -f "${srcdir}/config/arm/${ml}"; then
4473 tmake_file="${tmake_file} arm/${ml}"
4475 echo "Error: ${ml} does not exist in ${srcdir}/config/arm" >&2
4480 echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
4487 if test "x${tmake_profile_file}" != x ; then
4488 # arm/t-aprofile and arm/t-rmprofile are only
4489 # designed to work without any with-cpu,
4490 # with-arch, with-mode, with-fpu or with-float
4492 if test "x$with_arch" != x \
4493 || test "x$with_cpu" != x \
4494 || test "x$with_float" != x \
4495 || test "x$with_fpu" != x \
4496 || test "x$with_mode" != x ; then
4497 echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
4499 elif test "x$ml" != x ; then
4500 echo "Error: You cannot use builtin multilib profiles along with custom ones" 1>&2
4503 # But pass the default value for float-abi
4504 # through to the multilib selector
4506 tmake_file="${tmake_file} ${tmake_profile_file}"
4507 TM_MULTILIB_CONFIG="$with_multilib_list"
4510 target_cpu_cname=${target_cpu_cname:-arm7tdmi}
4511 with_cpu=${with_cpu:-$target_cpu_cname}
4515 supported_defaults=cpu
4520 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4526 fido-*-* | m68k*-*-*)
4527 supported_defaults="arch cpu"
4528 case "$with_arch" in
4530 m68k_arch_family="$with_arch"
4533 echo "Invalid --with-arch=$with_arch" 1>&2
4538 # We always have a $with_cpu setting here.
4540 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
4541 m68k_cpu_ident=$with_cpu
4544 m68k_cpu_ident=m68020
4545 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
4548 m68k_cpu_ident=m68020
4549 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
4552 # We need the C identifier rather than the string.
4553 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
4554 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
4555 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
4556 ${srcdir}/config/m68k/m68k-devices.def`
4557 if [ x"$m68k_cpu_ident" = x ] ; then
4558 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
4561 with_cpu="mcpu=$with_cpu"
4567 supported_defaults="arch tune"
4569 for which in arch tune; do
4570 eval "val=\$with_$which"
4572 "" | fiji | gfx900 | gfx906 | gfx908 | gfx90a)
4576 echo "Unknown cpu used in --with-$which=$val." 1>&2
4581 [ "x$with_arch" = x ] && with_arch=fiji
4585 supported_defaults="arch schedule"
4587 case "$with_arch" in
4588 "" | 1.0 | 1.1 | 2.0)
4592 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
4597 case "$with_schedule" in
4598 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
4602 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
4608 i[34567]86-*-* | x86_64-*-*)
4609 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
4610 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
4611 eval "val=\$with_$which"
4612 case " $x86_archs " in
4620 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
4629 if test x${val} != x; then
4630 case " $x86_64_archs " in
4632 # Disallow x86-64-v* for --with-cpu=/--with-tune=
4633 case "x$which$val" in
4634 xcpu*x86-64-v*|xtune*x86-64-v*)
4635 echo "Unknown CPU given in --with-$which=$val." 1>&2
4644 # Allow $x86_cpus --with-cpu=/--with-tune=
4647 case " $x86_cpus " in
4652 echo "Unknown CPU given in --with-$which=$val." 1>&2
4658 echo "Unknown CPU given in --with-$which=$val." 1>&2
4671 supported_defaults="abi arch tune riscv_attribute isa_spec"
4674 riscv-* | riscv32*) xlen=32 ;;
4675 riscv64*) xlen=64 ;;
4676 *) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;;
4679 case "${with_isa_spec}" in
4680 ""|default|20191213|201912)
4681 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20191213"
4682 with_isa_spec=20191213
4685 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_2P2"
4688 tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20190608"
4689 with_isa_spec=20190608
4692 echo "--with-isa-spec only accept 2.2, 20191213, 201912, 20190608 or 201906" 1>&2
4696 case "${with_riscv_attribute}" in
4698 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4701 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
4704 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4707 echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2
4713 # Infer arch from --with-arch, --target, and --with-abi.
4714 case "${with_arch}" in
4715 rv32e* | rv32i* | rv32g* | rv64i* | rv64g*)
4719 # Infer XLEN, but otherwise assume GC.
4720 case "${with_abi}" in
4721 ilp32e) with_arch="rv32e" ;;
4722 ilp32 | ilp32f | ilp32d) with_arch="rv32gc" ;;
4723 lp64 | lp64f | lp64d) with_arch="rv64gc" ;;
4724 *) with_arch="rv${xlen}gc" ;;
4728 echo "--with-arch=${with_arch} is not supported. The argument must begin with rv32e, rv32i, rv32g, rv64i, or rv64g." 1>&2
4732 PYTHON=`which python || which python3 || which python2`
4733 if test "x${PYTHON}" != x; then
4734 with_arch=`${PYTHON} ${srcdir}/config/riscv/arch-canonicalize -misa-spec=${with_isa_spec} ${with_arch}`
4736 tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ARCH=${with_arch}"
4738 # Make sure --with-abi is valid. If it was not specified,
4739 # pick a default based on the ISA, preferring soft-float
4740 # unless the D extension is present.
4741 case "${with_abi}" in
4742 ilp32 | ilp32e | ilp32f | ilp32d | lp64 | lp64f | lp64d)
4745 case "${with_arch}" in
4746 rv32*d* | rv32g*) with_abi=ilp32d ;;
4747 rv32e*) with_abi=ilp32e ;;
4748 rv32*) with_abi=ilp32 ;;
4749 rv64*d* | rv64g*) with_abi=lp64d ;;
4750 rv64*) with_abi=lp64 ;;
4754 echo "--with-abi=${with_abi} is not supported" 1>&2
4758 tm_defines="${tm_defines} TARGET_RISCV_DEFAULT_ABI=${with_abi}"
4760 # Make sure ABI and ISA are compatible.
4761 case "${with_abi},${with_arch}" in
4762 ilp32,rv32* | ilp32e,rv32e* \
4763 | ilp32f,rv32*f* | ilp32f,rv32g* \
4764 | ilp32d,rv32*d* | ilp32d,rv32g* \
4766 | lp64f,rv64*f* | lp64f,rv64g* \
4767 | lp64d,rv64*d* | lp64d,rv64g*)
4770 echo "--with-abi=${with_abi} is not supported for ISA ${with_arch}" 1>&2
4774 # Handle --with-multilib-generator.
4775 if test "x${with_multilib_generator}" != xdefault; then
4776 if test "x${with_multilib_list}" != xdefault; then
4777 echo "--with-multilib-list= can't used with --with-multilib-generator= at same time" 1>&2
4782 if ${srcdir}/config/riscv/multilib-generator \
4783 -misa-spec=${with_isa_spec} \
4784 `echo ${with_multilib_generator} | sed 's/;/ /g'`\
4785 > t-multilib-config;
4787 tmake_file="${tmake_file} riscv/t-withmultilib-generator"
4789 echo "invalid option for --with-multilib-generator" 1>&2
4794 echo "--with-multilib-generator= is not supported for ${target}, only supported for riscv*-*-elf*" 1>&2
4800 # Handle --with-multilib-list.
4801 if test "x${with_multilib_list}" != xdefault; then
4802 tmake_file="${tmake_file} riscv/t-withmultilib"
4804 case ${with_multilib_list} in
4805 ilp32 | ilp32f | ilp32d \
4806 | lp64 | lp64f | lp64d )
4807 TM_MULTILIB_CONFIG="${with_arch},${with_multilib_list}"
4810 echo "--with-multilib-list=${with_multilib_list} not supported."
4817 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"
4819 case ${with_float} in
4824 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4830 "" | single | double)
4834 echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
4844 echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
4849 case ${with_fp_32} in
4854 echo "Unknown FP mode used in --with-fp-32=$with_fp_32" 1>&2
4859 case ${with_odd_spreg_32} in
4861 with_odd_spreg_32="odd-spreg"
4864 with_odd_spreg_32="no-odd-spreg"
4870 echo "Unknown odd-spreg-32 type used in --with-odd-spreg-32=$with_odd_spreg_32" 1>&2
4876 "" | 32 | o64 | n32 | 64 | eabi)
4880 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
4885 case ${with_divide} in
4886 "" | breaks | traps)
4890 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
4895 case ${with_llsc} in
4906 echo "Unknown llsc type used in --with-llsc" 1>&2
4911 case ${with_mips_plt} in
4916 with_mips_plt=no-plt
4921 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
4926 case ${with_synci} in
4936 echo "Unknown synci type used in --with-synci" 1>&2
4941 case ${with_lxc1_sxc1} in
4943 with_lxc1_sxc1=lxc1-sxc1
4946 with_lxc1_sxc1=no-lxc1-sxc1
4951 echo "Unknown lxc1-sxc1 type used in --with-lxc1-sxc1" 1>&2
4956 case ${with_madd4} in
4966 echo "Unknown madd4 type used in --with-madd4" 1>&2
4973 supported_defaults="abi arch tune fpu"
4977 abi_pattern abi_default \
4978 abiext_pattern abiext_default \
4979 arch_pattern arch_default \
4980 fpu_pattern fpu_default \
4981 tune_pattern tune_default \
4982 triplet_os triplet_abi
4984 # Infer ABI from the triplet.
4986 loongarch64-*-*-*f64)
4989 loongarch64-*-*-*f32)
4992 loongarch64-*-*-*sf)
4996 abi_pattern="lp64[dfs]"
5000 echo "Unsupported target ${target}." 1>&2
5006 abiext_default="base"
5008 # Get the canonical triplet (multiarch specifier).
5010 *-linux-gnu*) triplet_os="linux-gnu";;
5011 *-linux-musl*) triplet_os="linux-musl";;
5013 echo "Unsupported target ${target}." 1>&2
5018 # Perform initial sanity checks on --with-* options.
5019 case ${with_arch} in
5020 "" | loongarch64 | la464) ;; # OK, append here.
5022 if test x${host} != x${target}; then
5023 echo "--with-arch=native is illegal for cross-compiler." 1>&2
5028 echo "Please set a default value for \${with_arch}" \
5029 "according to your target triplet \"${target}\"." 1>&2
5033 echo "Unknown arch in --with-arch=$with_arch" 1>&2
5039 "" | lp64d | lp64f | lp64s) ;; # OK, append here.
5041 echo "Unsupported ABI given in --with-abi=$with_abi" 1>&2
5046 case ${with_abiext} in
5047 "" | base) ;; # OK, append here.
5049 echo "Unsupported ABI extention type $with_abiext" 1>&2
5055 "" | none | 32 | 64) ;; # OK, append here.
5057 # Convert "0" to "none" for upcoming checks.
5061 echo "Unknown fpu type in --with-fpu=$with_fpu" 1>&2
5067 # Set default value for with_abi.
5070 if test x${abi_default} != x; then
5071 with_abi=${abi_default}
5073 with_abi=${abi_pattern}
5078 if echo "${with_abi}" | grep -E "^${abi_pattern}$" > /dev/null; then
5081 echo "Incompatible options:" \
5082 "--with-abi=${with_abi} and --target=${target}." 1>&2
5089 "lp64d") triplet_abi="";;
5090 "lp64f") triplet_abi="f32";;
5091 "lp64s") triplet_abi="sf";;
5093 la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
5095 # Set default value for with_abiext (internal)
5096 case ${with_abiext} in
5098 if test x${abiext_default} != x; then
5099 with_abiext=${abiext_default}
5101 with_abiext=${abiext_pattern}
5106 if echo "${with_abiext}" | grep -E "^${abiext_pattern}$" > /dev/null; then
5109 echo "The ABI extension type \"${with_abiext}\"" \
5110 "is incompatible with --target=${target}." 1>&2
5117 # Infer ISA-related default options from the ABI: pass 1
5118 case ${with_abi}/${with_abiext} in
5120 # architectures that support lp64* ABI
5121 arch_pattern="native|loongarch64|la464"
5122 # default architecture for lp64* ABI
5123 arch_default="loongarch64"
5126 echo "Unsupported ABI type ${with_abi}/${with_abiext}." 1>&2
5131 # Infer ISA-related default options from the ABI: pass 2
5132 case ${with_abi}/${with_abiext} in
5141 fpu_pattern="none|32|64"
5145 echo "Unsupported ABI type ${with_abi}/${with_abiext}." 1>&2
5150 ## Set default value for with_arch.
5151 case ${with_arch} in
5153 if test x${arch_default} != x; then
5154 with_arch=${arch_default}
5156 with_arch=${arch_pattern}
5161 if echo "${with_arch}" | grep -E "^${arch_pattern}$" > /dev/null; then
5164 echo "${with_abi}/${with_abiext} ABI cannot be implemented with" \
5165 "--with-arch=${with_arch}." 1>&2
5171 ## Set default value for with_fpu.
5174 if test x${fpu_default} != x; then
5175 with_fpu=${fpu_default}
5177 with_fpu=${fpu_pattern}
5182 if echo "${with_fpu}" | grep -E "^${fpu_pattern}$" > /dev/null; then
5185 echo "${with_abi}/${with_abiext} ABI cannot be implemented with" \
5186 "--with-fpu=${with_fpu}." 1>&2
5193 # Infer default with_tune from with_arch: pass 1
5194 case ${with_arch} in
5197 tune_default="native"
5200 tune_pattern="loongarch64|la464"
5201 tune_default="la464"
5204 # By default, $with_tune == $with_arch
5205 tune_pattern="$with_arch"
5209 ## Set default value for with_tune.
5210 case ${with_tune} in
5212 if test x${tune_default} != x; then
5213 with_tune=${tune_default}
5215 with_tune=${tune_pattern}
5220 if echo "${with_tune}" | grep -E "^${tune_pattern}$" > /dev/null; then
5223 echo "Incompatible options: --with-tune=${with_tune}" \
5224 "and --with-arch=${with_arch}." 1>&2
5230 # Handle --with-multilib-list.
5231 if test x"${with_multilib_list}" = x \
5232 || test x"${with_multilib_list}" = xno \
5233 || test x"${with_multilib_list}" = xdefault \
5234 || test x"${enable_multilib}" != xyes; then
5236 with_multilib_list="${with_abi}/${with_abiext}"
5239 # Check if the configured default ABI combination is included in
5240 # ${with_multilib_list}.
5241 loongarch_multilib_list_sane=no
5243 # This one goes to TM_MULTILIB_CONFIG, for use in t-linux.
5244 loongarch_multilib_list_make=""
5246 # This one goes to tm_defines, for use in loongarch-driver.c.
5247 loongarch_multilib_list_c=""
5249 # ${with_multilib_list} should not contain whitespaces,
5250 # consecutive commas or slashes.
5251 if echo "${with_multilib_list}" \
5252 | grep -E -e "[[:space:]]" -e '[,/][,/]' -e '[,/]$' -e '^[,/]' > /dev/null; then
5253 echo "Invalid argument to --with-multilib-list." 1>&2
5257 unset component idx elem_abi_base elem_abi_ext elem_tmp
5258 for elem in $(echo "${with_multilib_list}" | tr ',' ' '); do
5262 component=$(echo "${elem}" | awk -F'/' '{print $'"${idx}"'}')
5266 # Component 1: Base ABI type
5267 case ${component} in
5268 lp64d) elem_tmp="ABI_BASE_LP64D,";;
5269 lp64f) elem_tmp="ABI_BASE_LP64F,";;
5270 lp64s) elem_tmp="ABI_BASE_LP64S,";;
5272 echo "Unknown base ABI \"${component}\" in --with-multilib-list." 1>&2
5276 loongarch_multilib_list_c="${loongarch_multilib_list_c}${elem_tmp}"
5277 loongarch_multilib_list_make="${loongarch_multilib_list_make}mabi=${component}"
5278 elem_abi_base="${component}"
5282 # Component 2: ABI extension type
5283 case ${component} in
5286 elem_tmp="ABI_EXT_BASE,"
5289 echo "Unknown ABI extension \"${component}\" in --with-multilib-list." 1>&2
5293 loongarch_multilib_list_c="${loongarch_multilib_list_c}${elem_tmp}"
5294 loongarch_multilib_list_make="${loongarch_multilib_list_make}" # Add nothing for now.
5295 elem_abi_ext="${component}"
5299 # Component 3 and on: optional stuff
5300 case ${component} in
5302 # End of component list.
5306 echo "Unknown ABI \"${elem}\" in --with-multilib-list." 1>&2
5314 if test x${elem_abi_base} = x${with_abi} \
5315 && test x${elem_abi_ext} = x${with_abiext}; then
5316 loongarch_multilib_list_sane=yes
5318 loongarch_multilib_list_make="${loongarch_multilib_list_make},"
5321 # Check if the default ABI combination is in the default list.
5322 if test x${loongarch_multilib_list_sane} = xno; then
5323 if test x${with_abiext} = xbase; then
5326 with_abiext="/${with_abiext}"
5329 echo "Default ABI combination (${with_abi}${with_abiext})" \
5330 "not found in --with-multilib-list." 1>&2
5334 # Remove the excessive appending comma.
5335 loongarch_multilib_list_c=${loongarch_multilib_list_c%,}
5336 loongarch_multilib_list_make=${loongarch_multilib_list_make%,}
5340 supported_defaults="arch cpu nds32_lib float fpu_config"
5342 # process --with-arch
5343 case "${with_arch}" in
5345 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
5349 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
5352 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
5355 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
5359 echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
5364 case "${with_cpu}" in
5368 n6 | n7 |n8 | e8 | s8 | n9 | n10 | d10 | n12 | n13 | n15)
5372 echo "Cannot accept --with-cpu=$with_cpu, available values are: n6 n7 n8 e8 s8 n9 n10 d10 n12 n13 n15" 1>&2
5377 # process --with-nds32-lib
5378 case "${with_nds32_lib}" in
5382 with_nds32_lib=ulibc
5385 with_nds32_lib=glibc
5388 with_nds32_lib=newlib
5389 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
5395 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
5399 # for the arch=v3f or arch=v3s under mculib toolchain,
5400 # we would like to set -fno-math-errno as default
5401 case "${with_arch}" in
5403 tm_defines="${tm_defines} TARGET_DEFAULT_NO_MATH_ERRNO=1"
5411 echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib glibc uclibc" 1>&2
5416 # process --with-float
5417 case "${with_float}" in
5422 echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
5427 # process --with-config-fpu
5428 case "${with_config_fpu}" in
5433 echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
5441 supported_defaults="arch"
5442 case "$with_arch" in
5447 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
5454 supported_defaults=arch
5455 TM_MULTILIB_CONFIG=$with_arch
5456 #TODO 'sm_[...]' list per 'nvptx-sm.def'.
5461 sm_35 | sm_53 | sm_70 | sm_75 | sm_80 )
5462 # OK, but we'd like 'sm_30', too.
5463 TM_MULTILIB_CONFIG="$TM_MULTILIB_CONFIG sm_30"
5466 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
5472 powerpc*-*-* | rs6000-*-*)
5473 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
5475 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
5476 eval "val=\$with_$which"
5478 default32 | default64)
5483 echo "$val only valid for --with-cpu and --with-tune." 1>&2
5487 with_which="with_$which"
5491 tm_defines="${tm_defines} CONFIG_PPC405CR"
5492 eval "with_$which=405"
5494 "" | common | native \
5495 | power[3456789] | power10 | power5+ | power6x \
5496 | powerpc | powerpc64 | powerpc64le \
5498 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
5499 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
5500 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
5501 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
5502 | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
5506 echo "Unknown cpu used in --with-$which=$val." 1>&2
5513 "" | elfv1 | elfv2 )
5517 echo "Unknown ABI used in --with-abi=$with_abi"
5522 if test "x$with_advance_toolchain" != x; then
5523 if test -d "/opt/$with_advance_toolchain/." -a \
5524 -d "/opt/$with_advance_toolchain/bin/." -a \
5525 -d "/opt/$with_advance_toolchain/include/."; then
5527 tm_file="$tm_file ./advance-toolchain.h"
5528 (at="/opt/$with_advance_toolchain"
5529 echo "/* Use Advance Toolchain $at */"
5531 echo "#undef LINK_OS_NEW_DTAGS_SPEC"
5532 echo "#define LINK_OS_NEW_DTAGS_SPEC" \
5533 "\"--enable-new-dtags\""
5535 echo "#undef DYNAMIC_LINKER_PREFIX"
5536 echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
5538 echo "#undef MD_EXEC_PREFIX"
5539 echo "#define MD_EXEC_PREFIX \"$at/bin/\""
5541 echo "#undef MD_STARTFILE_PREFIX"
5542 echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\""
5544 echo "#undef MD_STARTFILE_PREFIX_1"
5545 echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \
5546 > advance-toolchain.h
5548 echo "Unknown advance-toolchain $with_advance_toolchain"
5553 # Set up the default long double format if the user changed it.
5554 if test x$with_long_double_format = xieee; then
5555 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
5557 elif test x$with_long_double_format = xibm; then
5558 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
5563 supported_defaults="arch mode tune"
5565 for which in arch tune; do
5566 eval "val=\$with_$which"
5568 "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | z16 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 | arch14 )
5572 echo "Unknown cpu used in --with-$which=$val." 1>&2
5578 case ${with_mode} in
5583 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
5589 sh[123456ble]*-*-* | sh-*-*)
5590 supported_defaults="cpu"
5591 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
5592 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
5595 m2a | m2a-single | m2a-single-only | m2a-nofpu)
5597 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
5600 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
5601 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
5602 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
5603 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
5609 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
5611 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
5612 eval "val=\$with_$which"
5614 "" | sparc | sparcv9 | sparc64 \
5616 | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
5617 | sparclite | f930 | f934 | sparclite86x \
5618 | sparclet | tsc701 \
5619 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
5620 | niagara3 | niagara4 | niagara7 | m8)
5624 echo "Unknown cpu used in --with-$which=$val" 1>&2
5630 case ${with_float} in
5635 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
5642 supported_defaults="arch"
5644 case ${with_arch} in
5645 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
5649 echo "Unknown arch used in --with-arch=$with_arch." 1>&2
5656 supported_defaults=cpu
5658 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
5662 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5668 supported_defaults="cpu"
5672 *) echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5679 # Targets for which there is at least one VxWorks port should include
5680 # vxworks-dummy.h to allow safe references to various TARGET_VXWORKS kinds
5681 # of markers from other files in the port, including the vxworks*.h files to
5682 # distinguish VxWorks variants such as VxWorks 7 or 64).
5685 arm*-*-* | i[34567]86-*-* | mips*-*-* | powerpc*-*-* | sh*-*-* \
5686 | sparc*-*-* | x86_64-*-*)
5687 tm_file="vxworks-dummy.h ${tm_file}"
5691 # Set some miscellaneous flags for particular targets.
5692 target_cpu_default2=
5695 if test x"$target_cpu_cname" != x
5697 target_cpu_default2=$target_cpu_cname
5702 if test x$with_cpu = x
5704 echo "Don't know the target cpu" 1>&2
5707 target_cpu_default2="\\\"$with_cpu\\\""
5712 if test x$gas = xyes
5714 target_cpu_default2="MASK_GAS"
5718 fido*-*-* | m68k*-*-*)
5719 target_cpu_default2=$m68k_cpu_ident
5720 tmake_file="m68k/t-opts $tmake_file"
5721 if [ x"$m68k_arch_family" != x ]; then
5722 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
5726 i[34567]86-*-darwin* | x86_64-*-darwin*)
5728 i[34567]86-*-linux* | x86_64-*-linux*)
5729 extra_objs="${extra_objs} gnu-property.o"
5730 tmake_file="$tmake_file i386/t-linux i386/t-gnu-property"
5732 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
5733 tmake_file="$tmake_file i386/t-kfreebsd"
5736 tmake_file="$tmake_file i386/t-gnu"
5738 i[34567]86-*-msdosdjgpp*)
5739 tmake_file="${tmake_file} i386/t-djgpp"
5741 i[34567]86-*-solaris2* | x86_64-*-solaris2*)
5743 i[34567]86-*-cygwin* | x86_64-*-cygwin*)
5745 i[34567]86-*-mingw* | x86_64-*-mingw*)
5747 i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
5749 i[34567]86-*-freebsd*)
5752 tmake_file="${tmake_file} i386/t-freebsd64"
5758 if test x$gnu_ld = xyes
5760 target_cpu_default2="MASK_SPLIT_ADDRESSES"
5764 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
5767 if test x$with_arch != x; then
5768 default_mips_arch=$with_arch
5770 if test x$with_abi != x; then
5771 default_mips_abi=$with_abi
5773 case ${default_mips_arch} in
5774 mips1) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS1" ;;
5775 mips2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS2" ;;
5776 mips3) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS3" ;;
5777 mips4) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS4" ;;
5778 mips32) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32" ;;
5779 mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2" ;;
5780 mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6" ;;
5781 mips64) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64" ;;
5782 mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2" ;;
5783 mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6" ;;
5785 case ${default_mips_abi} in
5786 32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
5787 o64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;;
5788 n32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;;
5789 64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;;
5790 eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;;
5792 tmake_file="mips/t-mips $tmake_file"
5796 # Export canonical triplet.
5797 tm_defines="${tm_defines} LA_MULTIARCH_TRIPLET=${la_canonical_triplet}"
5799 # Define macro LA_DISABLE_MULTILIB if --disable-multilib
5800 tm_defines="${tm_defines} TM_MULTILIB_LIST=${loongarch_multilib_list_c}"
5801 if test x$enable_multilib = xyes; then
5802 TM_MULTILIB_CONFIG="${loongarch_multilib_list_make}"
5804 tm_defines="${tm_defines} LA_DISABLE_MULTILIB"
5807 # Let --with- flags initialize the enum variables from loongarch.opt.
5808 # See macro definitions from loongarch-opts.h and loongarch-cpu.h.
5809 case ${with_arch} in
5810 native) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_NATIVE" ;;
5811 la464) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_LA464" ;;
5812 loongarch64) tm_defines="${tm_defines} DEFAULT_CPU_ARCH=CPU_LOONGARCH64" ;;
5815 case ${with_tune} in
5816 native) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_NATIVE" ;;
5817 la464) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_LA464" ;;
5818 loongarch64) tm_defines="${tm_defines} DEFAULT_CPU_TUNE=CPU_LOONGARCH64" ;;
5822 lp64d) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64D" ;;
5823 lp64f) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64F" ;;
5824 lp64s) tm_defines="${tm_defines} DEFAULT_ABI_BASE=ABI_BASE_LP64S" ;;
5827 case ${with_abiext} in
5828 base) tm_defines="${tm_defines} DEFAULT_ABI_EXT=ABI_EXT_BASE" ;;
5832 none) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_NOFPU" ;;
5833 32) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_FPU32" ;;
5834 64) tm_defines="$tm_defines DEFAULT_ISA_EXT_FPU=ISA_EXT_FPU64" ;;
5837 tmake_file="loongarch/t-loongarch $tmake_file"
5840 powerpc*-*-* | rs6000-*-*)
5841 # FIXME: The PowerPC port uses the value set at compile time,
5842 # although it's only cosmetic.
5843 if test "x$with_cpu" != x
5845 target_cpu_default2="\\\"$with_cpu\\\""
5847 out_file="${cpu_type}/${cpu_type}.cc"
5848 c_target_objs="${c_target_objs} ${cpu_type}-c.o"
5849 cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
5850 d_target_objs="${d_target_objs} ${cpu_type}-d.o"
5851 tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
5854 sh[123456ble]*-*-* | sh-*-*)
5855 c_target_objs="${c_target_objs} sh-c.o"
5856 cxx_target_objs="${cxx_target_objs} sh-c.o"
5860 # Some standard aliases.
5865 xsparcv9 | xsparc64)
5870 if test x$with_tune = x ; then
5881 # The SPARC port checks this value at compile-time.
5882 target_cpu_default2="TARGET_CPU_$with_cpu"
5886 case "x$with_cpu" in
5889 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
5890 target_cpu_default2="TARGET_CPU_$with_cpu"
5893 target_cpu_default2="TARGET_CPU_v850e1"
5898 target_cpu_default2="TARGET_CPU_$with_cpu"
5903 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"
5904 for option in $all_defaults
5906 eval "val=\$with_"`echo $option | sed s/-/_/g`
5907 if test -n "$val"; then
5908 case " $supported_defaults " in
5912 echo "This target does not support --with-$option." 2>&1
5913 echo "Valid --with options are: $supported_defaults" 2>&1
5920 t="{ \"$option\", \"$val\" }"
5922 t="${t}, { \"$option\", \"$val\" }"
5929 configure_default_options="{ { NULL, NULL} }"
5931 configure_default_options="{ ${t} }"
5934 if test "$target_cpu_default2" != ""
5936 if test "$target_cpu_default" != ""
5938 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5940 target_cpu_default=$target_cpu_default2
5945 i[34567]86-*-* | x86_64-*-*)
5946 if test x$enable_as_accelerator = xyes; then
5947 extra_programs="mkoffload\$(exeext)"