config.gcc revision 1.62
1# GCC target-specific configuration file.
2# Copyright (C) 1997-2018 Free Software Foundation, Inc.
3
4#This file is part of GCC.
5
6#GCC is free software; you can redistribute it and/or modify it under
7#the terms of the GNU General Public License as published by the Free
8#Software Foundation; either version 3, or (at your option) any later
9#version.
10
11#GCC is distributed in the hope that it will be useful, but WITHOUT
12#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14#for more details.
15
16#You should have received a copy of the GNU General Public License
17#along with GCC; see the file COPYING3.  If not see
18#<http://www.gnu.org/licenses/>.
19
20# This is the GCC target-specific configuration file
21# where a configuration type is mapped to different system-specific
22# definitions and files.  This is invoked by the autoconf-generated
23# configure script.  Putting it in a separate shell file lets us skip
24# running autoconf when modifying target-specific information.
25
26# When you change the cases in the OS or target switches, consider
27# updating ../libgcc/config.host also.
28
29# This file switches on the shell variable ${target}, and also uses the
30# following shell variables:
31#
32#  with_*		Various variables as set by configure.
33#
34#  enable_threads	Either the name, yes or no depending on whether
35#			threads support was requested.
36#
37#  default_use_cxa_atexit
38#			  The default value for the $enable___cxa_atexit
39#			variable.  enable___cxa_atexit needs to be set to
40#			"yes" for the correct operation of C++ destructors
41#			but it relies upon the presence of a non-standard C
42#			library	function called	__cxa_atexit.
43#			  Since not all C libraries provide __cxa_atexit the
44#			default value of $default_use_cxa_atexit is set to
45#			"no" except for targets which are known to be OK.
46#
47#  default_gnu_indirect_function
48#                       The default value for the $enable_gnu_indirect_function
49#                       variable.  enable_gnu_indirect_function relies
50#			upon the presence of a non-standard gnu ifunc support
51#			in the assembler, linker and dynamic linker.
52#			Since not all libraries provide the dynamic linking
53#			support, the default value of
54#			$default_gnu_indirect_function is set to
55#			"no" except for targets which are known to be OK.
56#
57#  gas_flag		Either yes or no depending on whether GNU as was
58#			requested.
59#
60#  gnu_ld_flag		Either yes or no depending on whether GNU ld was
61#			requested.
62
63# This file sets the following shell variables for use by the
64# autoconf-generated configure script:
65#
66#  cpu_type		The name of the cpu, if different from the first
67#			chunk of the canonical target name.
68#
69#  tm_defines		List of target macros to define for all compilations.
70#
71#  tm_file		A list of target macro files, if different from
72#			"$cpu_type/$cpu_type.h". Usually it's constructed
73#			per target in a way like this:
74#			tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
75#			Note that the preferred order is:
76#			- specific target header "${cpu_type}/${cpu_type.h}"
77#			- generic headers like dbxelf.h elfos.h, etc.
78#			- specializing target headers like ${cpu_type.h}/elf.h
79#			This helps to keep OS specific stuff out of the CPU
80#			defining header ${cpu_type}/${cpu_type.h}.
81#
82#			It is possible to include automatically-generated
83#			build-directory files by prefixing them with "./".
84#			All other files should relative to $srcdir/config.
85#
86#  tm_p_file		Location of file with declarations for functions
87#			in $out_file.
88#
89#  out_file		The name of the machine description C support
90#			file, if different from "$cpu_type/$cpu_type.c".
91#
92#  common_out_file	The name of the source file for code shared between
93#			the compiler proper and the driver.
94#
95#  md_file		The name of the machine-description file, if
96#			different from "$cpu_type/$cpu_type.md".
97#
98#  tmake_file		A list of machine-description-specific
99#			makefile-fragments, if different from
100#			"$cpu_type/t-$cpu_type".
101#
102#  extra_modes          The name of the file containing a list of extra
103#                       machine modes, if necessary and different from
104#                       "$cpu_type/$cpu_type-modes.def".
105#
106#  extra_objs		List of extra objects that should be linked into
107#			the compiler proper (cc1, cc1obj, cc1plus)
108#			depending on target.
109#
110#  extra_gcc_objs	List of extra objects that should be linked into
111#			the compiler driver (gcc) depending on target.
112#
113#  extra_headers	List of used header files from the directory
114#			config/${cpu_type}.
115#
116#  user_headers_inc_next_pre
117#			List of header file names of internal gcc header
118#			files, which should be prefixed by an include_next.
119#  user_headers_inc_next_post
120#			List of header file names of internal gcc header
121#			files, which should be postfixed by an include_next.
122#  use_gcc_tgmath	If set, add tgmath.h to the list of used header
123#			files.
124#
125#  use_gcc_stdint	If "wrap", install a version of stdint.h that
126#			wraps the system's copy for hosted compilations;
127#			if "provide", provide a version of systems without
128#			such a system header; otherwise "none", do not
129#			provide such a header at all.
130#
131#  extra_programs	List of extra executables compiled for this target
132#			machine, used when linking.
133#
134#  extra_options	List of target-dependent .opt files.
135#
136#  c_target_objs	List of extra target-dependent objects that be
137#			linked into the C compiler only.
138#
139#  cxx_target_objs	List of extra target-dependent objects that be
140#			linked into the C++ compiler only.
141#
142#  fortran_target_objs	List of extra target-dependent objects that be
143#			linked into the fortran compiler only.
144#
145#  target_gtfiles       List of extra source files with type information.
146#
147#  xm_defines		List of macros to define when compiling for the
148#			target machine.
149#
150#  xm_file		List of files to include when compiling for the
151#			target machine.
152#
153#  use_collect2		Set to yes or no, depending on whether collect2
154#			will be used.
155#
156#  target_cpu_default	Set to override the default target model.
157#
158#  gdb_needs_out_file_path
159#			Set to yes if gdb needs a dir command with
160#			`dirname $out_file`.
161#
162#  thread_file		Set to control which thread package to use.
163#
164#  gas			Set to yes or no depending on whether the target
165#			system normally uses GNU as.
166#
167#  configure_default_options
168#			Set to an initializer for configure_default_options
169#			in configargs.h, based on --with-cpu et cetera.
170#
171#  native_system_header_dir
172#			Where system header files are found for this
173#			target.  This defaults to /usr/include.  If
174#			the --with-sysroot configure option or the
175#			--sysroot command line option is used this
176#			will be relative to the sysroot.
177# target_type_format_char 
178# 			The default character to be used for formatting
179#			the attribute in a
180#			.type symbol_name, ${t_t_f_c}<property>
181#			directive.
182
183# The following variables are used in each case-construct to build up the
184# outgoing variables:
185#
186#  gnu_ld		Set to yes or no depending on whether the target
187#			system normally uses GNU ld.
188#
189#  target_has_targetcm	Set to yes or no depending on whether the target
190#			has its own definition of targetcm.
191#
192#  target_has_targetm_common	Set to yes or no depending on whether the
193#			target has its own definition of targetm_common.
194
195out_file=
196common_out_file=
197tmake_file=
198extra_headers=
199user_headers_inc_next_pre=
200user_headers_inc_next_post=
201use_gcc_tgmath=yes
202use_gcc_stdint=none
203extra_programs=
204extra_objs=
205extra_gcc_objs=
206extra_options=
207c_target_objs=
208cxx_target_objs=
209fortran_target_objs=
210target_has_targetcm=no
211target_has_targetm_common=yes
212tm_defines=
213xm_defines=
214# Set this to force installation and use of collect2.
215use_collect2=
216# Set this to override the default target model.
217target_cpu_default=
218# Set this if gdb needs a dir command with `dirname $out_file`
219gdb_needs_out_file_path=
220# Set this to control which thread package will be used.
221thread_file=
222# Reinitialize these from the flag values every loop pass, since some
223# configure entries modify them.
224gas="$gas_flag"
225gnu_ld="$gnu_ld_flag"
226default_use_cxa_atexit=no
227default_gnu_indirect_function=no
228target_gtfiles=
229need_64bit_isa=
230native_system_header_dir=/usr/include
231target_type_format_char='@'
232
233# Don't carry these over build->host->target.  Please.
234xm_file=
235md_file=
236
237# Obsolete configurations.
238case ${target} in
239  powerpc*-*-*spe*			\
240  | tile*-*-*				\
241 )
242    if test "x$enable_obsolete" != xyes; then
243      echo "*** Configuration ${target} is obsolete." >&2
244      echo "*** Specify --enable-obsolete to build it anyway." >&2
245      echo "*** Support will be REMOVED in the next major release of GCC," >&2
246      echo "*** unless a maintainer comes forward." >&2
247      exit 1
248    fi;;
249esac
250
251# Unsupported targets list.  Do not put an entry in this list unless
252# it would otherwise be caught by a more permissive pattern.  The list
253# should be in alphabetical order.
254case ${target} in
255 # Avoid special cases that are not obsolete
256   arm*-*-*eabi*			\
257 )
258	;;
259   arm*-wince-pe*			\
260 | arm*-*-ecos-elf			\
261 | arm*-*-elf				\
262 | arm*-*-linux*			\
263 | arm*-*-uclinux*			\
264 | i[34567]86-go32-*			\
265 | i[34567]86-*-go32*			\
266 | m68k-*-uclinuxoldabi*		\
267 | mips64orion*-*-rtems*		\
268 | pdp11-*-bsd				\
269 | sparc-hal-solaris2*			\
270 | thumb-*-*				\
271 | *-*-freebsd[12] | *-*-freebsd[12].*	\
272 | *-*-freebsd*aout*			\
273 | *-*-linux*aout*			\
274 | *-*-linux*coff*			\
275 | *-*-linux*libc1*			\
276 | *-*-linux*oldld*			\
277 | *-*-rtemsaout*			\
278 | *-*-rtemscoff*			\
279 | *-*-solaris2				\
280 | *-*-solaris2.[0-9]			\
281 | *-*-solaris2.[0-9].*			\
282 | *-*-sysv*				\
283 | vax-*-vms*				\
284 )
285	echo "*** Configuration ${target} not supported" 1>&2
286	exit 1
287	;;
288esac
289
290# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
291# updated in each machine entry.  Also set default extra_headers for some
292# machines.
293tm_p_file=
294cpu_type=`echo ${target} | sed 's/-.*$//'`
295cpu_is_64bit=
296case ${target} in
297m32c*-*-*)
298        cpu_type=m32c
299	tmake_file=m32c/t-m32c
300	target_has_targetm_common=no
301        ;;
302aarch64*-*-*)
303	cpu_type=aarch64
304	extra_headers="arm_fp16.h arm_neon.h arm_acle.h"
305	c_target_objs="aarch64-c.o"
306	cxx_target_objs="aarch64-c.o"
307	extra_objs="aarch64-builtins.o aarch-common.o cortex-a57-fma-steering.o"
308	target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c"
309	target_has_targetm_common=yes
310	;;
311alpha*-*-*)
312	cpu_type=alpha
313	extra_options="${extra_options} g.opt"
314	;;
315am33_2.0-*-linux*)
316	cpu_type=mn10300
317	;;
318arc*-*-*)
319	cpu_type=arc
320	c_target_objs="arc-c.o"
321	cxx_target_objs="arc-c.o"
322	extra_options="${extra_options} arc/arc-tables.opt g.opt"
323	extra_headers="arc-simd.h"
324	;;
325arm*-*-*)
326	cpu_type=arm
327	extra_objs="arm-builtins.o aarch-common.o"
328	extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h"
329	target_type_format_char='%'
330	c_target_objs="arm-c.o"
331	cxx_target_objs="arm-c.o"
332	extra_options="${extra_options} arm/arm-tables.opt"
333	target_gtfiles="\$(srcdir)/config/arm/arm-builtins.c"
334	;;
335avr-*-*)
336	cpu_type=avr
337	c_target_objs="avr-c.o"
338	cxx_target_objs="avr-c.o"
339	;;
340bfin*-*)
341	cpu_type=bfin
342	;;
343crisv32-*)
344	cpu_type=cris
345	;;
346frv*)	cpu_type=frv
347	extra_options="${extra_options} g.opt"
348	;;
349ft32*)	cpu_type=ft32
350	target_has_targetm_common=no
351	;;
352moxie*)	cpu_type=moxie
353	target_has_targetm_common=no
354	;;
355fido-*-*)
356	cpu_type=m68k
357	extra_headers=math-68881.h
358	extra_options="${extra_options} m68k/m68k-tables.opt"
359        ;;
360i[34567]86-*-*)
361	cpu_type=i386
362	c_target_objs="i386-c.o"
363	cxx_target_objs="i386-c.o"
364	extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o"
365	extra_options="${extra_options} fused-madd.opt"
366	extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
367		       pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
368		       nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
369		       immintrin.h x86intrin.h avxintrin.h xopintrin.h
370		       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
371		       lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
372		       avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
373		       rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
374		       adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
375		       avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
376		       shaintrin.h clflushoptintrin.h xsavecintrin.h
377		       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
378		       avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
379		       avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
380		       avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
381		       avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
382		       clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
383		       gfniintrin.h cet.h avx512vbmi2intrin.h
384		       avx512vbmi2vlintrin.h avx512vnniintrin.h
385		       avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
386		       avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
387		       pconfigintrin.h wbnoinvdintrin.h movdirintrin.h"
388	;;
389x86_64-*-*)
390	cpu_type=i386
391	c_target_objs="i386-c.o"
392	cxx_target_objs="i386-c.o"
393	extra_options="${extra_options} fused-madd.opt"
394	extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o"
395	extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
396		       pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
397		       nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
398		       immintrin.h x86intrin.h avxintrin.h xopintrin.h
399		       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
400		       lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
401		       avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
402		       rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
403		       adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
404		       avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
405		       shaintrin.h clflushoptintrin.h xsavecintrin.h
406		       xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
407		       avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
408		       avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
409		       avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
410		       avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
411		       clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
412		       gfniintrin.h cet.h avx512vbmi2intrin.h
413		       avx512vbmi2vlintrin.h avx512vnniintrin.h
414		       avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
415		       avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
416		       pconfigintrin.h wbnoinvdintrin.h movdirintrin.h"
417	;;
418ia64-*-*)
419	extra_headers=ia64intrin.h
420	extra_options="${extra_options} g.opt fused-madd.opt"
421	;;
422hppa*-*-*)
423	cpu_type=pa
424	;;
425lm32*)
426	extra_options="${extra_options} g.opt"
427	;;
428m32r*-*-*)
429        cpu_type=m32r
430	extra_options="${extra_options} g.opt"
431        ;;
432m5200-*-*|m5407-*-*)
433	cpu_type=m68k
434	extra_headers=math-68881.h
435	extra_options="${extra_options} m68k/m68k-tables.opt"
436	;;
437m680[012]0-*-*)
438	cpu_type=m68k
439	extra_headers=math-68881.h
440	extra_options="${extra_options} m68k/m68k-tables.opt"
441	;;
442m68k-*-*)
443	extra_headers=math-68881.h
444	extra_options="${extra_options} m68k/m68k-tables.opt"
445	;;
446microblaze*-*-*)
447        cpu_type=microblaze
448	extra_options="${extra_options} g.opt"
449        ;;
450mips*-*-*)
451	cpu_type=mips
452	extra_headers="loongson.h msa.h"
453	extra_objs="frame-header-opt.o"
454	extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt"
455	;;
456nds32*)
457	cpu_type=nds32
458	extra_headers="nds32_intrinsic.h"
459	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"
460	;;
461nios2-*-*)
462	cpu_type=nios2
463	extra_options="${extra_options} g.opt"
464	;;
465nvptx-*-*)
466	cpu_type=nvptx
467	;;
468powerpc*-*-*spe*)
469	cpu_type=powerpcspe
470	extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
471	case x$with_cpu in
472	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
473		cpu_is_64bit=yes
474		;;
475	esac
476	extra_options="${extra_options} g.opt fused-madd.opt powerpcspe/powerpcspe-tables.opt"
477	;;
478powerpc*-*-*)
479	cpu_type=rs6000
480	extra_objs="rs6000-string.o rs6000-p8swap.o"
481	extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
482	extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
483	extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
484	extra_headers="${extra_headers} mmintrin.h x86intrin.h"
485	extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
486	extra_headers="${extra_headers} paired.h"
487	extra_headers="${extra_headers} amo.h"
488	case x$with_cpu in
489	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
490		cpu_is_64bit=yes
491		;;
492	esac
493	extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
494	;;
495riscv*)
496	cpu_type=riscv
497	extra_objs="riscv-builtins.o riscv-c.o"
498	;;
499rs6000*-*-*)
500	extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
501	extra_objs="rs6000-string.o rs6000-p8swap.o"
502	;;
503sparc*-*-*)
504	cpu_type=sparc
505	c_target_objs="sparc-c.o"
506	cxx_target_objs="sparc-c.o"
507	extra_headers="visintrin.h"
508	;;
509spu*-*-*)
510	cpu_type=spu
511	;;
512s390*-*-*)
513	cpu_type=s390
514	extra_options="${extra_options} fused-madd.opt"
515	extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
516	;;
517# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
518sh[123456789lbe]*-*-* | sh-*-*)
519	cpu_type=sh
520	extra_options="${extra_options} fused-madd.opt"
521	extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o"
522	;;
523v850*-*-*)
524	cpu_type=v850
525	;;
526tic6x-*-*)
527	cpu_type=c6x
528	extra_headers="c6x_intrinsics.h"
529	extra_options="${extra_options} c6x/c6x-tables.opt"
530	;;
531xtensa*-*-*)
532	extra_options="${extra_options} fused-madd.opt"
533	;;
534tilegx*-*-*)
535	cpu_type=tilegx
536	;;
537tilepro*-*-*)
538	cpu_type=tilepro
539	;;
540esac
541
542tm_file=${cpu_type}/${cpu_type}.h
543if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
544then
545	tm_p_file=${cpu_type}/${cpu_type}-protos.h
546fi
547extra_modes=
548if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
549then
550	extra_modes=${cpu_type}/${cpu_type}-modes.def
551fi
552if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
553then
554	extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
555fi
556
557case ${target} in
558aarch64*-*-*)
559	tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
560	case ${with_abi} in
561	"")
562		if test "x$with_multilib_list" = xilp32; then
563			tm_file="aarch64/biarchilp32.h ${tm_file}"
564		else
565			tm_file="aarch64/biarchlp64.h ${tm_file}"
566		fi
567		;;
568	ilp32)
569		tm_file="aarch64/biarchilp32.h ${tm_file}"
570		;;
571	lp64)
572		tm_file="aarch64/biarchlp64.h ${tm_file}"
573		;;
574	*)
575		echo "Unknown ABI used in --with-abi=$with_abi"
576		exit 1
577	esac
578	;;
579i[34567]86-*-*)
580	if test "x$with_abi" != x; then
581		echo "This target does not support --with-abi."
582		exit 1
583	fi
584	if test "x$enable_cld" = xyes; then
585		tm_defines="${tm_defines} USE_IX86_CLD=1"
586	fi
587	if test "x$enable_frame_pointer" = xyes; then
588		tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
589	fi
590	tm_file="vxworks-dummy.h ${tm_file}"
591	;;
592x86_64-*-*)
593	case ${with_abi} in
594	"")
595		if test "x$with_multilib_list" = xmx32; then
596			tm_file="i386/biarchx32.h ${tm_file}"
597		else
598			tm_file="i386/biarch64.h ${tm_file}"
599		fi
600		;;
601	64 | m64)
602		tm_file="i386/biarch64.h ${tm_file}"
603		;;
604	x32 | mx32)
605		tm_file="i386/biarchx32.h ${tm_file}"
606		;;
607	*)
608		echo "Unknown ABI used in --with-abi=$with_abi"
609		exit 1
610	esac
611	if test "x$enable_cld" = xyes; then
612		tm_defines="${tm_defines} USE_IX86_CLD=1"
613	fi
614	if test "x$enable_frame_pointer" = xyes; then
615		tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
616	fi
617	tm_file="vxworks-dummy.h ${tm_file}"
618	;;
619arm*-*-*)
620	tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h"
621	tm_file="vxworks-dummy.h ${tm_file}"
622	;;
623mips*-*-* | sh*-*-* | sparc*-*-*)
624	tm_file="vxworks-dummy.h ${tm_file}"
625	;;
626esac
627
628# On a.out targets, we need to use collect2.
629case ${target} in
630*-*-*aout*)
631	use_collect2=yes
632	;;
633esac
634
635# Common C libraries.
636tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
637
638# 32-bit x86 processors supported by --with-arch=.  Each processor
639# MUST be separated by exactly one space.
640x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
641athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
642i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
643pentium4 pentium4m pentiumpro prescott lakemont"
644
645# 64-bit x86 processors supported by --with-arch=.  Each processor
646# MUST be separated by exactly one space.
647x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
648bdver3 bdver4 znver1 btver1 btver2 k8 k8-sse3 opteron opteron-sse3 nocona \
649core2 corei7 corei7-avx core-avx-i core-avx2 atom slm nehalem westmere \
650sandybridge ivybridge haswell broadwell bonnell silvermont knl knm \
651skylake-avx512 cannonlake icelake-client icelake-server skylake x86-64 native"
652
653# Additional x86 processors supported by --with-cpu=.  Each processor
654# MUST be separated by exactly one space.
655x86_cpus="generic intel"
656
657# Common parts for widely ported systems.
658case ${target} in
659*-*-darwin*)
660  tmake_file="t-darwin "
661  tm_file="${tm_file} darwin.h"
662  case ${target} in
663  *-*-darwin9*)
664    tm_file="${tm_file} darwin9.h"
665    ;;
666  *-*-darwin[1][01]*)
667    tm_file="${tm_file} darwin9.h darwin10.h"
668    ;;
669  *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*)
670    tm_file="${tm_file} darwin9.h darwin10.h darwin12.h"
671    ;;
672  esac
673  tm_file="${tm_file} ${cpu_type}/darwin.h"
674  tm_p_file="${tm_p_file} darwin-protos.h"
675  target_gtfiles="\$(srcdir)/config/darwin.c"
676  extra_options="${extra_options} darwin.opt"
677  c_target_objs="${c_target_objs} darwin-c.o"
678  cxx_target_objs="${cxx_target_objs} darwin-c.o"
679  fortran_target_objs="darwin-f.o"
680  target_has_targetcm=yes
681  extra_objs="${extra_objs} darwin.o"
682  extra_gcc_objs="darwin-driver.o"
683  default_use_cxa_atexit=yes
684  use_gcc_stdint=wrap
685  case ${enable_threads} in
686    "" | yes | posix) thread_file='posix' ;;
687  esac
688  ;;
689*-*-dragonfly*)
690  gas=yes
691  gnu_ld=yes
692  tmake_file="t-slibgcc"
693  case ${enable_threads} in
694    "" | yes | posix)
695      thread_file='posix'
696      ;;
697    no | single)
698      # Let these non-posix thread selections fall through if requested
699      ;;
700    *)
701      echo 'Unknown thread configuration for DragonFly BSD'
702      exit 1
703      ;;
704  esac
705  extra_options="$extra_options rpath.opt dragonfly.opt"
706  default_use_cxa_atexit=yes
707  use_gcc_stdint=wrap
708  ;;
709*-*-freebsd*)
710  # This is the generic ELF configuration of FreeBSD.  Later
711  # machine-specific sections may refine and add to this
712  # configuration.
713  #
714  # Due to tm_file entry ordering issues that vary between cpu
715  # architectures, we only define fbsd_tm_file to allow the
716  # machine-specific section to dictate the final order of all
717  # entries of tm_file with the minor exception that components
718  # of the tm_file set here will always be of the form:
719  #
720  # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
721  #
722  # The machine-specific section should not tamper with this
723  # ordering but may order all other entries of tm_file as it
724  # pleases around the provided core setting.
725  gas=yes
726  gnu_ld=yes
727  fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
728  if test "$fbsd_major" = ""; then
729    echo "Specify the major version number of the targeted FreeBSD release"
730    echo "like this: --target=amd64-unknown-freebsd10.1"
731    exit 1
732  fi
733  tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
734  tmake_file="t-slibgcc"
735  case ${enable_threads} in
736    no)
737      fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
738      ;;
739    "" | yes | posix)
740      thread_file='posix'
741      ;;
742    *)
743      echo 'Unknown thread configuration for FreeBSD'
744      exit 1
745      ;;
746  esac
747  fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
748  extra_options="$extra_options rpath.opt freebsd.opt"
749  case ${target} in
750    *-*-freebsd[345].*)
751      :;;
752    *)
753      default_use_cxa_atexit=yes;;
754  esac
755  use_gcc_stdint=wrap
756  ;;
757*-*-fuchsia*)
758  native_system_header_dir=/include
759  ;;
760*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
761  extra_options="$extra_options gnu-user.opt"
762  gas=yes
763  gnu_ld=yes
764  case ${enable_threads} in
765    "" | yes | posix) thread_file='posix' ;;
766  esac
767  tmake_file="t-slibgcc"
768  case $target in
769    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
770      :;;
771    *-*-gnu*)
772      native_system_header_dir=/include
773      ;;
774  esac
775  # Linux C libraries selection switch: glibc / uclibc / bionic.
776  # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
777  case $target in
778    *linux*)
779      tm_p_file="${tm_p_file} linux-protos.h"
780      tmake_file="${tmake_file} t-linux"
781      extra_objs="${extra_objs} linux.o"
782      extra_options="${extra_options} linux.opt"
783      ;;
784  esac
785  case $target in
786    *-*-*android*)
787      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
788      ;;
789    *-*-*uclibc*)
790      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
791      ;;
792    *-*-*musl*)
793      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
794      ;;
795    *)
796      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
797      ;;
798  esac
799  # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
800  # is provided.
801  default_use_cxa_atexit=yes
802  use_gcc_tgmath=no
803  use_gcc_stdint=wrap
804  # Enable compilation for Android by default for *android* targets.
805  case $target in
806    *-*-*android*)
807      tm_defines="$tm_defines ANDROID_DEFAULT=1"
808      ;;
809    *)
810      tm_defines="$tm_defines ANDROID_DEFAULT=0"
811      ;;
812  esac
813  c_target_objs="${c_target_objs} glibc-c.o"
814  cxx_target_objs="${cxx_target_objs} glibc-c.o"
815  tmake_file="${tmake_file} t-glibc"
816  target_has_targetcm=yes
817  ;;
818*-*-netbsd*)
819  tm_p_file="${tm_p_file} netbsd-protos.h"
820  tmake_file="t-netbsd t-slibgcc"
821  extra_objs="${extra_objs} netbsd.o"
822  gas=yes
823  gnu_ld=yes
824  use_gcc_stdint=wrap
825  case ${enable_threads} in
826    "" | yes | posix) thread_file='posix' ;;
827  esac
828  case ${target} in
829    arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*)
830      default_gnu_indirect_function=yes
831      ;;
832  esac
833  nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
834  default_use_cxa_atexit=yes
835  ;;
836*-*-openbsd*)
837  tmake_file="t-openbsd"
838  case ${enable_threads} in
839    yes)
840      thread_file='posix'
841      ;;
842  esac
843  case ${target} in
844    *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
845      default_use_cxa_atexit=yes
846      ;;
847  esac
848  ;;
849*-*-phoenix*)
850  gas=yes
851  gnu_ld=yes
852  default_use_cxa_atexit=yes
853  ;;
854*-*-rtems*)
855  case ${enable_threads} in
856    "" | yes | rtems) thread_file='rtems' ;;
857    posix) thread_file='posix' ;;
858    no) ;;
859    *)
860      echo 'Unknown thread configuration for RTEMS'
861      exit 1
862      ;;
863  esac
864  tmake_file="${tmake_file} t-rtems"
865  extra_options="${extra_options} rtems.opt"
866  default_use_cxa_atexit=yes
867  use_gcc_stdint=wrap
868  ;;
869*-*-uclinux*)
870  extra_options="$extra_options gnu-user.opt"
871  use_gcc_stdint=wrap
872  case ${enable_threads} in
873    "" | yes | posix) thread_file='posix' ;;
874  esac
875  tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
876  ;;
877*-*-rdos*)
878  use_gcc_stdint=wrap
879  ;;
880*-*-solaris2*)
881  # i?86-*-solaris2* needs to insert headers between cpu default and
882  # Solaris 2 specific ones.
883  sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
884  sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
885  sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
886  case ${target} in
887    *-*-solaris2.1[1-9]*)
888      # __cxa_atexit was introduced in Solaris 11.4.
889      default_use_cxa_atexit=yes
890      ;;
891  esac
892  use_gcc_stdint=wrap
893  if test x$gnu_ld = xyes; then
894    tm_file="usegld.h ${tm_file}"
895  fi
896  if test x$gas = xyes; then
897    tm_file="usegas.h ${tm_file}"
898  fi
899  tm_p_file="${tm_p_file} sol2-protos.h"
900  tmake_file="${tmake_file} t-sol2 t-slibgcc"
901  c_target_objs="${c_target_objs} sol2-c.o"
902  cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
903  extra_objs="${extra_objs} sol2.o sol2-stubs.o"
904  extra_options="${extra_options} sol2.opt"
905  case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
906    "":yes:* | yes:yes:* )
907      thread_file=posix
908      ;;
909  esac
910  ;;
911*-*-*vms*)
912  extra_options="${extra_options} vms/vms.opt"
913  xmake_file=vms/x-vms
914  tmake_file="vms/t-vms t-slibgcc"
915  extra_objs="vms.o"
916  target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
917  tm_p_file="${tm_p_file} vms/vms-protos.h"
918  xm_file="vms/xm-vms.h"
919  c_target_objs="vms-c.o"
920  cxx_target_objs="vms-c.o"
921  fortran_target_objs="vms-f.o"
922  use_gcc_stdint=provide
923  tm_file="${tm_file} vms/vms-stdint.h"
924  if test x$gnu_ld != xyes; then
925    # Build wrappers for native case.
926    extra_programs="ld\$(exeext) ar\$(exeext)"
927    tmake_file="$tmake_file vms/t-vmsnative"
928  fi
929  ;;
930*-*-vxworks*)
931  tmake_file=t-vxworks
932  xm_defines=POSIX
933  extra_options="${extra_options} vxworks.opt"
934  extra_objs="$extra_objs vxworks.o"
935  use_gcc_stdint=provide
936  tm_file="${tm_file} vxworks-stdint.h"
937  case ${enable_threads} in
938    no) ;;
939    "" | yes | vxworks) thread_file='vxworks' ;;
940    *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
941  esac
942  case $target in
943    *-*-vxworks7*)
944      tm_defines="$tm_defines TARGET_VXWORKS7=1"
945      ;;
946  esac
947  ;;
948*-*-elf|arc*-*-elf*)
949  # Assume that newlib is being used and so __cxa_atexit is provided.
950  default_use_cxa_atexit=yes
951  use_gcc_stdint=wrap
952  ;;
953esac
954
955case ${target} in
956aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
957	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
958	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
959	tmake_file="${tmake_file} aarch64/t-aarch64"
960	case $target in
961	aarch64-*-elf*)
962		use_gcc_stdint=wrap
963		;;
964        aarch64-*-fuchsia*)
965                tm_file="${tm_file} fuchsia.h"
966                ;;
967	aarch64-*-rtems*)
968	  	tm_file="${tm_file} rtems.h aarch64/rtems.h"
969		;;
970	esac
971	case $target in
972	aarch64_be-*)
973		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
974		;;
975	esac
976	aarch64_multilibs="${with_multilib_list}"
977	if test "$aarch64_multilibs" = "default"; then
978		aarch64_multilibs="lp64,ilp32"
979	fi
980	aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
981	for aarch64_multilib in ${aarch64_multilibs}; do
982		case ${aarch64_multilib} in
983		ilp32 | lp64 )
984			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
985			;;
986		*)
987			echo "--with-multilib-list=${aarch64_multilib} not supported."
988			exit 1
989		esac
990	done
991	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
992	;;
993aarch64*-*-freebsd*)
994	tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
995	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
996	tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
997	;;
998aarch64*-*-netbsd*)
999	tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
1000	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-netbsd.h"
1001	tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
1002	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1003	# XXX big endian
1004	;;
1005aarch64*-*-linux*)
1006	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
1007	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
1008	tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
1009	tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
1010	case $target in
1011	aarch64_be-*)
1012		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1013		;;
1014	esac
1015	aarch64_multilibs="${with_multilib_list}"
1016	if test "$aarch64_multilibs" = "default"; then
1017		# TODO: turn on ILP32 multilib build after its support is mature.
1018		# aarch64_multilibs="lp64,ilp32"
1019		aarch64_multilibs="lp64"
1020	fi
1021	aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1022	for aarch64_multilib in ${aarch64_multilibs}; do
1023		case ${aarch64_multilib} in
1024		ilp32 | lp64 )
1025			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1026			;;
1027		*)
1028			echo "--with-multilib-list=${aarch64_multilib} not supported."
1029			exit 1
1030		esac
1031	done
1032	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1033	;;
1034alpha*-*-linux*)
1035	tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
1036	tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
1037	extra_options="${extra_options} alpha/elf.opt"
1038	;;
1039alpha*-*-freebsd*)
1040	tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
1041	tmake_file="${tmake_file} alpha/t-alpha"
1042	extra_options="${extra_options} alpha/elf.opt"
1043	;;
1044alpha*-*-netbsd*)
1045	tm_file="elfos.h ${tm_file} ${nbsd_tm_file} alpha/elf.h alpha/netbsd.h"
1046	tmake_file="${tmake_file} alpha/t-alpha"
1047	extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
1048		       alpha/elf.opt"
1049	;;
1050alpha*-*-openbsd*)
1051	tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
1052	tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
1053	tmake_file="${tmake_file} alpha/t-alpha"
1054	extra_options="${extra_options} openbsd.opt alpha/elf.opt"
1055	# default x-alpha is only appropriate for dec-osf.
1056	;;
1057alpha*-dec-*vms*)
1058	tm_file="${tm_file} vms/vms.h alpha/vms.h"
1059	tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
1060	;;
1061arc*-*-elf*)
1062	tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
1063	tmake_file="arc/t-multilib arc/t-arc"
1064	extra_gcc_objs="driver-arc.o"
1065	if test "x$with_cpu" != x; then
1066		tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1067	fi
1068	if test x${with_endian} = x; then
1069		case ${target} in
1070		arc*be-*-* | arc*eb-*-*)	with_endian=big ;;
1071		*)				with_endian=little ;;
1072		esac
1073	fi
1074	case ${with_endian} in
1075	big|little)		;;
1076	*)	echo "with_endian=${with_endian} not supported."; exit 1 ;;
1077	esac
1078	case ${with_endian} in
1079	big*)	tm_file="arc/big.h ${tm_file}"
1080	esac
1081	;;
1082arc*-*-linux*)
1083	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}"
1084	tmake_file="${tmake_file} arc/t-arc"
1085	extra_gcc_objs="driver-arc.o"
1086	if test "x$with_cpu" != x; then
1087		tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1088	fi
1089	if test x${with_endian} = x; then
1090		case ${target} in
1091		arc*be-*-* | arc*eb-*-*)	with_endian=big ;;
1092		*)				with_endian=little ;;
1093		esac
1094	fi
1095	case ${with_endian} in
1096	big|little)		;;
1097	*)	echo "with_endian=${with_endian} not supported."; exit 1 ;;
1098	esac
1099	case ${with_endian} in
1100	big*)	tm_file="arc/big.h ${tm_file}"
1101	esac
1102	# Force .init_array support.  The configure script cannot always
1103	# automatically detect that GAS supports it, yet we require it.
1104	gcc_cv_initfini_array=yes
1105	;;
1106arm-wrs-vxworks|arm-wrs-vxworks7)
1107	extra_options="${extra_options} arm/vxworks.opt"
1108	tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
1109        case $target in
1110	*-vxworks7)
1111            # VxWorks7 on ARM adheres to the ARM Base Platform ABI
1112	    tmake_file="${tmake_file} arm/t-bpabi"
1113	    tm_file="arm/bpabi.h ${tm_file}"
1114	    # The BPABI long long divmod functions return a 128-bit value in
1115	    # registers r0-r3.
1116	    need_64bit_hwint=yes
1117	    default_use_cxa_atexit=yes
1118	    ;;
1119        *)  ;;
1120        esac
1121        tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1122	target_cpu_cname="arm8"
1123	;;
1124arm*-*-freebsd*)                # ARM FreeBSD EABI
1125	tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
1126	case $target in
1127	arm*b-*-freebsd*)
1128	    tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1129	    ;;
1130	esac
1131	tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
1132	tm_file="${tm_file} arm/bpabi.h arm/freebsd.h arm/aout.h arm/arm.h"
1133	case $target in
1134	armv6*-*-freebsd*)
1135	    target_cpu_cname="arm1176jzf-s"
1136            if test $fbsd_major -ge 11; then
1137               tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1138            fi
1139	    ;;
1140	armv7*-*-freebsd*)
1141	    target_cpu_cname="generic-armv7-a"
1142	    tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1143	    ;;
1144	*)
1145	    target_cpu_cname="arm9"
1146	    ;;
1147	esac
1148	with_tls=${with_tls:-gnu}
1149	;;
1150arm*-*-netbsdelf*)
1151	tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h arm/aout.h arm/netbsd-elf.h"
1152	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1153	tmake_file="${tmake_file} arm/t-arm"
1154	case ${target} in
1155	arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
1156	esac
1157	case ${target} in
1158	arm*-*-netbsdelf-*eabi*)
1159	    tm_file="${tm_file} arm/bpabi.h arm/netbsd-eabi.h"
1160	    # GCC 7 vs NetBSD/eabi -> avoid arm unwinder
1161	    #tmake_file="$tmake_file arm/t-bpabi"
1162	    tmake_file="$tmake_file arm/t-netbsdeabi"
1163	    # The EABI requires the use of __cxa_atexit.
1164	    default_use_cxa_atexit=yes
1165	    ;;
1166	*)
1167	    tmake_file="$tmake_file arm/t-netbsd"
1168	    # NetBSD/arm (non-eabi) is only old platforms
1169	    with_cpu=${with_cpu:-strongarm}
1170	    ;;
1171	esac
1172	tm_file="${tm_file} vxworks-dummy.h arm/arm.h"
1173	case ${target} in
1174	arm*-*-netbsdelf-*eabihf*)
1175	    tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
1176	    ;;
1177	esac
1178	case ${target} in
1179	armv4*) with_cpu=${with_cpu:-strongarm};;
1180	armv6*) with_cpu=${with_cpu:-arm1176jzf-s};;
1181	armv7*) with_cpu=${with_cpu:-cortex-a8};;
1182	arm*) with_cpu=${with_cpu:-arm9e};;
1183	esac
1184	target_cpu_cname="$with_cpu"
1185	;;
1186arm*-*-linux-*)			# ARM GNU/Linux with ELF
1187	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"
1188	extra_options="${extra_options} linux-android.opt"
1189	case $target in
1190	arm*b-*-linux*)
1191	    tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1192	    ;;
1193	esac
1194	tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
1195	tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1196	# Generation of floating-point instructions requires at least ARMv5te.
1197	if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then
1198	    target_cpu_cname="arm10e"
1199	else
1200	    target_cpu_cname="arm10tdmi"
1201	fi
1202	# Define multilib configuration for arm-linux-androideabi.
1203	case ${target} in
1204	*-androideabi)
1205	    tmake_file="$tmake_file arm/t-linux-androideabi"
1206	    ;;
1207	esac
1208	# The EABI requires the use of __cxa_atexit.
1209	default_use_cxa_atexit=yes
1210	with_tls=${with_tls:-gnu}
1211	;;
1212arm*-*-uclinux*eabi*)		# ARM ucLinux
1213	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
1214	tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
1215	tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1216	target_cpu_cname="arm7tdmi"
1217	# The EABI requires the use of __cxa_atexit.
1218	default_use_cxa_atexit=yes
1219	;;
1220arm*-*-phoenix*)
1221	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1222	tm_file="${tm_file} newlib-stdint.h phoenix.h"
1223	tm_file="${tm_file} arm/aout.h arm/arm.h"
1224	tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
1225	target_cpu_cname="arm7tdmi"
1226	;;
1227arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
1228	case ${target} in
1229	arm*eb-*-eabi*)
1230	  tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1231	esac
1232	default_use_cxa_atexit=yes
1233	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1234	tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
1235	target_cpu_cname="arm7tdmi"
1236	case ${target} in
1237	arm*-*-eabi*)
1238	  tm_file="$tm_file newlib-stdint.h"
1239	  tmake_file="${tmake_file} arm/t-bpabi"
1240	  use_gcc_stdint=wrap
1241	  ;;
1242	arm*-*-fuchsia*)
1243	  tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h"
1244	  tmake_file="${tmake_file} arm/t-bpabi arm/t-fuchsia"
1245	  target_cpu_cname="generic-armv7-a"
1246	  ;;
1247	arm*-*-rtems*)
1248	  tm_file="${tm_file} rtems.h arm/rtems.h newlib-stdint.h"
1249	  tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
1250	  ;;
1251	arm*-*-symbianelf*)
1252	  tm_file="${tm_file} arm/symbian.h"
1253	  # We do not include t-bpabi for Symbian OS because the system
1254	  # provides its own implementation of the BPABI functions.
1255	  tmake_file="${tmake_file} arm/t-symbian"
1256	  target_cpu_cname="arm10tdmi"
1257	  ;;
1258	esac
1259	tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
1260	;;
1261avr-*-*)
1262	tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
1263	if test x${with_avrlibc} != xno; then
1264	    tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1265	    tm_defines="${tm_defines} WITH_AVRLIBC"
1266	fi
1267	tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
1268	use_gcc_stdint=wrap
1269	extra_gcc_objs="driver-avr.o avr-devices.o"
1270	extra_objs="avr-devices.o avr-log.o"
1271	;;
1272bfin*-elf*)
1273	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1274	tmake_file=bfin/t-bfin-elf
1275	use_collect2=no
1276	;;
1277bfin*-uclinux*)
1278	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
1279	tmake_file=bfin/t-bfin-uclinux
1280	use_collect2=no
1281	;;
1282bfin*-linux-uclibc*)
1283	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"
1284	tmake_file="${tmake_file} bfin/t-bfin-linux"
1285	use_collect2=no
1286	;;
1287bfin*-rtems*)
1288	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
1289	tmake_file="${tmake_file} bfin/t-rtems"
1290	;;
1291bfin*-*)
1292	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1293	use_collect2=no
1294	use_gcc_stdint=wrap
1295	;;
1296cr16-*-elf)
1297        tm_file="elfos.h ${tm_file} newlib-stdint.h"
1298        tmake_file="${tmake_file} cr16/t-cr16 "
1299        use_collect2=no
1300        ;;
1301crisv32-*-elf | crisv32-*-none)
1302	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1303	tmake_file="cris/t-cris"
1304	target_cpu_default=32
1305	gas=yes
1306	extra_options="${extra_options} cris/elf.opt"
1307	use_gcc_stdint=wrap
1308	;;
1309cris-*-elf | cris-*-none)
1310	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1311	tmake_file="cris/t-cris cris/t-elfmulti"
1312	gas=yes
1313	extra_options="${extra_options} cris/elf.opt"
1314	use_gcc_stdint=wrap
1315	;;
1316crisv32-*-linux* | cris-*-linux*)
1317	tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
1318	tmake_file="${tmake_file} cris/t-cris cris/t-linux"
1319	extra_options="${extra_options} cris/linux.opt"
1320	case $target in
1321	  cris-*-*)
1322		target_cpu_default=10
1323		;;
1324	  crisv32-*-*)
1325		target_cpu_default=32
1326		;;
1327	esac
1328	;;
1329epiphany-*-elf | epiphany-*-rtems*)
1330	tm_file="${tm_file} dbxelf.h elfos.h"
1331	tmake_file="${tmake_file} epiphany/t-epiphany"
1332	case ${target} in
1333	epiphany-*-rtems*)
1334	  tm_file="${tm_file} rtems.h epiphany/rtems.h newlib-stdint.h"
1335	  ;;
1336	*)
1337	  tm_file="${tm_file} newlib-stdint.h"
1338	  ;;
1339	esac
1340	extra_options="${extra_options} fused-madd.opt"
1341	extra_objs="${extra_objs} mode-switch-use.o resolve-sw-modes.o"
1342	tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1343	extra_headers="epiphany_intrinsics.h"
1344	;;
1345fr30-*-elf)
1346	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1347	;;
1348frv-*-elf)
1349	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1350	tmake_file=frv/t-frv
1351	;;
1352frv-*-*linux*)
1353	tm_file="dbxelf.h elfos.h ${tm_file} \
1354	         gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1355	tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1356	;;
1357ft32-*-elf)
1358	gas=yes
1359	gnu_ld=yes
1360	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1361	tmake_file="${tmake_file} ft32/t-ft32"
1362	;;
1363moxie-*-elf)
1364	gas=yes
1365	gnu_ld=yes
1366	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1367	tmake_file="${tmake_file} moxie/t-moxie"
1368	;;
1369moxie-*-uclinux*)
1370	gas=yes
1371	gnu_ld=yes
1372	tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1373	tmake_file="${tmake_file} moxie/t-moxie"
1374	;;
1375moxie-*-rtems*)
1376	tmake_file="${tmake_file} moxie/t-moxie"
1377	tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1378	;;
1379moxie-*-moxiebox*)
1380	gas=yes
1381	gnu_ld=yes
1382	tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
1383	tmake_file="${tmake_file} moxie/t-moxiebox"
1384	;;
1385h8300-*-elf*)
1386	tmake_file="h8300/t-h8300"
1387	tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
1388	;;
1389h8300-*-linux*)
1390	tmake_file="${tmake_file} h8300/t-h8300 h8300/t-linux"
1391	tm_file="h8300/h8300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h h8300/linux.h"
1392	;;
1393hppa*64*-*-linux*)
1394	target_cpu_default="MASK_PA_11|MASK_PA_20"
1395	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1396		 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1397		 pa/pa64-linux.h"
1398	gas=yes gnu_ld=yes
1399	;;
1400hppa*-*-linux*)
1401	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
1402	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1403		 pa/pa32-regs.h pa/pa32-linux.h"
1404	tmake_file="${tmake_file} pa/t-linux"
1405	;;
1406hppa*-*-openbsd*)
1407	target_cpu_default="MASK_PA_11"
1408	tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1409		 pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1410	extra_options="${extra_options} openbsd.opt"
1411	gas=yes
1412	gnu_ld=yes
1413	;;
1414hppa*-*-netbsd* | parisc*-*-netbsd*)
1415	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1416	tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} \
1417		 pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h"
1418	tmake_file="${tmake_file} pa/t-netbsd"
1419	tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
1420	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1421	;;
1422hppa[12]*-*-hpux10*)
1423	case ${target} in
1424	hppa1.1-*-* | hppa2*-*-*)
1425		target_cpu_default="MASK_PA_11"
1426		;;
1427	esac
1428	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1429		 pa/pa-hpux.h pa/pa-hpux10.h"
1430	extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1431	case ${target} in
1432	*-*-hpux10.[1-9]*)
1433		tm_file="${tm_file} pa/pa-hpux1010.h"
1434		extra_options="${extra_options} pa/pa-hpux1010.opt"
1435		;;
1436	esac
1437	use_gcc_stdint=provide
1438	tm_file="${tm_file} hpux-stdint.h"
1439	tmake_file="t-slibgcc"
1440	case ${enable_threads} in
1441	  "")
1442	    if test x$have_pthread_h = xyes ; then
1443	      tmake_file="${tmake_file} pa/t-dce-thr"
1444	    fi
1445	    ;;
1446	  yes | dce)
1447	    tmake_file="${tmake_file} pa/t-dce-thr"
1448	    ;;
1449	esac
1450	use_collect2=yes
1451	gas=yes
1452	if test "x$with_dwarf2" != x; then
1453		echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1454		dwarf2=no
1455	fi
1456	;;
1457hppa*64*-*-hpux11*)
1458	target_cpu_default="MASK_PA_11|MASK_PA_20"
1459	if test x$gnu_ld = xyes
1460	then
1461		target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1462	fi
1463	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1464		 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1465		 pa/pa-hpux11.h"
1466	case ${target} in
1467	*-*-hpux11.[12]*)
1468		tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1469		extra_options="${extra_options} pa/pa-hpux1111.opt"
1470		;;
1471	*-*-hpux11.[3-9]*)
1472		tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1473		extra_options="${extra_options} pa/pa-hpux1131.opt"
1474		;;
1475	*)
1476		tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1477		;;
1478	esac
1479	extra_options="${extra_options} pa/pa-hpux.opt \
1480		       pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1481	tmake_file="t-slibgcc"
1482	case x${enable_threads} in
1483	x | xyes | xposix )
1484		thread_file=posix
1485		;;
1486	esac
1487	gas=yes
1488	case ${target} in
1489	  *-*-hpux11.[01]*)
1490		use_gcc_stdint=provide
1491		tm_file="${tm_file} hpux-stdint.h"
1492		;;
1493	  *-*-hpux11.[23]*)
1494		use_gcc_stdint=wrap
1495		tm_file="${tm_file} hpux-stdint.h"
1496		;;
1497	esac
1498	;;
1499hppa[12]*-*-hpux11*)
1500	case ${target} in
1501	hppa1.1-*-* | hppa2*-*-*)
1502		target_cpu_default="MASK_PA_11"
1503		;;
1504	esac
1505	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1506		 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1507	extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1508		       hpux11.opt"
1509	case ${target} in
1510	*-*-hpux11.[12]*)
1511		tm_file="${tm_file} pa/pa-hpux1111.h"
1512		extra_options="${extra_options} pa/pa-hpux1111.opt"
1513		;;
1514	*-*-hpux11.[3-9]*)
1515		tm_file="${tm_file} pa/pa-hpux1131.h"
1516		extra_options="${extra_options} pa/pa-hpux1131.opt"
1517		;;
1518	esac
1519	tmake_file="t-slibgcc"
1520	case x${enable_threads} in
1521	x | xyes | xposix )
1522		thread_file=posix
1523		;;
1524	esac
1525	use_collect2=yes
1526	gas=yes
1527	case ${target} in
1528	  *-*-hpux11.[01]*)
1529		use_gcc_stdint=provide
1530		tm_file="${tm_file} hpux-stdint.h"
1531		;;
1532	  *-*-hpux11.[23]*)
1533		use_gcc_stdint=wrap
1534		tm_file="${tm_file} hpux-stdint.h"
1535		;;
1536	esac
1537	if test "x$with_dwarf2" != x; then
1538		echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1539		dwarf2=no
1540	fi
1541	;;
1542i[34567]86-*-darwin1[89]*)
1543	echo "Error: 32bit target is not supported after Darwin17" 1>&2
1544	;;
1545i[34567]86-*-darwin*)
1546	need_64bit_isa=yes
1547	# Baseline choice for a machine that allows m64 support.
1548	with_cpu=${with_cpu:-core2}
1549	tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch t-slibgcc"
1550	tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
1551	;;
1552x86_64-*-darwin1[89]* | x86_64-*-darwin2[01]*)
1553	# Only 64b from now
1554	with_cpu=${with_cpu:-core2}
1555	tmake_file="${tmake_file} t-slibgcc"
1556	;;
1557x86_64-*-darwin*)
1558	with_cpu=${with_cpu:-core2}
1559	tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
1560	tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
1561	;;
1562i[34567]86-*-elfiamcu)
1563	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
1564	;;
1565i[34567]86-*-elf*)
1566	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1567	;;
1568x86_64-*-elf*)
1569	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1570	;;
1571x86_64-*-rtems*)
1572	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"
1573	;;
1574i[34567]86-*-rdos*)
1575    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1576    ;;
1577x86_64-*-rdos*)
1578    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"
1579    tmake_file="i386/t-i386elf t-svr4"
1580    ;;
1581i[34567]86-*-dragonfly*)
1582	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
1583	tmake_file="${tmake_file} i386/t-crtstuff"
1584	;;
1585x86_64-*-dragonfly*)
1586	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"
1587	tmake_file="${tmake_file} i386/t-crtstuff"
1588	;;
1589i[34567]86-*-freebsd*)
1590	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1591	;;
1592x86_64-*-freebsd*)
1593	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"
1594	;;
1595i[34567]86-*-netbsdelf*)
1596	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
1597	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1598	;;
1599x86_64-*-netbsd*)
1600	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
1601	tmake_file="${tmake_file} i386/t-netbsd64"
1602	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1603	;;
1604i[34567]86-*-openbsd*)
1605	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1606	tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1607	extra_options="${extra_options} openbsd.opt"
1608	gas=yes
1609	gnu_ld=yes
1610	;;
1611x86_64-*-openbsd*)
1612	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1613	tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1614	extra_options="${extra_options} openbsd.opt"
1615	gas=yes
1616	gnu_ld=yes
1617	;;
1618i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1619			# Intel 80386's running GNU/*
1620			# with ELF format using glibc 2
1621	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1622	case ${target} in
1623	i[34567]86-*-linux*)
1624		tm_file="${tm_file} linux.h linux-android.h"
1625		extra_options="${extra_options} linux-android.opt"
1626		if test x$enable_targets = xall; then
1627			tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
1628			tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1629			tmake_file="${tmake_file} i386/t-linux64"
1630			x86_multilibs="${with_multilib_list}"
1631			if test "$x86_multilibs" = "default"; then
1632				x86_multilibs="m64,m32"
1633			fi
1634			x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1635			for x86_multilib in ${x86_multilibs}; do
1636				case ${x86_multilib} in
1637				m32 | m64 | mx32)
1638					TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1639					;;
1640				*)
1641					echo "--with-multilib-list=${x86_with_multilib} not supported."
1642					exit 1
1643				esac
1644			done
1645			TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1646			need_64bit_isa=yes
1647			if test x$with_cpu = x; then
1648				if test x$with_cpu_64 = x; then
1649					with_cpu_64=generic
1650				fi
1651			else
1652				case " $x86_cpus $x86_archs $x86_64_archs " in
1653				*" $with_cpu "*)
1654					;;
1655				*)
1656					echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1657					echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1658					exit 1
1659					;;
1660				esac
1661			fi
1662		else
1663			tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
1664		fi
1665		;;
1666	i[34567]86-*-kfreebsd*-gnu)
1667		tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
1668		;;
1669	i[34567]86-*-kopensolaris*-gnu)
1670		tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
1671		;;
1672	i[34567]86-*-gnu*)
1673		tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
1674		;;
1675	esac
1676	;;
1677x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
1678	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
1679		 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
1680	case ${target} in
1681	x86_64-*-linux*)
1682		tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1683		extra_options="${extra_options} linux-android.opt"
1684	  	;;
1685	x86_64-*-kfreebsd*-gnu)
1686		tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1687		;;
1688	esac
1689	tmake_file="${tmake_file} i386/t-linux64"
1690	x86_multilibs="${with_multilib_list}"
1691	if test "$x86_multilibs" = "default"; then
1692		case ${with_abi} in
1693		x32 | mx32)
1694			x86_multilibs="mx32"
1695			;;
1696		*)
1697			x86_multilibs="m64,m32"
1698			;;
1699		esac
1700	fi
1701	x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1702	for x86_multilib in ${x86_multilibs}; do
1703		case ${x86_multilib} in
1704		m32 | m64 | mx32)
1705			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1706			;;
1707		*)
1708			echo "--with-multilib-list=${x86_with_multilib} not supported."
1709			exit 1
1710		esac
1711	done
1712	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1713	;;
1714i[34567]86-pc-msdosdjgpp*)
1715	xm_file=i386/xm-djgpp.h
1716	tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1717	native_system_header_dir=/dev/env/DJDIR/include
1718	extra_options="${extra_options} i386/djgpp.opt"
1719	gnu_ld=yes
1720	gas=yes
1721	use_gcc_stdint=wrap
1722	;;
1723i[34567]86-*-lynxos*)
1724	xm_defines=POSIX
1725	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1726	tmake_file="${tmake_file} t-lynx"
1727	extra_options="${extra_options} lynx.opt"
1728	thread_file=lynx
1729	gnu_ld=yes
1730	gas=yes
1731	;;
1732i[34567]86-*-nto-qnx*)
1733	tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1734	extra_options="${extra_options} i386/nto.opt"
1735	gnu_ld=yes
1736	gas=yes
1737	;;
1738i[34567]86-*-rtems*)
1739	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"
1740	tmake_file="${tmake_file} i386/t-rtems"
1741	;;
1742i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
1743	# Set default arch_32 to pentium4, tune_32 to generic like the other
1744	# i386 targets, although config.guess defaults to i386-pc-solaris2*.
1745	with_arch_32=${with_arch_32:-pentium4}
1746	with_tune_32=${with_tune_32:-generic}
1747	tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file_head} i386/x86-64.h ${sol2_tm_file_tail}"
1748	tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1749	tmake_file="$tmake_file i386/t-sol2"
1750	need_64bit_isa=yes
1751	if test x$with_cpu = x; then
1752		if test x$with_cpu_64 = x; then
1753			with_cpu_64=generic
1754		fi
1755	else
1756		case " $x86_cpus $x86_archs $x86_64_archs " in
1757		*" $with_cpu "*)
1758			;;
1759		*)
1760			echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1761			echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1762			exit 1
1763			;;
1764		esac
1765	fi
1766	;;
1767i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae|i[4567]86-wrs-vxworks7|x86_64-wrs-vxworks7)
1768	tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
1769	case ${target} in
1770	  x86_64-*)
1771	    need_64bit_isa=yes
1772	    tm_file="${tm_file} i386/x86-64.h"
1773	    ;;
1774	esac
1775	tm_file="${tm_file} vx-common.h"
1776	case ${target} in
1777	  *-vxworksae*)
1778	    tm_file="${tm_file} vxworksae.h i386/vxworks.h i386/vxworksae.h"
1779	    tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1780	    ;;
1781	  *)
1782	    tm_file="${tm_file} vxworks.h i386/vxworks.h"
1783	    tmake_file="${tmake_file} i386/t-vxworks"
1784	    ;;
1785	esac
1786	;;
1787i[34567]86-*-cygwin*)
1788	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"
1789	xm_file=i386/xm-cygwin.h
1790	tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
1791	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1792	extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
1793	extra_objs="${extra_objs} winnt.o winnt-stubs.o"
1794	c_target_objs="${c_target_objs} msformat-c.o"
1795	cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1796	if test x$enable_threads = xyes; then
1797		thread_file='posix'
1798	fi
1799	default_use_cxa_atexit=yes
1800	use_gcc_stdint=wrap
1801	;;
1802x86_64-*-cygwin*)
1803	need_64bit_isa=yes
1804	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"
1805	xm_file=i386/xm-cygwin.h
1806	tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
1807	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1808	extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
1809	extra_objs="${extra_objs} winnt.o winnt-stubs.o"
1810	c_target_objs="${c_target_objs} msformat-c.o"
1811	cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1812	if test x$enable_threads = xyes; then
1813		thread_file='posix'
1814	fi
1815	default_use_cxa_atexit=yes
1816	use_gcc_stdint=wrap
1817	tm_defines="${tm_defines} TARGET_CYGWIN64=1"
1818	;;
1819i[34567]86-*-mingw* | x86_64-*-mingw*)
1820	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1821	xm_file=i386/xm-mingw32.h
1822	c_target_objs="${c_target_objs} winnt-c.o"
1823	cxx_target_objs="${cxx_target_objs} winnt-c.o"
1824	target_has_targetcm="yes"
1825	case ${target} in
1826		x86_64-*-* | *-w64-*)
1827			need_64bit_isa=yes
1828			;;
1829		*)
1830			;;
1831	esac
1832	if test x$enable_threads = xposix ; then
1833		tm_file="${tm_file} i386/mingw-pthread.h"
1834	fi
1835	tm_file="${tm_file} i386/mingw32.h"
1836	# This makes the logic if mingw's or the w64 feature set has to be used
1837	case ${target} in
1838		*-w64-*)
1839			user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1840			user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1841			tm_file="${tm_file} i386/mingw-w64.h"
1842			if test x$enable_targets = xall; then
1843				tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1844				if test x$with_cpu = x; then
1845					if test x$with_cpu_64 = x; then
1846						with_cpu_64=generic
1847					fi
1848				else
1849					case " $x86_cpus $x86_archs $x86_64_archs " in
1850					*" $with_cpu "*)
1851						;;
1852					*)
1853						echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1854						echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1855						exit 1
1856						;;
1857					esac
1858				fi
1859			fi
1860			;;
1861		*)
1862			;;
1863	esac
1864	tm_file="${tm_file} i386/mingw-stdint.h"
1865	tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
1866        case ${target} in
1867               x86_64-w64-*)
1868               		tmake_file="${tmake_file} i386/t-mingw-w64"
1869			;;
1870	       i[34567]86-w64-*)
1871			tmake_file="${tmake_file} i386/t-mingw-w32"
1872			;;
1873	esac
1874        native_system_header_dir=/mingw/include
1875	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1876	extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1877	case ${target} in
1878		*-w64-*)
1879			extra_options="${extra_options} i386/mingw-w64.opt"
1880			;;
1881		*)
1882			;;
1883	esac
1884	extra_objs="${extra_objs} winnt.o winnt-stubs.o"
1885	c_target_objs="${c_target_objs} msformat-c.o"
1886	cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1887	gas=yes
1888	gnu_ld=yes
1889	default_use_cxa_atexit=yes
1890	use_gcc_stdint=wrap
1891	case ${enable_threads} in
1892	  "" | yes | win32)
1893	    thread_file='win32'
1894	    ;;
1895	  posix)
1896	    thread_file='posix'
1897	    ;;
1898	esac
1899	case ${target} in
1900 		*mingw32crt*)
1901 			tm_file="${tm_file} i386/crtdll.h"
1902 			;;
1903		*mingw32msv* | *mingw*)
1904			;;
1905	esac
1906	;;
1907x86_64-*-fuchsia*)
1908	tmake_file="${tmake_file} i386/t-x86_64-elf"
1909	tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
1910	;;
1911ia64*-*-elf*)
1912	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1913	tmake_file="ia64/t-ia64"
1914	target_cpu_default="0"
1915	if test x$gas = xyes
1916	then
1917		target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1918	fi
1919	if test x$gnu_ld = xyes
1920	then
1921		target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1922	fi
1923	;;
1924ia64*-*-netbsd*)
1925	tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} ia64/sysv4.h ia64/netbsd.h"
1926	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1927	tmake_file="${tmake_file} ia64/t-ia64"
1928	if test x$with_system_libunwind != xyes ; then
1929		tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
1930	fi
1931	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1932	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1933	;;
1934ia64*-*-freebsd*)
1935	tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1936	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1937	tmake_file="${tmake_file} ia64/t-ia64"
1938	;;
1939ia64*-*-linux*)
1940	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1941	tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
1942	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1943	;;
1944ia64*-*-hpux*)
1945	tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1946	tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
1947	target_cpu_default="MASK_GNU_AS"
1948	case x$enable_threads in
1949	x | xyes | xposix )
1950		thread_file=posix
1951		;;
1952	esac
1953	use_collect2=no
1954	c_target_objs="ia64-c.o"
1955	cxx_target_objs="ia64-c.o"
1956	extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1957	use_gcc_stdint=wrap
1958	tm_file="${tm_file} hpux-stdint.h"
1959	case ${target} in
1960	*-*-hpux11.3*)
1961		tm_file="${tm_file} ia64/hpux-unix2003.h"
1962		;;
1963	esac
1964	;;
1965ia64-hp-*vms*)
1966	tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1967	tmake_file="${tmake_file} ia64/t-ia64"
1968	target_cpu_default="0"
1969	if test x$gas = xyes
1970	then
1971		target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1972	fi
1973	extra_options="${extra_options} ia64/vms.opt"
1974	;;
1975iq2000*-*-elf*)
1976        tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1977        out_file=iq2000/iq2000.c
1978        md_file=iq2000/iq2000.md
1979        ;;
1980lm32-*-elf*)
1981        tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
1982	tmake_file="${tmake_file} lm32/t-lm32"
1983        ;;
1984lm32-*-rtems*)
1985	tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1986	tmake_file="${tmake_file} lm32/t-lm32"
1987	tmake_file="${tmake_file} lm32/t-rtems"
1988         ;;
1989lm32-*-uclinux*)
1990        tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1991	tmake_file="${tmake_file} lm32/t-lm32"
1992        ;;
1993m32r-*-elf*)
1994	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1995 	;;
1996m32rle-*-elf*)
1997	tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1998	;;
1999m32r-*-linux*)
2000	tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
2001	tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
2002	gnu_ld=yes
2003	if test x$enable_threads = xyes; then
2004		thread_file='posix'
2005	fi
2006 	;;
2007m32rle-*-linux*)
2008	tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
2009	tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
2010	gnu_ld=yes
2011	if test x$enable_threads = xyes; then
2012		thread_file='posix'
2013	fi
2014	;;
2015m68k-*-elf* | fido-*-elf*)
2016	case ${target} in
2017	fido-*-elf*)
2018		# Check that $with_cpu makes sense.
2019		case $with_cpu in
2020		"" | "fidoa")
2021			;;
2022		*)
2023			echo "Cannot accept --with-cpu=$with_cpu"
2024			exit 1
2025			;;
2026		esac
2027		with_cpu=fidoa
2028		;;
2029	*)
2030		default_m68k_cpu=68020
2031		default_cf_cpu=5206
2032		;;
2033	esac
2034	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"
2035	tm_defines="${tm_defines} MOTOROLA=1"
2036	tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
2037	# Add multilibs for targets other than fido.
2038	case ${target} in
2039	fido-*-elf*)
2040		;;
2041	*)
2042		tmake_file="$tmake_file m68k/t-mlibs"
2043		;;
2044	esac
2045	;;
2046m68010-*-netbsdelf* | m68k-*-netbsdelf* | m5407-*-netbsdelf*)
2047	default_m68k_cpu=68020
2048	case ${target} in
2049	m5407*)
2050		with_arch=${with_arch:-cf}
2051		target_cpu_default="mcf5475"
2052#	        target="`echo ${target} | sed 's/m68kcf/m68k/'`"
2053		;;
2054	m68010*)
2055		target_cpu_default="m68010"
2056		tmake_file="${tmake_file} m68k/t-m68kelf m68k/t-m68010-netbsd"
2057		default_m68k_cpu=68010
2058		tmake_file="${tmake_file} m68k/t-floatlib"
2059		;;
2060	*)
2061		with_arch=${with_arch:-m68k}
2062		tmake_file="${tmake_file} m68k/t-floatlib"
2063		;;
2064	esac
2065	default_cf_cpu=5475
2066	tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
2067	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2068	tm_defines="${tm_defines} MOTOROLA=1 CHAR_FAST8=1 SHORT_FAST16=1"
2069	;;
2070m68k*-*-openbsd*)
2071	default_m68k_cpu=68020
2072	default_cf_cpu=5475
2073	# needed to unconfuse gdb
2074	tm_defines="${tm_defines} OBSD_OLD_GAS"
2075	tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
2076	extra_options="${extra_options} openbsd.opt"
2077	tmake_file="t-openbsd m68k/t-openbsd"
2078	# we need collect2 until our bug is fixed...
2079	use_collect2=yes
2080	;;
2081m68k-*-uclinux*)		# Motorola m68k/ColdFire running uClinux
2082				# with uClibc, using the new GNU/Linux-style
2083				# ABI.
2084	default_m68k_cpu=68020
2085	default_cf_cpu=5206
2086	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"
2087	extra_options="${extra_options} m68k/uclinux.opt"
2088 	tm_defines="${tm_defines} MOTOROLA=1"
2089	tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
2090	;;
2091m68k-*-linux*)			# Motorola m68k's running GNU/Linux
2092				# with ELF format using glibc 2
2093				# aka the GNU/Linux C library 6.
2094	default_m68k_cpu=68020
2095	default_cf_cpu=5475
2096	with_arch=${with_arch:-m68k}
2097	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
2098	extra_options="${extra_options} m68k/ieee.opt"
2099	tm_defines="${tm_defines} MOTOROLA=1"
2100	tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
2101	;;
2102m68k-*-rtems*)
2103	default_m68k_cpu=68020
2104	default_cf_cpu=5206
2105	tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
2106	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"
2107	tm_defines="${tm_defines} MOTOROLA=1"
2108	;;
2109mcore-*-elf)
2110	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
2111	tmake_file=mcore/t-mcore
2112	inhibit_libc=true
2113	;;
2114microblaze*-linux*)
2115	case $target in
2116		microblazeel-*)
2117			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2118			;;
2119		microblaze-*)
2120			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2121			;;
2122	esac
2123	tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
2124	tm_file="${tm_file} glibc-stdint.h"
2125	c_target_objs="${c_target_objs} microblaze-c.o"
2126	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2127	tmake_file="${tmake_file} microblaze/t-microblaze"
2128	tmake_file="${tmake_file} microblaze/t-microblaze-linux"
2129	;;
2130microblaze*-*-rtems*)
2131	case $target in
2132		microblazeel-*)
2133			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2134			;;
2135		microblaze-*)
2136			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2137			;;
2138	esac
2139	tm_file="${tm_file} dbxelf.h"
2140	tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
2141	c_target_objs="${c_target_objs} microblaze-c.o"
2142	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2143	tmake_file="${tmake_file} microblaze/t-microblaze"
2144	tmake_file="${tmake_file} microblaze/t-rtems"
2145        ;;
2146microblaze*-*-elf)
2147	case $target in
2148		microblazeel-*)
2149			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2150			;;
2151		microblaze-*)
2152			tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2153			;;
2154	esac
2155	tm_file="${tm_file} dbxelf.h newlib-stdint.h"
2156	c_target_objs="${c_target_objs} microblaze-c.o"
2157	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2158	tmake_file="${tmake_file} microblaze/t-microblaze"
2159        ;;
2160riscv*-*-linux*)
2161	tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
2162	case "x${enable_multilib}" in
2163	xno) ;;
2164	xyes) tmake_file="${tmake_file} riscv/t-linux-multilib" ;;
2165	*) echo "Unknown value for enable_multilib"; exit 1
2166	esac
2167	tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
2168	gnu_ld=yes
2169	gas=yes
2170	# Force .init_array support.  The configure script cannot always
2171	# automatically detect that GAS supports it, yet we require it.
2172	gcc_cv_initfini_array=yes
2173	;;
2174riscv*-*-elf* | riscv*-*-rtems*)
2175	tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
2176	case ${target} in
2177	*-*-rtems*)
2178	  tm_file="${tm_file} rtems.h riscv/rtems.h"
2179	  tmake_file="${tmake_file} riscv/t-rtems"
2180	  ;;
2181	*)
2182	  case "x${enable_multilib}" in
2183	  xno) ;;
2184	  xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
2185	  *) echo "Unknown value for enable_multilib"; exit 1
2186	  esac
2187	esac
2188	tmake_file="${tmake_file} riscv/t-riscv"
2189	gnu_ld=yes
2190	gas=yes
2191	# Force .init_array support.  The configure script cannot always
2192	# automatically detect that GAS supports it, yet we require it.
2193	gcc_cv_initfini_array=yes
2194	;;
2195riscv*-*-freebsd*)
2196	tm_file="${tm_file} elfos.h ${fbsd_tm_file} riscv/freebsd.h"
2197	tmake_file="${tmake_file} riscv/t-riscv"
2198	gnu_ld=yes
2199	gas=yes
2200	# Force .init_array support.  The configure script cannot always
2201	# automatically detect that GAS supports it, yet we require it.
2202	gcc_cv_initfini_array=yes
2203	;;
2204riscv*-*-netbsd*)			# NetBSD RISC-V
2205	tm_file="elfos.h ${tm_file} ${nbsd_tm_file} riscv/netbsd.h"
2206	tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
2207	case ${target} in
2208	  riscv32*) tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=0" ;;
2209	  *) tmake_file="${tmake_file} riscv/t-netbsd64" ;;
2210	esac
2211	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2212	tmake_file="${tmake_file} riscv/t-riscv"
2213	gnu_ld=yes
2214	gas=yes
2215	gcc_cv_initfini_array=yes
2216	;;
2217mips64*-*-netbsd*)			# NetBSD/mips64, either endian.
2218	target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI"
2219	tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h"
2220	tmake_file="${tmake_file} mips/t-netbsd64"
2221	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
2222	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2223	;;
2224mips*-*-netbsd*)			# NetBSD/mips, either endian.
2225	target_cpu_default="MASK_ABICALLS"
2226	tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h"
2227	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2228	;;
2229mips*-img-linux*)
2230	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"
2231	extra_options="${extra_options} linux-android.opt"
2232	tmake_file="${tmake_file} mips/t-img-linux"
2233	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
2234	with_arch_32="mips32r6"
2235	with_arch_64="mips64r6"
2236	gnu_ld=yes
2237	gas=yes
2238	;;
2239mips*-mti-linux*)
2240	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"
2241	extra_options="${extra_options} linux-android.opt"
2242	tmake_file="${tmake_file} mips/t-mti-linux"
2243	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2244	with_arch_32="mips32r2"
2245	with_arch_64="mips64r2"
2246	gnu_ld=yes
2247	gas=yes
2248	;;
2249mips*-*-linux*)				# Linux MIPS, either endian.
2250	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"
2251	extra_options="${extra_options} linux-android.opt"
2252	case ${target} in
2253		mipsisa32r6*)
2254			default_mips_arch=mips32r6
2255			;;
2256		mipsisa32r2*)
2257			default_mips_arch=mips32r2
2258			;;
2259		mipsisa32*)
2260			default_mips_arch=mips32
2261			;;
2262		mips64el-st-linux-gnu)
2263			default_mips_abi=n32
2264			tm_file="${tm_file} mips/st.h"
2265			tmake_file="${tmake_file} mips/t-st"
2266			enable_mips_multilibs="yes"
2267			;;
2268		mips64octeon*-*-linux*)
2269			default_mips_abi=n32
2270			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
2271			target_cpu_default=MASK_SOFT_FLOAT_ABI
2272			enable_mips_multilibs="yes"
2273			;;
2274		mipsisa64r6*-*-linux*)
2275			default_mips_abi=n32
2276			default_mips_arch=mips64r6
2277			enable_mips_multilibs="yes"
2278			;;
2279		mipsisa64r2*-*-linux*)
2280			default_mips_abi=n32
2281			default_mips_arch=mips64r2
2282			enable_mips_multilibs="yes"
2283			;;
2284		mips64*-*-linux* | mipsisa64*-*-linux*)
2285			default_mips_abi=n32
2286			enable_mips_multilibs="yes"
2287			;;
2288	esac
2289	if test x$enable_targets = xall; then
2290		enable_mips_multilibs="yes"
2291	fi
2292	if test x$enable_mips_multilibs = xyes; then
2293		tmake_file="${tmake_file} mips/t-linux64"
2294	fi
2295	;;
2296mips*-mti-elf*)
2297	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2298	tmake_file="mips/t-mti-elf"
2299	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2300	with_arch_32="mips32r2"
2301	with_arch_64="mips64r2"
2302	;;
2303mips*-img-elf*)
2304	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2305	tmake_file="mips/t-img-elf"
2306	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
2307	with_arch_32="mips32r6"
2308	with_arch_64="mips64r6"
2309	;;
2310mips*-sde-elf*)
2311	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
2312	tmake_file="mips/t-sde"
2313	extra_options="${extra_options} mips/sde.opt"
2314	case "${with_newlib}" in
2315	  yes)
2316	    # newlib / libgloss.
2317	    ;;
2318	  *)
2319	    # MIPS toolkit libraries.
2320	    tm_file="$tm_file mips/sdemtk.h"
2321	    tmake_file="$tmake_file mips/t-sdemtk"
2322	    case ${enable_threads} in
2323	      "" | yes | mipssde)
2324		thread_file='mipssde'
2325		;;
2326	    esac
2327	    ;;
2328	esac
2329	case ${target} in
2330	  mipsisa32r6*)
2331	    tm_defines="MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
2332	    ;;
2333	  mipsisa32r2*)
2334	    tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2335	    ;;
2336	  mipsisa32*)
2337	    tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2338	    ;;
2339	  mipsisa64r6*)
2340	    tm_defines="MIPS_ISA_DEFAULT=69 MIPS_ABI_DEFAULT=ABI_N32"
2341	    ;;
2342	  mipsisa64r2*)
2343	    tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2344	    ;;
2345	  mipsisa64*)
2346	    tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2347	    ;;
2348	esac
2349	;;
2350mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2351mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
2352mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
2353mipsisa64-*-elf* | mipsisa64el-*-elf* | \
2354mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
2355mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
2356	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2357	tmake_file="mips/t-isa3264"
2358	case ${target} in
2359	  mipsisa32r6*)
2360	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37"
2361	    ;;
2362	  mipsisa32r2*)
2363	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2364	    ;;
2365	  mipsisa32*)
2366	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2367	    ;;
2368	  mipsisa64r6*)
2369	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=69"
2370	    ;;
2371	  mipsisa64r2*)
2372	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2373	    ;;
2374	  mipsisa64*)
2375	    tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2376	    ;;
2377	esac
2378	case ${target} in
2379	  mipsisa32*-*-elfoabi*)
2380	    tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2381	    tm_file="${tm_file} mips/elfoabi.h"
2382	    ;;
2383	  mipsisa64*-*-elfoabi*)
2384	    tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2385	    tm_file="${tm_file} mips/elfoabi.h"
2386	    ;;
2387	  *-*-elf*)
2388	    tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2389	    ;;
2390	esac
2391	;;
2392mipsisa64sr71k-*-elf*)
2393        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2394        tmake_file=mips/t-sr71k
2395	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2396        ;;
2397mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
2398	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2399	tmake_file="mips/t-elf mips/t-sb1"
2400	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
2401	;;
2402mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
2403	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2404	tmake_file="mips/t-elf"
2405	;;
2406mips64r5900-*-elf* | mips64r5900el-*-elf*)
2407	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
2408	tmake_file="mips/t-elf"
2409	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2410	;;
2411mips64-*-elf* | mips64el-*-elf*)
2412	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2413	tmake_file="mips/t-elf"
2414	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2415	;;
2416mips64vr-*-elf* | mips64vrel-*-elf*)
2417        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2418        tmake_file=mips/t-vr
2419	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2420        ;;
2421mips64orion-*-elf* | mips64orionel-*-elf*)
2422	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
2423	tmake_file="mips/t-elf"
2424	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2425	;;
2426mips*-*-rtems*)
2427	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
2428	tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
2429	;;
2430mips-wrs-vxworks)
2431	tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
2432	tmake_file="${tmake_file} mips/t-vxworks"
2433	;;
2434mipstx39-*-elf* | mipstx39el-*-elf*)
2435	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
2436	tmake_file="mips/t-r3900"
2437	;;
2438mmix-knuth-mmixware)
2439	tm_file="${tm_file} newlib-stdint.h"
2440	use_gcc_stdint=wrap
2441	;;
2442mn10300-*-*)
2443	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2444	if test x$stabs = xyes
2445	then
2446		tm_file="${tm_file} dbx.h"
2447	fi
2448	use_collect2=no
2449	use_gcc_stdint=wrap
2450	;;
2451msp430*-*-*)
2452	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2453	c_target_objs="msp430-c.o"
2454	cxx_target_objs="msp430-c.o"
2455	tmake_file="${tmake_file} msp430/t-msp430"
2456	extra_gcc_objs="driver-msp430.o"
2457	;;
2458nds32le-*-*)
2459	target_cpu_default="0"
2460	tm_defines="${tm_defines}"
2461	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/nds32_intrinsic.h"
2462	tmake_file="nds32/t-nds32 nds32/t-mlibs"
2463	;;
2464nds32be-*-*)
2465	target_cpu_default="0|MASK_BIG_ENDIAN"
2466	tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2467	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/nds32_intrinsic.h"
2468	tmake_file="nds32/t-nds32 nds32/t-mlibs"
2469	;;
2470nios2-*-*)
2471	tm_file="elfos.h ${tm_file}"
2472        tmake_file="${tmake_file} nios2/t-nios2"
2473        case ${target} in
2474        nios2-*-linux*)
2475                tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2476                ;;
2477	nios2-*-elf*)
2478		tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2479		extra_options="${extra_options} nios2/elf.opt"
2480		;;
2481	nios2-*-rtems*)
2482		tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2483		tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2484		;;
2485        esac
2486	;;
2487nvptx-*)
2488	tm_file="${tm_file} newlib-stdint.h"
2489	use_gcc_stdint=wrap
2490	tmake_file="nvptx/t-nvptx"
2491	if test x$enable_as_accelerator = xyes; then
2492		extra_programs="${extra_programs} mkoffload\$(exeext)"
2493		tm_file="${tm_file} nvptx/offload.h"
2494	fi
2495	;;
2496pdp11-*-*)
2497	tm_file="${tm_file} newlib-stdint.h"
2498	use_gcc_stdint=wrap
2499	;;
2500# port not yet contributed
2501#powerpc-*-openbsd*)
2502#	tmake_file="${tmake_file} rs6000/t-fprules"
2503#	extra_headers=
2504#	;;
2505powerpc-*-darwin*)
2506	extra_options="${extra_options} ${cpu_type}/darwin.opt"
2507	case ${target} in
2508	  *-darwin1[0-9]* | *-darwin9*)
2509	    tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2510	    tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2511	    ;;
2512	  *-darwin8*)
2513	    tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2514	    tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2515	    tm_file="${tm_file} ${cpu_type}/darwin8.h"
2516	    ;;
2517	  *-darwin7*)
2518	    tm_file="${tm_file} ${cpu_type}/darwin7.h"
2519	    ;;
2520	  *-darwin[456]*)
2521	    # Earlier - ingle arch, with 32b only
2522	    # OS X 10.0, the first edition is Darwin4
2523	    ;;
2524	esac
2525	tmake_file="${tmake_file} t-slibgcc"
2526	extra_headers=altivec.h
2527	;;
2528powerpc64-*-darwin*)
2529	extra_options="${extra_options} ${cpu_type}/darwin.opt"
2530	tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
2531	tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
2532	extra_headers=altivec.h
2533	;;
2534powerpc*-*-freebsd*)
2535	tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
2536	extra_options="${extra_options} rs6000/sysv4.opt"
2537	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2538	case ${target} in
2539	     powerpc64*)
2540	    	tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2541		tmake_file="${tmake_file} rs6000/t-freebsd64"
2542		extra_options="${extra_options} rs6000/linux64.opt"
2543		;;
2544	     *)
2545	        tm_file="${tm_file} rs6000/freebsd.h"
2546		;;
2547	esac
2548	;;
2549powerpc*-*-netbsd*)
2550	tm_file="${tm_file} ${nbsd_tm_file} dbxelf.h elfos.h freebsd-spec.h"
2551	case ${target} in
2552	    powerpc64*)
2553		tm_file="rs6000/biarch64.h ${tm_file}"
2554		tm_file="${tm_file} rs6000/sysv4.h rs6000/default64.h rs6000/netbsd64.h"
2555		tmake_file="${tmake_file} rs6000/t-netbsd64"
2556		;;
2557	    *)
2558		tm_file="${tm_file} rs6000/sysv4.h rs6000/netbsd.h"
2559		tmake_file="${tmake_file} rs6000/t-netbsd"
2560		;;
2561	esac
2562	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2563	extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2564	if test x${enable_secureplt} != xno; then
2565	    tm_file="rs6000/secureplt.h ${tm_file}"
2566	fi
2567	;;
2568powerpc-*-eabispe*)
2569	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h ${cpu_type}/sysv4.h ${cpu_type}/eabi.h ${cpu_type}/e500.h ${cpu_type}/eabispe.h"
2570	extra_options="${extra_options} ${cpu_type}/sysv4.opt"
2571	tmake_file="${cpu_type}/t-spe ${cpu_type}/t-ppccomm"
2572	use_gcc_stdint=wrap
2573	;;
2574powerpc-*-eabisimaltivec*)
2575	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
2576	extra_options="${extra_options} rs6000/sysv4.opt"
2577	tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2578	use_gcc_stdint=wrap
2579	;;
2580powerpc-*-eabisim*)
2581	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
2582	extra_options="${extra_options} rs6000/sysv4.opt"
2583	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2584	use_gcc_stdint=wrap
2585	;;
2586powerpc-*-elf*)
2587	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2588	extra_options="${extra_options} rs6000/sysv4.opt"
2589	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2590	;;
2591powerpc-*-eabialtivec*)
2592	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
2593	extra_options="${extra_options} rs6000/sysv4.opt"
2594	tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2595	use_gcc_stdint=wrap
2596	;;
2597powerpc-xilinx-eabi*)
2598	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h"
2599	extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
2600	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2601	use_gcc_stdint=wrap
2602	;;
2603powerpc-*-eabi*)
2604	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
2605	extra_options="${extra_options} rs6000/sysv4.opt"
2606	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2607	use_gcc_stdint=wrap
2608	;;
2609powerpc-*-rtems*spe*)
2610	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h powerpcspe/sysv4.h powerpcspe/eabi.h powerpcspe/e500.h powerpcspe/rtems.h rtems.h"
2611	extra_options="${extra_options} powerpcspe/sysv4.opt"
2612	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-rtems powerpcspe/t-ppccomm"
2613	;;
2614powerpc-*-rtems*)
2615	tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
2616	extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
2617	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2618	;;
2619powerpc*-*-linux*spe*)
2620	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h powerpcspe/sysv4.h"
2621	extra_options="${extra_options} powerpcspe/sysv4.opt"
2622	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-ppccomm"
2623	extra_objs="$extra_objs powerpcspe-linux.o"
2624	maybe_biarch=
2625	tm_file="${tm_file} powerpcspe/linux.h glibc-stdint.h"
2626	tmake_file="${tmake_file} powerpcspe/t-ppcos powerpcspe/t-linux"
2627	tm_file="${tm_file} powerpcspe/linuxspe.h powerpcspe/e500.h"
2628	;;
2629powerpc*-*-linux*)
2630	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
2631	extra_options="${extra_options} rs6000/sysv4.opt"
2632	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
2633	extra_objs="$extra_objs rs6000-linux.o"
2634	case ${target} in
2635	    powerpc*le-*-*)
2636		tm_file="${tm_file} rs6000/sysv4le.h" ;;
2637	esac
2638	case ${target}:${with_cpu} in
2639	    powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
2640	esac
2641	maybe_biarch=${cpu_is_64bit}
2642	case ${enable_targets} in
2643	    *powerpc64*) maybe_biarch=yes ;;
2644	    all) maybe_biarch=yes ;;
2645	esac
2646	case ${target} in
2647	    powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
2648		echo "*** Configuration ${target} not supported" 1>&2
2649		exit 1
2650		;;
2651	    powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
2652		maybe_biarch=
2653		;;
2654	esac
2655	case ${target}:${enable_targets}:${maybe_biarch} in
2656	    powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
2657	    | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
2658	    | powerpcle-*:*powerpc64le*:yes)
2659		if test x$cpu_is_64bit = xyes; then
2660		    tm_file="${tm_file} rs6000/default64.h"
2661		fi
2662		tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2663		tmake_file="$tmake_file rs6000/t-linux64"
2664		case ${target} in
2665		    powerpc*le-*-*)
2666			tmake_file="$tmake_file rs6000/t-linux64le"
2667			case ${enable_targets} in
2668			    all | *powerpc64-* | *powerpc-*)
2669				tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2670			esac ;;
2671		    *)
2672			case ${enable_targets} in
2673			    all | *powerpc64le-* | *powerpcle-*)
2674				tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2675			esac ;;
2676		esac
2677		extra_options="${extra_options} rs6000/linux64.opt"
2678		;;
2679	    powerpc64*)
2680		tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
2681		extra_options="${extra_options} rs6000/linux64.opt"
2682		tmake_file="${tmake_file} rs6000/t-linux"
2683		;;
2684	    *)
2685		tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2686		tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
2687		;;
2688	esac
2689	case ${target} in
2690	    powerpc*-*-linux*ppc476*)
2691		tm_file="${tm_file} rs6000/476.h"
2692		extra_options="${extra_options} rs6000/476.opt" ;;
2693	    powerpc*-*-linux*altivec*)
2694		tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2695	    powerpc*-*-linux*spe*)
2696		tm_file="${tm_file} ${cpu_type}/linuxspe.h ${cpu_type}/e500.h" ;;
2697	    powerpc*-*-linux*paired*)
2698		tm_file="${tm_file} rs6000/750cl.h" ;;
2699	esac
2700	case ${target} in
2701	    *-linux*-musl*)
2702		enable_secureplt=yes ;;
2703	esac
2704	if test x${enable_secureplt} = xyes; then
2705		tm_file="rs6000/secureplt.h ${tm_file}"
2706	fi
2707	;;
2708powerpc-wrs-vxworks*spe)
2709	tm_file="${tm_file} elfos.h freebsd-spec.h powerpcspe/sysv4.h"
2710	tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-ppccomm powerpcspe/t-vxworks"
2711	extra_options="${extra_options} powerpcspe/sysv4.opt"
2712	extra_headers=ppc-asm.h
2713	tm_file="${tm_file} vx-common.h vxworks.h powerpcspe/vxworks.h powerpcspe/e500.h"
2714	;;
2715powerpc-wrs-vxworks*)
2716	tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2717	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
2718	extra_options="${extra_options} rs6000/sysv4.opt"
2719	extra_headers=ppc-asm.h
2720	case ${target} in
2721          *-vxworksmils*)
2722            tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
2723            tmake_file="${tmake_file} rs6000/t-vxworksmils"
2724            ;;
2725	  *-vxworksae*)
2726	    tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
2727	    tmake_file="${tmake_file} rs6000/t-vxworksae"
2728	    ;;
2729	  *-vxworks*)
2730	    tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
2731	    ;;
2732	esac
2733	;;
2734powerpc-*-lynxos*)
2735	xm_defines=POSIX
2736	tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2737	tmake_file="t-lynx rs6000/t-lynx"
2738	extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2739	thread_file=lynx
2740	gnu_ld=yes
2741	gas=yes
2742	;;
2743powerpcle-*-elf*)
2744	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2745	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2746	extra_options="${extra_options} rs6000/sysv4.opt"
2747	;;
2748powerpcle-*-eabisim*)
2749	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
2750	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2751	extra_options="${extra_options} rs6000/sysv4.opt"
2752	use_gcc_stdint=wrap
2753	;;
2754powerpcle-*-eabi*)
2755	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
2756	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2757	extra_options="${extra_options} rs6000/sysv4.opt"
2758	use_gcc_stdint=wrap
2759	;;
2760rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2761	tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2762	tmake_file="rs6000/t-aix43 t-slibgcc"
2763	extra_options="${extra_options} rs6000/aix64.opt"
2764	use_collect2=yes
2765	thread_file='aix'
2766	use_gcc_stdint=provide
2767	extra_headers=
2768	;;
2769rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2770	tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2771	extra_options="${extra_options} rs6000/aix64.opt"
2772	tmake_file="rs6000/t-aix43 t-slibgcc"
2773	use_collect2=yes
2774	thread_file='aix'
2775	use_gcc_stdint=wrap
2776	extra_headers=
2777	;;
2778rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2779	tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2780	tmake_file="rs6000/t-aix52 t-slibgcc"
2781	extra_options="${extra_options} rs6000/aix64.opt"
2782	use_collect2=yes
2783	thread_file='aix'
2784	use_gcc_stdint=wrap
2785	extra_headers=
2786	;;
2787rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2788	tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2789	tmake_file="rs6000/t-aix52 t-slibgcc"
2790	extra_options="${extra_options} rs6000/aix64.opt"
2791	use_collect2=yes
2792	thread_file='aix'
2793	use_gcc_stdint=wrap
2794	extra_headers=altivec.h
2795	;;
2796rs6000-ibm-aix6.* | powerpc-ibm-aix6.*)
2797	tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2798	tmake_file="rs6000/t-aix52 t-slibgcc"
2799	extra_options="${extra_options} rs6000/aix64.opt"
2800	use_collect2=yes
2801	thread_file='aix'
2802	use_gcc_stdint=wrap
2803	extra_headers=altivec.h
2804	default_use_cxa_atexit=yes
2805	;;
2806rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
2807	tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
2808	tmake_file="rs6000/t-aix52 t-slibgcc"
2809	extra_options="${extra_options} rs6000/aix64.opt"
2810	use_collect2=yes
2811	thread_file='aix'
2812	use_gcc_stdint=wrap
2813	extra_headers="altivec.h amo.h"
2814	default_use_cxa_atexit=yes
2815	;;
2816rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
2817	tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
2818	tmake_file="rs6000/t-aix52 t-slibgcc"
2819	extra_options="${extra_options} rs6000/aix64.opt"
2820	use_collect2=yes
2821	thread_file='aix'
2822	use_gcc_stdint=wrap
2823	extra_headers="altivec.h amo.h"
2824	default_use_cxa_atexit=yes
2825	;;
2826rl78-*-elf*)
2827	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2828	target_has_targetm_common=no
2829	c_target_objs="rl78-c.o"
2830	cxx_target_objs="rl78-c.o"
2831	tmake_file="${tmake_file} rl78/t-rl78"
2832	;;
2833rx-*-elf*)
2834	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2835	tmake_file="${tmake_file} rx/t-rx"
2836	;;
2837s390-*-linux*)
2838	tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2839	c_target_objs="${c_target_objs} s390-c.o"
2840	cxx_target_objs="${cxx_target_objs} s390-c.o"
2841	if test x$enable_targets = xall; then
2842		tmake_file="${tmake_file} s390/t-linux64"
2843	fi
2844	tmake_file="${tmake_file} s390/t-s390"
2845	;;
2846s390x-*-linux*)
2847	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2848	tm_p_file="linux-protos.h s390/s390-protos.h"
2849	c_target_objs="${c_target_objs} s390-c.o"
2850	cxx_target_objs="${cxx_target_objs} s390-c.o"
2851	md_file=s390/s390.md
2852	extra_modes=s390/s390-modes.def
2853	out_file=s390/s390.c
2854	tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
2855	;;
2856s390x-ibm-tpf*)
2857	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2858	tm_p_file=s390/s390-protos.h
2859	c_target_objs="${c_target_objs} s390-c.o"
2860	cxx_target_objs="${cxx_target_objs} s390-c.o"
2861	md_file=s390/s390.md
2862	extra_modes=s390/s390-modes.def
2863	out_file=s390/s390.c
2864	thread_file='tpf'
2865	extra_options="${extra_options} s390/tpf.opt"
2866	tmake_file="${tmake_file} s390/t-s390"
2867	;;
2868sh-*-elf* | sh[12346l]*-*-elf* | \
2869  sh-*-linux* | sh[2346lbe]*-*-linux* | \
2870  sh-*-netbsdelf* | shl*-*-netbsdelf*)
2871	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2872	if test x${with_endian} = x; then
2873		case ${target} in
2874		sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2875		shbe-*-* | sheb-*-*)		   with_endian=big,little ;;
2876		sh[1234]l* | sh[34]*-*-linux*)	   with_endian=little ;;
2877		shl* | sh*-*-linux* | \
2878		  sh-superh-elf)		   with_endian=little,big ;;
2879		sh[1234]*-*-*)			   with_endian=big ;;
2880		*)				   with_endian=big,little ;;
2881		esac
2882	fi
2883	# TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2884	#  First word : the default endian.
2885	#  Second word: the secondary endian (optional).
2886	case ${with_endian} in
2887	big)		TM_ENDIAN_CONFIG=mb ;;
2888	little)		TM_ENDIAN_CONFIG=ml ;;
2889	big,little)	TM_ENDIAN_CONFIG="mb ml" ;;
2890	little,big)	TM_ENDIAN_CONFIG="ml mb" ;;
2891	*)	echo "with_endian=${with_endian} not supported."; exit 1 ;;
2892	esac
2893	case ${with_endian} in
2894	little*)	tm_file="sh/little.h ${tm_file}" ;;
2895	esac
2896	tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2897	case ${target} in
2898	sh*-*-linux*)	tmake_file="${tmake_file} sh/t-linux"
2899			if test x$enable_fdpic = xyes; then
2900				tm_defines="$tm_defines FDPIC_DEFAULT=1"
2901			fi
2902			tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2903	sh*-*-netbsd*)
2904			tm_file="${tm_file} ${nbsd_tm_file} sh/netbsd-elf.h"
2905			extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2906
2907			;;
2908	sh*-superh-elf)	if test x$with_libgloss != xno; then
2909                                with_libgloss=yes
2910                                tm_file="${tm_file} sh/newlib.h"
2911                        fi
2912			tm_file="${tm_file} sh/embed-elf.h"
2913			tm_file="${tm_file} sh/superh.h"
2914			extra_options="${extra_options} sh/superh.opt" ;;
2915	*)		if test x$with_newlib = xyes \
2916			   && test x$with_libgloss = xyes; then
2917				tm_file="${tm_file} sh/newlib.h"
2918			fi
2919			tm_file="${tm_file} sh/embed-elf.h" ;;
2920	esac
2921	case ${target} in
2922	*-*-netbsd)
2923		;;
2924	*-*-elf*)
2925		tm_file="${tm_file} newlib-stdint.h"
2926		;;
2927	esac
2928	# sed el/eb endian suffixes away to avoid confusion with sh[23]e
2929	case `echo ${target} | sed 's/e[lb]-/-/'` in
2930	sh4a_single_only*)	sh_cpu_target=sh4a-single-only ;;
2931	sh4a_single*)		sh_cpu_target=sh4a-single ;;
2932	sh4a_nofpu*)		sh_cpu_target=sh4a-nofpu ;;
2933	sh4al)			sh_cpu_target=sh4al ;;
2934	sh4a*)			sh_cpu_target=sh4a ;;
2935	sh4_single_only*)	sh_cpu_target=sh4-single-only ;;
2936	sh4_single*)		sh_cpu_target=sh4-single ;;
2937	sh4_nofpu*)		sh_cpu_target=sh4-nofpu ;;
2938	sh4* | sh-superh-*)	sh_cpu_target=sh4 ;;
2939	sh3e*)			sh_cpu_target=sh3e ;;
2940	sh*-*-netbsd* | sh3*)	sh_cpu_target=sh3 ;;
2941	sh2a_single_only*)	sh_cpu_target=sh2a-single-only ;;
2942	sh2a_single*)		sh_cpu_target=sh2a-single ;;
2943	sh2a_nofpu*)		sh_cpu_target=sh2a-nofpu ;;
2944	sh2a*)			sh_cpu_target=sh2a ;;
2945	sh2e*)			sh_cpu_target=sh2e ;;
2946	sh2*)			sh_cpu_target=sh2 ;;
2947	*)			sh_cpu_target=sh1 ;;
2948	esac
2949	# did the user say --without-fp ?
2950	if test x$with_fp = xno; then
2951		case ${sh_cpu_target} in
2952		sh4al | sh1)	;;
2953		sh4a* )		sh_cpu_target=sh4a-nofpu ;;
2954		sh4*)		sh_cpu_target=sh4-nofpu ;;
2955		sh3*)		sh_cpu_target=sh3 ;;
2956		sh2a*)		sh_cpu_target=sh2a-nofpu ;;
2957		sh2*)		sh_cpu_target=sh2 ;;
2958		*)	echo --without-fp not available for $target: ignored
2959		esac
2960		tm_defines="$tm_defines STRICT_NOFPU=1"
2961	fi
2962	sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2963	case $sh_cpu_default in
2964	  sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2965	  sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2966	  sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2967	  sh3e | sh3 | sh2e | sh2 | sh1) ;;
2968	"")	sh_cpu_default=${sh_cpu_target} ;;
2969	*)	echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2970	esac
2971	sh_multilibs=${with_multilib_list}
2972	if test "$sh_multilibs" = "default" ; then
2973		case ${target} in
2974		sh[1234]*)	sh_multilibs=${sh_cpu_target} ;;
2975		sh-superh-*)	sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2976		sh*-*-linux*)	sh_multilibs=m1,m2,m2a,m3e,m4 ;;
2977		sh*-*-netbsd*)	sh_multilibs=m3,m3e,m4 ;;
2978		*) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2979		esac
2980		if test x$with_fp = xno; then
2981			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`"
2982		fi
2983	fi
2984	target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2985	tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2986	tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2987	sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2988	for sh_multilib in ${sh_multilibs}; do
2989		case ${sh_multilib} in
2990		m1 | m2 | m2e | m3 | m3e | \
2991		m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2992		m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2993		m2a | m2a-single | m2a-single-only | m2a-nofpu)
2994			# TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2995			# It is passed to MULTIILIB_OPTIONS verbatim.
2996			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2997			tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2998			;;
2999		\!*)	# TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
3000			# It is passed the MULTILIB_EXCEPTIONS verbatim.
3001			TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
3002		*)
3003			echo "with_multilib_list=${sh_multilib} not supported."
3004			exit 1
3005			;;
3006		esac
3007	done
3008	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
3009	if test x${enable_incomplete_targets} = xyes ; then
3010		tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
3011	fi
3012	tm_file="$tm_file ./sysroot-suffix.h"
3013	tmake_file="$tmake_file t-sysroot-suffix"
3014	;;
3015sh-*-rtems*)
3016	tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
3017	tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
3018	;;
3019sh-wrs-vxworks)
3020	tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
3021	tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
3022	;;
3023sparc-*-elf*)
3024	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
3025	case ${target} in
3026	    *-leon-*)
3027		tmake_file="sparc/t-sparc sparc/t-leon"
3028		;;
3029	    *-leon[3-9]*)
3030		tmake_file="sparc/t-sparc sparc/t-leon3"
3031		;;
3032	    *)
3033		tmake_file="sparc/t-sparc sparc/t-elf"
3034		;;
3035	esac
3036	;;
3037sparc-*-rtems*)
3038	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
3039	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
3040	;;
3041sparc-*-linux*)
3042	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
3043	extra_options="${extra_options} sparc/long-double-switch.opt"
3044	case ${target} in
3045	    *-leon-*)
3046		tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
3047		;;
3048	    *-leon[3-9]*)
3049		tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
3050		;;
3051	    *)
3052		tmake_file="${tmake_file} sparc/t-sparc"
3053		;;
3054	esac
3055	if test x$enable_targets = xall; then
3056		tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
3057		tmake_file="${tmake_file} sparc/t-linux64"
3058	else
3059		tm_file="${tm_file} sparc/linux.h"
3060		tmake_file="${tmake_file} sparc/t-linux"
3061	fi
3062	;;
3063sparc-*-netbsdelf*)
3064	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3065	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3066	extra_options="${extra_options} sparc/long-double-switch.opt"
3067	tmake_file="${tmake_file} sparc/t-sparc"
3068	;;
3069sparc*-*-solaris2*)
3070	tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
3071	case ${target} in
3072	    sparc64-*-* | sparcv9-*-*)
3073		tm_file="sparc/default64.h ${tm_file}"
3074		;;
3075	    *)
3076		test x$with_cpu != x || with_cpu=v9
3077		;;
3078	esac
3079	tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
3080	;;
3081sparc-wrs-vxworks)
3082	tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
3083	tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
3084	;;
3085sparc64-*-elf*)
3086	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
3087	extra_options="${extra_options}"
3088	tmake_file="${tmake_file} sparc/t-sparc"
3089	;;
3090sparc64-*-rtems*)
3091	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
3092	extra_options="${extra_options}"
3093	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
3094	;;
3095sparc64-*-linux*)
3096	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"
3097	extra_options="${extra_options} sparc/long-double-switch.opt"
3098	tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
3099	;;
3100sparc64-*-freebsd*|ultrasparc-*-freebsd*)
3101	tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
3102	extra_options="${extra_options} sparc/long-double-switch.opt"
3103	case "x$with_cpu" in
3104		xultrasparc) ;;
3105		x) with_cpu=ultrasparc ;;
3106		*) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
3107	esac
3108	tmake_file="${tmake_file} sparc/t-sparc"
3109	;;
3110sparc64-*-netbsd*)
3111	tm_file="sparc/biarch64.h ${tm_file}"
3112	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
3113	tm_file="${tm_file} sparc/default64.h"
3114	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3115	extra_options="${extra_options} sparc/long-double-switch.opt"
3116	tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
3117	with_cpu=ultrasparc
3118	;;
3119sparc64-*-openbsd*)
3120	tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
3121	tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
3122	extra_options="${extra_options} openbsd.opt"
3123	extra_options="${extra_options}"
3124	gas=yes gnu_ld=yes
3125	with_cpu=ultrasparc
3126	tmake_file="${tmake_file} sparc/t-sparc"
3127	;;
3128spu-*-elf*)
3129	tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
3130	tmake_file="spu/t-spu-elf"
3131        native_system_header_dir=/include
3132	extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
3133	extra_modes=spu/spu-modes.def
3134	c_target_objs="${c_target_objs} spu-c.o"
3135	cxx_target_objs="${cxx_target_objs} spu-c.o"
3136	;;
3137tic6x-*-elf)
3138	tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
3139	tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
3140	tmake_file="c6x/t-c6x c6x/t-c6x-elf"
3141	use_collect2=no
3142	;;
3143tic6x-*-uclinux)
3144	tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
3145	tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
3146	tm_file="${tm_file} ./sysroot-suffix.h"
3147	tmake_file="t-sysroot-suffix t-slibgcc"
3148	tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
3149	use_collect2=no
3150	;;
3151tilegx*-*-linux*)
3152	tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
3153        tmake_file="${tmake_file} tilegx/t-tilegx"
3154	extra_objs="${extra_objs} mul-tables.o"
3155	c_target_objs="${c_target_objs} tilegx-c.o"
3156	cxx_target_objs="${cxx_target_objs} tilegx-c.o"
3157	extra_headers="feedback.h"
3158	case $target in
3159	tilegxbe-*)
3160		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3161 		;;
3162	esac
3163	;;
3164tilepro*-*-linux*)
3165	tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
3166        tmake_file="${tmake_file} tilepro/t-tilepro"
3167	extra_objs="${extra_objs} mul-tables.o"
3168	c_target_objs="${c_target_objs} tilepro-c.o"
3169	cxx_target_objs="${cxx_target_objs} tilepro-c.o"
3170	extra_headers="feedback.h"
3171	;;
3172v850-*-rtems*)
3173	target_cpu_default="TARGET_CPU_generic"
3174	tm_file="dbxelf.h elfos.h v850/v850.h"
3175	tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
3176	tmake_file="${tmake_file} v850/t-v850"
3177	tmake_file="${tmake_file} v850/t-rtems"
3178	use_collect2=no
3179	c_target_objs="v850-c.o"
3180	cxx_target_objs="v850-c.o"
3181	;;
3182v850*-*-*)
3183	case ${target} in
3184	v850e3v5-*-*)
3185		target_cpu_default="TARGET_CPU_v850e3v5"
3186		;;
3187	v850e2v3-*-*)
3188		target_cpu_default="TARGET_CPU_v850e2v3"
3189		;;
3190	v850e2-*-*)
3191		target_cpu_default="TARGET_CPU_v850e2"
3192		;;
3193	v850e1-*-* | v850es-*-*)
3194		target_cpu_default="TARGET_CPU_v850e1"
3195		;;
3196	v850e-*-*)
3197		target_cpu_default="TARGET_CPU_v850e"
3198		;;
3199	v850-*-*)
3200		target_cpu_default="TARGET_CPU_generic"
3201		;;
3202	esac
3203	tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
3204	if test x$stabs = xyes
3205	then
3206		tm_file="${tm_file} dbx.h"
3207	fi
3208	use_collect2=no
3209	c_target_objs="v850-c.o"
3210	cxx_target_objs="v850-c.o"
3211	use_gcc_stdint=wrap
3212	;;
3213vax-*-linux*)
3214	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
3215	extra_options="${extra_options} vax/elf.opt"
3216	;;
3217vax-*-netbsdelf*)
3218	tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h"
3219	extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
3220	tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
3221	;;
3222vax-*-openbsd*)
3223	tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-libpthread.h vax/openbsd.h"
3224	extra_options="${extra_options} openbsd.opt"
3225	use_collect2=yes
3226	;;
3227visium-*-elf*)
3228	tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
3229	tmake_file="visium/t-visium visium/t-crtstuff"
3230	;;
3231xstormy16-*-elf)
3232	# For historical reasons, the target files omit the 'x'.
3233	tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
3234	tm_p_file=stormy16/stormy16-protos.h
3235	md_file=stormy16/stormy16.md
3236	out_file=stormy16/stormy16.c
3237	extra_options=stormy16/stormy16.opt
3238	tmake_file="stormy16/t-stormy16"
3239	;;
3240xtensa*-*-elf*)
3241	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
3242	extra_options="${extra_options} xtensa/elf.opt"
3243	;;
3244xtensa*-*-linux*)
3245	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
3246	tmake_file="${tmake_file} xtensa/t-xtensa"
3247	;;
3248xtensa*-*-uclinux*)
3249	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
3250	tmake_file="${tmake_file} xtensa/t-xtensa"
3251	extra_options="${extra_options} xtensa/uclinux.opt"
3252	;;
3253am33_2.0-*-linux*)
3254	tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
3255	gas=yes gnu_ld=yes
3256	use_collect2=no
3257	;;
3258m32c-*-rtems*)
3259	tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
3260	c_target_objs="m32c-pragma.o"
3261	cxx_target_objs="m32c-pragma.o"
3262 	;;
3263m32c-*-elf*)
3264	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
3265	c_target_objs="m32c-pragma.o"
3266	cxx_target_objs="m32c-pragma.o"
3267 	;;
3268*)
3269	echo "*** Configuration ${target} not supported" 1>&2
3270	exit 1
3271	;;
3272esac
3273
3274case ${target} in
3275i[34567]86-*-linux* | x86_64-*-linux*)
3276	tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
3277	;;
3278i[34567]86-*-* | x86_64-*-*)
3279	tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
3280	;;
3281powerpc*-*-* | rs6000-*-*)
3282	tm_file="${tm_file} ${cpu_type}/option-defaults.h"
3283esac
3284
3285# non-glibc systems
3286case ${target} in
3287*-linux-musl*)
3288	tmake_file="${tmake_file} t-musl"
3289	;;
3290*-linux-uclibc*)
3291	tmake_file="${tmake_file} t-uclibc"
3292	;;
3293esac
3294
3295# Assume the existence of indirect function support and allow the use of the
3296# resolver attribute.
3297case ${target} in
3298*-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
3299        ;;
3300*-*-linux*)
3301	case ${target} in
3302	aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-*)
3303		default_gnu_indirect_function=yes
3304		;;
3305	esac
3306	;;
3307esac
3308
3309# Build mkoffload tool
3310case ${target} in
3311*-intelmic-* | *-intelmicemul-*)
3312	tmake_file="${tmake_file} i386/t-intelmic"
3313	tm_file="${tm_file} i386/intelmic-offload.h"
3314	;;
3315esac
3316
3317if [ "$target_has_targetcm" = "no" ]; then
3318  c_target_objs="$c_target_objs default-c.o"
3319  cxx_target_objs="$cxx_target_objs default-c.o"
3320fi
3321
3322if [ "$common_out_file" = "" ]; then
3323  if [ "$target_has_targetm_common" = "yes" ]; then
3324    common_out_file="$cpu_type/$cpu_type-common.c"
3325  else
3326    common_out_file="default-common.c"
3327  fi
3328fi
3329
3330# Support for --with-cpu and related options (and a few unrelated options,
3331# too).
3332case ${with_cpu} in
3333  yes | no)
3334    echo "--with-cpu must be passed a value" 1>&2
3335    exit 1
3336    ;;
3337esac
3338
3339# Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
3340# to generic if there is no processor scheduler model for the target.
3341arch=
3342cpu=
3343arch_without_sse2=no
3344arch_without_64bit=no
3345case ${target} in
3346  i386-*-freebsd*)
3347    if test $fbsd_major -ge 6; then
3348      arch=i486
3349    else
3350      arch=i386
3351    fi
3352    cpu=generic
3353    arch_without_sse2=yes
3354    arch_without_64bit=yes
3355    ;;
3356  i386-*-netbsd*)
3357    arch=i486
3358    cpu=generic
3359    arch_without_sse2=yes
3360    arch_without_64bit=yes
3361    ;;
3362  i386-*-*)
3363    arch=i386
3364    cpu=i386
3365    arch_without_sse2=yes
3366    arch_without_64bit=yes
3367    ;;
3368  i486-*-*)
3369    arch=i486
3370    cpu=i486
3371    arch_without_sse2=yes
3372    arch_without_64bit=yes
3373    ;;
3374  i586-*-*)
3375    arch_without_sse2=yes
3376    arch_without_64bit=yes
3377    case ${target_noncanonical} in
3378      k6_2-*)
3379	arch=k6-2
3380	cpu=k6-2
3381	;;
3382      k6_3-*)
3383	arch=k6-3
3384	cpu=k6-3
3385	;;
3386      k6-*)
3387	arch=k6
3388	cpu=k6
3389	;;
3390      pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
3391	arch=pentium-mmx
3392	cpu=pentium-mmx
3393	;;
3394      *)
3395	arch=pentium
3396	cpu=pentium
3397	;;
3398    esac
3399    ;;
3400  i686-*-* | i786-*-*)
3401    case ${target_noncanonical} in
3402      znver1-*)
3403	arch=znver1
3404	cpu=znver1
3405	;;
3406      bdver4-*)
3407        arch=bdver4
3408        cpu=bdver4
3409        ;;
3410      bdver3-*)
3411        arch=bdver3
3412        cpu=bdver3
3413        ;;
3414      bdver2-*)
3415        arch=bdver2
3416        cpu=bdver2
3417        ;;
3418      bdver1-*)
3419	arch=bdver1
3420	cpu=bdver1
3421	;;
3422      btver1-*)
3423	arch=btver1
3424	cpu=btver1
3425	;;
3426      btver2-*)
3427	arch=btver2
3428	cpu=btver2
3429	;;
3430      amdfam10-*|barcelona-*)
3431	arch=amdfam10
3432	cpu=amdfam10
3433	;;
3434      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3435	arch=k8-sse3
3436	cpu=k8-sse3
3437	;;
3438      k8-*|opteron-*|athlon64-*|athlon_fx-*)
3439	arch=k8
3440	cpu=k8
3441	;;
3442      athlon_xp-*|athlon_mp-*|athlon_4-*)
3443	arch=athlon-4
3444	cpu=athlon-4
3445	arch_without_sse2=yes
3446	arch_without_64bit=yes
3447	;;
3448      athlon_tbird-*|athlon-*)
3449	arch=athlon
3450	cpu=athlon
3451	arch_without_sse2=yes
3452	;;
3453      geode-*)
3454	arch=geode
3455	cpu=geode
3456	arch_without_sse2=yes
3457	;;
3458      pentium2-*)
3459	arch=pentium2
3460	cpu=pentium2
3461	arch_without_sse2=yes
3462	;;
3463      pentium3-*|pentium3m-*)
3464	arch=pentium3
3465	cpu=pentium3
3466	arch_without_sse2=yes
3467	;;
3468      pentium4-*|pentium4m-*)
3469	arch=pentium4
3470	cpu=pentium4
3471	;;
3472      prescott-*)
3473	arch=prescott
3474	cpu=prescott
3475	;;
3476      nocona-*)
3477	arch=nocona
3478	cpu=nocona
3479	;;
3480      atom-*)
3481	arch=atom
3482	cpu=atom
3483	;;
3484      slm-*)
3485	arch=slm
3486	cpu=slm
3487	;;
3488      core2-*)
3489	arch=core2
3490	cpu=core2
3491	;;
3492      corei7-*)
3493	arch=corei7
3494	cpu=corei7
3495	;;
3496      corei7_avx-*)
3497	arch=corei7-avx
3498	cpu=corei7-avx
3499	;;
3500      pentium_m-*)
3501	arch=pentium-m
3502	cpu=pentium-m
3503	;;
3504      pentiumpro-*)
3505	arch=pentiumpro
3506	cpu=pentiumpro
3507	arch_without_sse2=yes
3508	;;
3509      *)
3510	arch=pentiumpro
3511	cpu=generic
3512	arch_without_sse2=yes
3513	arch_without_64bit=yes
3514	;;
3515    esac
3516    ;;
3517  x86_64-*-*)
3518    case ${target_noncanonical} in
3519      znver1-*)
3520	arch=znver1
3521	cpu=znver1
3522	;;
3523      bdver4-*)
3524        arch=bdver4
3525        cpu=bdver4
3526        ;;
3527      bdver3-*)
3528        arch=bdver3
3529        cpu=bdver3
3530        ;;
3531      bdver2-*)
3532        arch=bdver2
3533        cpu=bdver2
3534        ;;
3535      bdver1-*)
3536	arch=bdver1
3537	cpu=bdver1
3538	;;
3539      btver1-*)
3540	arch=btver1
3541	cpu=btver1
3542	;;
3543      btver2-*)
3544	arch=btver2
3545	cpu=btver2
3546	;;
3547      amdfam10-*|barcelona-*)
3548	arch=amdfam10
3549	cpu=amdfam10
3550	;;
3551      k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3552	arch=k8-sse3
3553	cpu=k8-sse3
3554	;;
3555      k8-*|opteron-*|athlon_64-*)
3556	arch=k8
3557	cpu=k8
3558	;;
3559      nocona-*)
3560	arch=nocona
3561	cpu=nocona
3562	;;
3563      atom-*)
3564	arch=atom
3565	cpu=atom
3566	;;
3567      slm-*)
3568	arch=slm
3569	cpu=slm
3570	;;
3571      core2-*)
3572	arch=core2
3573	cpu=core2
3574	;;
3575      corei7-*)
3576	arch=corei7
3577	cpu=corei7
3578	;;
3579      *)
3580	arch=x86-64
3581	cpu=generic
3582	;;
3583    esac
3584    ;;
3585esac
3586
3587# If there is no $with_cpu option, try to infer one from ${target}.
3588# This block sets nothing except for with_cpu.
3589if test x$with_cpu = x ; then
3590  case ${target} in
3591    i[34567]86-*-elfiamcu)
3592      with_cpu=lakemont
3593      ;;
3594    i[34567]86-*-*|x86_64-*-*)
3595      with_cpu=$cpu
3596      ;;
3597    alphaev6[78]*-*-*)
3598      with_cpu=ev67
3599      ;;
3600    alphaev6*-*-*)
3601      with_cpu=ev6
3602      ;;
3603    alphapca56*-*-*)
3604      with_cpu=pca56
3605      ;;
3606    alphaev56*-*-*)
3607      with_cpu=ev56
3608      ;;
3609    alphaev5*-*-*)
3610      with_cpu=ev5
3611      ;;
3612    frv-*-*linux* | frv400-*-*linux*)
3613      with_cpu=fr400
3614      ;;
3615    frv550-*-*linux*)
3616      with_cpu=fr550
3617      ;;
3618    m5200-*-*|m5407-*-*)
3619      with_cpu=${default_cf_cpu}
3620      ;;
3621    m68k*-*-*)
3622      case "$with_arch" in
3623	"cf")
3624	  with_cpu=${default_cf_cpu}
3625	  ;;
3626	"" | "m68k")
3627	  with_cpu=m${default_m68k_cpu}
3628	  ;;
3629      esac
3630      ;;
3631    powerpc*-*-*spe*)
3632      # For SPE, start with 8540, then upgrade to 8548 if
3633      # --enable-e500-double was requested explicitly or if we were
3634      # configured for e500v2.
3635      with_cpu=8540
3636      if test x$enable_e500_double = xyes; then
3637        with_cpu=8548
3638      fi
3639      case ${target_noncanonical} in
3640        e500v2*)
3641          with_cpu=8548
3642          ;;
3643      esac
3644      ;;
3645    sparc*-*-*)
3646      case ${target} in
3647	*-leon-*)
3648	  with_cpu=leon
3649	  ;;
3650	*-leon[3-9]*)
3651	  with_cpu=leon3
3652	  ;;
3653	*-leon[3-9]v7*)
3654	  with_cpu=leon3v7
3655	  ;;
3656	*)
3657	  with_cpu="`echo ${target} | sed 's/-.*$//'`"
3658	  ;;
3659      esac
3660      ;;
3661    visium-*-*)
3662      with_cpu=gr5
3663      ;;
3664  esac
3665
3666  # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
3667  case ${target} in
3668    i[34567]86-*-*|x86_64-*-*)
3669      if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
3670	if test x$with_cpu_32 = x; then
3671	  with_cpu_32=$with_cpu
3672	fi
3673	if test x$with_cpu_64 = x; then
3674	  with_cpu_64=$with_cpu
3675	fi
3676        with_cpu=
3677      fi
3678      ;;
3679  esac
3680fi
3681
3682# Support for --with-arch and related options (and a few unrelated options,
3683# too).
3684case ${with_arch} in
3685  yes | no)
3686    echo "--with-arch must be passed a value" 1>&2
3687    exit 1
3688    ;;
3689esac
3690
3691# If there is no $with_arch option, try to infer one from ${target}.
3692# This block sets nothing except for with_arch.
3693if test x$with_arch = x ; then
3694  case ${target} in
3695    i[34567]86-*-darwin*|x86_64-*-darwin*)
3696      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3697      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3698      ;;
3699    i[34567]86-*-elfiamcu)
3700      with_arch=lakemont
3701      ;;
3702    i[34567]86-*-*)
3703      # --with-fpmath sets the default ISA to SSE2, which is the same
3704      # ISA supported by Pentium 4.
3705      if test x$with_fpmath = x || test $arch_without_sse2 = no; then
3706	with_arch=$arch
3707      else
3708	with_arch=pentium4
3709      fi
3710      ;;
3711    x86_64-*-*)
3712      with_arch=$arch
3713      ;;
3714    mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3715      with_arch=r5900
3716      ;;
3717    mips*-*-vxworks)
3718      with_arch=mips2
3719      ;;
3720  esac
3721
3722  # Avoid overriding --with-arch-32 and --with-arch-64 values.
3723  case ${target} in
3724    i[34567]86-*-darwin*|x86_64-*-darwin*)
3725      # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3726      # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3727      ;;
3728    i[34567]86-*-*|x86_64-*-*)
3729      if test x$with_arch_32 != x || test x$with_arch_64 != x; then
3730	if test x$with_arch_32 = x; then
3731	  with_arch_32=$with_arch
3732	fi
3733	if test x$with_arch_64 = x; then
3734	  if test $arch_without_64bit = yes; then
3735	    # Set the default 64bit arch to x86-64 if the default arch
3736	    # doesn't support 64bit.
3737	    with_arch_64=x86-64
3738	  else
3739	    with_arch_64=$with_arch
3740	  fi
3741	fi
3742	with_arch=
3743      elif test $arch_without_64bit$need_64bit_isa = yesyes; then
3744	# Set the default 64bit arch to x86-64 if the default arch
3745	# doesn't support 64bit and we need 64bit ISA.
3746	with_arch_32=$with_arch
3747	with_arch_64=x86-64
3748	with_arch=
3749      fi
3750      ;;
3751  esac
3752fi
3753
3754# Infer a default setting for --with-float.
3755if test x$with_float = x; then
3756  case ${target} in
3757    mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3758      # The R5900 doesn't support 64-bit float.  32-bit float doesn't
3759      # comply with IEEE 754.
3760      with_float=soft
3761      ;;
3762  esac
3763fi
3764
3765# Infer a default setting for --with-fpu.
3766if test x$with_fpu = x; then
3767  case ${target} in
3768    mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3769      # The R5900 FPU only supports single precision.
3770      with_fpu=single
3771      ;;
3772  esac
3773fi
3774
3775# Support --with-fpmath.
3776if test x$with_fpmath != x; then
3777  case ${target} in
3778    i[34567]86-*-* | x86_64-*-*)
3779      case ${with_fpmath} in
3780      avx)
3781	tm_file="${tm_file} i386/avxmath.h"
3782	;;
3783      sse)
3784	tm_file="${tm_file} i386/ssemath.h"
3785	;;
3786      *)
3787	echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3788	exit 1
3789	;;
3790      esac
3791      ;;
3792    *)
3793      echo "--with-fpmath isn't supported for $target." 1>&2
3794      exit 1
3795      ;;
3796  esac
3797fi
3798
3799# Similarly for --with-schedule.
3800if test x$with_schedule = x; then
3801	case ${target} in
3802	hppa1*)
3803		# Override default PA8000 scheduling model.
3804		with_schedule=7100LC
3805		;;
3806	esac
3807fi
3808
3809# Infer a default setting for --with-llsc.
3810if test x$with_llsc = x; then
3811  case ${target} in
3812    mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3813      # The R5900 doesn't support LL(D) and SC(D).
3814      with_llsc=no
3815      ;;
3816    mips*-*-linux*)
3817      # The kernel emulates LL and SC where necessary.
3818      with_llsc=yes
3819      ;;
3820  esac
3821fi
3822
3823# Validate and mark as valid any --with options supported
3824# by this target.  In order to use a particular --with option
3825# you must list it in supported_defaults; validating the value
3826# is optional.  This case statement should set nothing besides
3827# supported_defaults.
3828
3829supported_defaults=
3830case "${target}" in
3831	aarch64*-*-*)
3832		supported_defaults="abi cpu arch"
3833		for which in cpu arch; do
3834
3835			eval "val=\$with_$which"
3836			base_val=`echo $val | sed -e 's/\+.*//'`
3837			ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
3838
3839			if [ $which = arch ]; then
3840			  def=aarch64-arches.def
3841			  pattern=AARCH64_ARCH
3842			else
3843			  def=aarch64-cores.def
3844			  pattern=AARCH64_CORE
3845			fi
3846
3847			ext_mask=AARCH64_CPU_DEFAULT_FLAGS
3848
3849			# Find the base CPU or ARCH id in aarch64-cores.def or
3850			# aarch64-arches.def
3851			if [ x"$base_val" = x ] \
3852			    || grep "^$pattern(\"$base_val\"," \
3853				    ${srcdir}/config/aarch64/$def \
3854				    > /dev/null; then
3855
3856			  if [ $which = arch ]; then
3857				base_id=`grep "^$pattern(\"$base_val\"," \
3858				  ${srcdir}/config/aarch64/$def | \
3859				  sed -e 's/^[^,]*,[ 	]*//' | \
3860				  sed -e 's/,.*$//'`
3861				# Extract the architecture flags from aarch64-arches.def
3862				ext_mask=`grep "^$pattern(\"$base_val\"," \
3863				   ${srcdir}/config/aarch64/$def | \
3864				   sed -e 's/)$//' | \
3865				   sed -e 's/^.*,//'`
3866			  else
3867				base_id=`grep "^$pattern(\"$base_val\"," \
3868				  ${srcdir}/config/aarch64/$def | \
3869				  sed -e 's/^[^,]*,[ 	]*//' | \
3870				  sed -e 's/,.*$//'`
3871			  fi
3872
3873			  while [ x"$ext_val" != x ]
3874			  do
3875				ext_val=`echo $ext_val | sed -e 's/\+//'`
3876				ext=`echo $ext_val | sed -e 's/\+.*//'`
3877				base_ext=`echo $ext | sed -e 's/^no//'`
3878
3879				if [ x"$base_ext" = x ] \
3880				    || grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3881				    ${srcdir}/config/aarch64/aarch64-option-extensions.def \
3882				    > /dev/null; then
3883
3884				  ext_canon=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3885					${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3886					sed -e 's/^[^,]*,[ 	]*//' | \
3887					sed -e 's/,.*$//'`
3888				  ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3889					${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3890					sed -e 's/^[^,]*,[ 	]*[^,]*,[ 	]*//' | \
3891					sed -e 's/,.*$//' | \
3892					sed -e 's/).*$//'`
3893				  ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3894					${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3895					sed -e 's/^[^,]*,[ 	]*[^,]*,[ 	]*[^,]*,[ 	]*//' | \
3896					sed -e 's/,.*$//' | \
3897					sed -e 's/).*$//'`
3898
3899
3900				  if [ $ext = $base_ext ]; then
3901					# Adding extension
3902					ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
3903				  else
3904					# Removing extension
3905					ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
3906				  fi
3907
3908				  true
3909				else
3910				  echo "Unknown extension used in --with-$which=$val" 1>&2
3911				  exit 1
3912				fi
3913				ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
3914			  done
3915
3916			  ext_mask="(("$ext_mask") << 6)"
3917			  if [ x"$base_id" != x ]; then
3918				target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
3919			  fi
3920			  true
3921			else
3922			  echo "Unknown $which used in --with-$which=$val" 1>&2
3923			  exit 1
3924			fi
3925		done
3926		;;
3927
3928	alpha*-*-*)
3929		supported_defaults="cpu tune"
3930		for which in cpu tune; do
3931			eval "val=\$with_$which"
3932			case "$val" in
3933			"" \
3934			| ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3935			| pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3936			| 21264a)
3937				;;
3938			*)
3939				echo "Unknown CPU used in --with-$which=$val" 1>&2
3940				exit 1
3941				;;
3942			esac
3943		done
3944		;;
3945
3946	arc*-*-*)
3947		supported_defaults="cpu"
3948
3949		if [ x"$with_cpu" = x ] \
3950		    || grep "^ARC_CPU ($with_cpu," \
3951		       ${srcdir}/config/arc/arc-cpus.def \
3952		       > /dev/null; then
3953		 # Ok
3954		 true
3955		else
3956		 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3957		 exit 1
3958		fi
3959		;;
3960
3961	arm*-*-*)
3962		supported_defaults="arch cpu float tune fpu abi mode tls"
3963		for which in cpu tune arch; do
3964			# See if it matches a supported value
3965			eval "val=\$with_$which"
3966			if [ x"$val" != x ]; then
3967			  cpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
3968				-v cmd="chk$which $val" \
3969				${srcdir}/config/arm/arm-cpus.in`
3970			  if [ "$cpu" = "error" ]; then
3971			    echo "Unknown target in --with-$which=$val" 1>&2
3972			    exit 1
3973			  else
3974			    new_val=$cpu
3975			    eval "target_${which}_cname=$new_val"
3976			    echo "For $val real value is $new_val"
3977			  fi
3978			fi
3979		done
3980
3981		case "$with_float" in
3982		"" \
3983		| soft | hard | softfp)
3984			# OK
3985			;;
3986		*)
3987			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3988			exit 1
3989			;;
3990		esac
3991
3992		# see if --with-fpu matches any of the supported FPUs
3993		if [ x"$with_fpu" != x ] ; then
3994		  fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
3995			-v cmd="chkfpu $with_fpu" \
3996			${srcdir}/config/arm/arm-cpus.in`
3997		  if [ "$fpu" = "error"]
3998		  then
3999		    echo "Unknown target in --with-$which=$val" 1>&2
4000		    exit 1
4001		  fi
4002		fi
4003
4004		case "$with_abi" in
4005		"" \
4006		| apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
4007			#OK
4008			;;
4009		*)
4010			echo "Unknown ABI used in --with-abi=$with_abi"
4011			exit 1
4012			;;
4013		esac
4014
4015		case "$with_mode" in
4016		"" \
4017		| arm | thumb )
4018			#OK
4019			;;
4020		*)
4021			echo "Unknown mode used in --with-mode=$with_mode"
4022			exit 1
4023			;;
4024		esac
4025
4026		case "$with_tls" in
4027		"" \
4028		| gnu | gnu2)
4029			# OK
4030			;;
4031		*)
4032			echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
4033			exit 1
4034			;;
4035		esac
4036
4037		if test "x$with_arch" != x && test "x$with_cpu" != x; then
4038			echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\""  1>&2
4039			exit 1
4040		fi
4041
4042		if test "x$with_cpu" != x && test "x$with_tune" != x; then
4043			echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\""  1>&2
4044			exit 1
4045		fi
4046
4047		# Add extra multilibs
4048		if test "x$with_multilib_list" != x; then
4049			arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
4050			if test "x${arm_multilibs}" != xdefault ; then
4051				for arm_multilib in ${arm_multilibs}; do
4052					case ${arm_multilib} in
4053					aprofile|rmprofile)
4054						tmake_profile_file="arm/t-multilib"
4055						;;
4056					*)
4057						echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
4058						exit 1
4059						;;
4060					esac
4061				done
4062			fi
4063
4064			if test "x${tmake_profile_file}" != x ; then
4065				# arm/t-aprofile and arm/t-rmprofile are only
4066				# designed to work without any with-cpu,
4067				# with-arch, with-mode, with-fpu or with-float
4068				# options.
4069				if test "x$with_arch" != x \
4070				    || test "x$with_cpu" != x \
4071				    || test "x$with_float" != x \
4072				    || test "x$with_fpu" != x \
4073				    || test "x$with_mode" != x ; then
4074				    echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
4075				    exit 1
4076				fi
4077				# But pass the default value for float-abi
4078				# through to the multilib selector
4079				with_float="soft"
4080				tmake_file="${tmake_file} ${tmake_profile_file}"
4081				TM_MULTILIB_CONFIG="$with_multilib_list"
4082			fi
4083		fi
4084		target_cpu_cname=${target_cpu_cname:-arm6}
4085		with_cpu=${with_cpu:-$target_cpu_cname}
4086		;;
4087
4088	fr*-*-*linux*)
4089		supported_defaults=cpu
4090		case "$with_cpu" in
4091		fr400) ;;
4092		fr550) ;;
4093		*)
4094			echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4095			exit 1
4096			;;
4097		esac
4098		;;
4099
4100	fido-*-* | m68k*-*-* | m5200-*-* | m5407-*-*)
4101		supported_defaults="arch cpu"
4102		case "$with_arch" in
4103		"" | "m68k"| "cf")
4104			m68k_arch_family="$with_arch"
4105			;;
4106		*)
4107			echo "Invalid --with-arch=$with_arch" 1>&2
4108			exit 1
4109			;;
4110		esac
4111
4112		# We always have a $with_cpu setting here.
4113		case "$with_cpu" in
4114		"m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
4115			m68k_cpu_ident=$with_cpu
4116			;;
4117		"m68020-40")
4118			m68k_cpu_ident=m68020
4119			tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
4120			;;
4121		"m68020-60")
4122			m68k_cpu_ident=m68020
4123			tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
4124			;;
4125		*)
4126			# We need the C identifier rather than the string.
4127			m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
4128			   'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
4129			    $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
4130				 ${srcdir}/config/m68k/m68k-devices.def`
4131			if [ x"$m68k_cpu_ident" = x ] ; then
4132				echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
4133				exit 1
4134			fi
4135			with_cpu="mcpu=$with_cpu"
4136			;;
4137		esac
4138		;;
4139
4140	hppa*-*-*)
4141		supported_defaults="arch schedule"
4142
4143		case "$with_arch" in
4144		"" | 1.0 | 1.1 | 2.0)
4145			# OK
4146			;;
4147		*)
4148			echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
4149			exit 1
4150			;;
4151		esac
4152
4153		case "$with_schedule" in
4154		"" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
4155			# OK
4156			;;
4157		*)
4158			echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
4159			exit 1
4160			;;
4161		esac
4162		;;
4163
4164	i[34567]86-*-* | x86_64-*-*)
4165		supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
4166		for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
4167			eval "val=\$with_$which"
4168			case " $x86_archs " in
4169			*" ${val} "*)
4170				case "${target}" in
4171				  x86_64-*-*)
4172				      case "x$which" in
4173					*_32)
4174						;;
4175					*)
4176						echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
4177						exit 1
4178						;;
4179				      esac
4180				      ;;
4181				esac
4182				# OK
4183				;;
4184			*)
4185				if test x${val} != x; then
4186					case " $x86_64_archs " in
4187					*" ${val} "*)
4188						# OK
4189						;;
4190					*)
4191						# Allow $x86_cpus --with-cpu=/--with-tune=
4192						case "x$which" in
4193						xcpu*|xtune*)
4194							case " $x86_cpus " in
4195							*" ${val} "*)
4196								# OK
4197								;;
4198							*)
4199								echo "Unknown CPU given in --with-$which=$val." 1>&2
4200								exit 1
4201								;;
4202							esac
4203							;;
4204						*)
4205							echo "Unknown CPU given in --with-$which=$val." 1>&2
4206							exit 1
4207							;;
4208						esac
4209					;;
4210					esac
4211				fi
4212				;;
4213			esac
4214		done
4215		;;
4216
4217	riscv*-*-*)
4218		supported_defaults="abi arch tune"
4219
4220		case "${target}" in
4221		riscv32*) xlen=32 ;;
4222		riscv64*) xlen=64 ;;
4223		*) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;;
4224		esac
4225
4226		# Infer arch from --with-arch, --target, and --with-abi.
4227		case "${with_arch}" in
4228		rv32i* | rv32g* | rv64i* | rv64g*)
4229			# OK.
4230			;;
4231		"")
4232			# Infer XLEN, but otherwise assume GC.
4233			case "${with_abi}" in
4234			ilp32 | ilp32f | ilp32d) with_arch="rv32gc" ;;
4235			lp64 | lp64f | lp64d) with_arch="rv64gc" ;;
4236			*) with_arch="rv${xlen}gc" ;;
4237			esac
4238			;;
4239		*)
4240			echo "--with-arch=${with_arch} is not supported.  The argument must begin with rv32i, rv32g, rv64i, or rv64g." 1>&2
4241			exit 1
4242			;;
4243		esac
4244
4245		# Make sure --with-abi is valid.  If it was not specified,
4246		# pick a default based on the ISA, preferring soft-float
4247		# unless the D extension is present.
4248		case "${with_abi}" in
4249		ilp32 | ilp32f | ilp32d | lp64 | lp64f | lp64d)
4250			;;
4251		"")
4252			case "${with_arch}" in
4253			rv32*d* | rv32g*) with_abi=ilp32d ;;
4254			rv32*) with_abi=ilp32 ;;
4255			rv64*d* | rv64g*) with_abi=lp64d ;;
4256			rv64*) with_abi=lp64 ;;
4257			esac
4258			;;
4259		*)
4260			echo "--with-abi=${with_abi} is not supported" 1>&2
4261			exit 1
4262			;;
4263		esac
4264
4265		# Make sure ABI and ISA are compatible.
4266		case "${with_abi},${with_arch}" in
4267		ilp32,rv32* \
4268		| ilp32f,rv32*f* | ilp32f,rv32g* \
4269		| ilp32d,rv32*d* | ilp32d,rv32g* \
4270		| lp64,rv64* \
4271		| lp64f,rv64*f* | lp64f,rv64g* \
4272		| lp64d,rv64*d* | lp64d,rv64g*)
4273			;;
4274		*)
4275			echo "--with-abi=${with_abi} is not supported for ISA ${with_arch}" 1>&2
4276			exit 1
4277			;;
4278		esac
4279		;;
4280
4281	mips*-*-*)
4282		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"
4283
4284		case ${with_float} in
4285		"" | soft | hard)
4286			# OK
4287			;;
4288		*)
4289			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4290			exit 1
4291			;;
4292		esac
4293
4294		case ${with_fpu} in
4295		"" | single | double)
4296			# OK
4297			;;
4298		*)
4299			echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
4300			exit 1
4301			;;
4302		esac
4303
4304		case ${with_nan} in
4305		"" | 2008 | legacy)
4306			# OK
4307			;;
4308		*)
4309			echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
4310			exit 1
4311			;;
4312		esac
4313
4314		case ${with_fp_32} in
4315		"" | 32 | xx | 64)
4316			# OK
4317			;;
4318		*)
4319			echo "Unknown FP mode used in --with-fp-32=$with_fp_32" 1>&2
4320			exit 1
4321			;;
4322		esac
4323
4324		case ${with_odd_spreg_32} in
4325		yes)
4326			with_odd_spreg_32="odd-spreg"
4327			;;
4328		no)
4329			with_odd_spreg_32="no-odd-spreg"
4330			;;
4331		"")
4332			# OK
4333			;;
4334		*)
4335			echo "Unknown odd-spreg-32 type used in --with-odd-spreg-32=$with_odd_spreg_32" 1>&2
4336			exit 1
4337			;;
4338		esac
4339
4340		case ${with_abi} in
4341		"" | 32 | o64 | n32 | 64 | eabi)
4342			# OK
4343			;;
4344		*)
4345			echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
4346			exit 1
4347			;;
4348		esac
4349
4350		case ${with_divide} in
4351		"" | breaks | traps)
4352			# OK
4353			;;
4354		*)
4355			echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
4356			exit 1
4357			;;
4358		esac
4359
4360		case ${with_llsc} in
4361		yes)
4362			with_llsc=llsc
4363			;;
4364		no)
4365			with_llsc="no-llsc"
4366			;;
4367		"")
4368			# OK
4369			;;
4370		*)
4371			echo "Unknown llsc type used in --with-llsc" 1>&2
4372			exit 1
4373			;;
4374		esac
4375
4376		case ${with_mips_plt} in
4377		yes)
4378			with_mips_plt=plt
4379			;;
4380		no)
4381			with_mips_plt=no-plt
4382			;;
4383		"")
4384			;;
4385		*)
4386			echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
4387			exit 1
4388			;;
4389		esac
4390
4391		case ${with_synci} in
4392		yes)
4393			with_synci=synci
4394			;;
4395		no)
4396			with_synci=no-synci
4397			;;
4398		"")
4399			;;
4400		*)
4401			echo "Unknown synci type used in --with-synci" 1>&2
4402			exit 1
4403			;;
4404		esac
4405
4406		case ${with_lxc1_sxc1} in
4407		yes)
4408			with_lxc1_sxc1=lxc1-sxc1
4409			;;
4410		no)
4411			with_lxc1_sxc1=no-lxc1-sxc1
4412			;;
4413		"")
4414			;;
4415		*)
4416			echo "Unknown lxc1-sxc1 type used in --with-lxc1-sxc1" 1>&2
4417			exit 1
4418			;;
4419		esac
4420
4421		case ${with_madd4} in
4422		yes)
4423			with_madd4=madd4
4424			;;
4425		no)
4426			with_madd4=no-madd4
4427			;;
4428		"")
4429			;;
4430		*)
4431			echo "Unknown madd4 type used in --with-madd4" 1>&2
4432			exit 1
4433			;;
4434		esac
4435		;;
4436
4437	nds32*-*-*)
4438		supported_defaults="arch cpu nds32_lib float fpu_config"
4439
4440		# process --with-arch
4441		case "${with_arch}" in
4442		"" | v3 )
4443			tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4444			;;
4445		v2 | v2j | v3m)
4446			# OK
4447			tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4448			;;
4449		v3f)
4450			tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
4451			;;
4452		v3s)
4453			tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
4454
4455			;;
4456		*)
4457			echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
4458			exit 1
4459			;;
4460		esac
4461
4462		case "${with_cpu}" in
4463		"")
4464			with_cpu=n9
4465			;;
4466		n6 | n7 | n8 | e8 | s8 | n9)
4467			# OK
4468			;;
4469		*)
4470			echo "Cannot accept --with-cpu=$with_cpu, available values are: n6 n7 n8 e8 s8 n9" 1>&2
4471			exit 1
4472			;;
4473		esac
4474
4475		# process --with-nds32-lib
4476		case "${with_nds32_lib}" in
4477		"")
4478			# the default library is newlib
4479			with_nds32_lib=newlib
4480			;;
4481		newlib)
4482			# OK
4483			;;
4484		mculib)
4485			# OK
4486			;;
4487		*)
4488			echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
4489			exit 1
4490			;;
4491		esac
4492
4493		# process --with-float
4494		case "${with_float}" in
4495		"" | soft | hard)
4496			# OK
4497			;;
4498		*)
4499			echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
4500			exit 1
4501			;;
4502		esac
4503
4504		# process --with-config-fpu
4505		case "${with_config_fpu}" in
4506		"" | 0 | 1 | 2 | 3)
4507			# OK
4508			;;
4509		*)
4510			echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
4511			exit 1
4512			;;
4513		esac
4514
4515
4516		;;
4517	nios2*-*-*)
4518		supported_defaults="arch"
4519			case "$with_arch" in
4520			"" | r1 | r2)
4521				# OK
4522				;;
4523			*)
4524				echo "Unknown arch used in --with-arch=$with_arch" 1>&2
4525				exit 1
4526				;;
4527			esac
4528		;;
4529
4530	powerpc*-*-* | rs6000-*-*)
4531		supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
4532
4533		for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
4534			eval "val=\$with_$which"
4535			case ${val} in
4536			default32 | default64)
4537				case $which in
4538				cpu | tune)
4539					;;
4540				*)
4541					echo "$val only valid for --with-cpu and --with-tune." 1>&2
4542					exit 1
4543					;;
4544				esac
4545				with_which="with_$which"
4546				eval $with_which=
4547				;;
4548			405cr)
4549				tm_defines="${tm_defines} CONFIG_PPC405CR"
4550				eval "with_$which=405"
4551				;;
4552			"" | common | native \
4553			| power[3456789] | power5+ | power6x \
4554			| powerpc | powerpc64 | powerpc64le \
4555			| rs64 \
4556			| 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
4557			| 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
4558			| 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
4559			| a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
4560			| titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
4561				# OK
4562				;;
4563			*)
4564				echo "Unknown cpu used in --with-$which=$val." 1>&2
4565				exit 1
4566				;;
4567			esac
4568		done
4569
4570		case "$with_abi" in
4571		"" | elfv1 | elfv2 )
4572			#OK
4573			;;
4574		*)
4575			echo "Unknown ABI used in --with-abi=$with_abi"
4576			exit 1
4577			;;
4578		esac
4579
4580		if test "x$with_advance_toolchain" != x; then
4581		    if test -d "/opt/$with_advance_toolchain/." -a \
4582			-d "/opt/$with_advance_toolchain/bin/." -a \
4583			-d "/opt/$with_advance_toolchain/include/."; then
4584
4585			tm_file="$tm_file ./advance-toolchain.h"
4586			(at="/opt/$with_advance_toolchain"
4587			 echo "/* Use Advance Toolchain $at */"
4588			 echo
4589			 echo "#undef  LINK_OS_EXTRA_SPEC32"
4590			 echo "#define LINK_OS_EXTRA_SPEC32" \
4591			      "\"%(link_os_new_dtags)" \
4592			      "-rpath $prefix/lib -rpath $at/lib\""
4593			 echo
4594			 echo "#undef  LINK_OS_EXTRA_SPEC64"
4595			 echo "#define LINK_OS_EXTRA_SPEC64" \
4596			      "\"%(link_os_new_dtags)" \
4597			      "-rpath $prefix/lib64 -rpath $at/lib64\""
4598			 echo
4599			 echo "#undef  LINK_OS_NEW_DTAGS_SPEC"
4600			 echo "#define LINK_OS_NEW_DTAGS_SPEC" \
4601			      "\"--enable-new-dtags\""
4602			 echo
4603			 echo "#undef  DYNAMIC_LINKER_PREFIX"
4604			 echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
4605			 echo
4606			 echo "#undef  MD_EXEC_PREFIX"
4607			 echo "#define MD_EXEC_PREFIX \"$at/bin/\""
4608			 echo
4609			 echo "#undef  MD_STARTFILE_PREFIX"
4610			 echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\""
4611			 echo
4612			 echo "#undef  MD_STARTFILE_PREFIX_1"
4613			 echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \
4614			    > advance-toolchain.h
4615		    else
4616			echo "Unknown advance-toolchain $with_advance_toolchain"
4617			exit 1
4618		    fi
4619		fi
4620
4621		# Set up the default long double format if the user changed it.
4622		if test x$with_long_double_format = xieee; then
4623		    tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
4624
4625		elif test x$with_long_double_format = xibm; then
4626		    tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
4627		fi
4628		;;
4629
4630	s390*-*-*)
4631		supported_defaults="arch mode tune"
4632
4633		for which in arch tune; do
4634			eval "val=\$with_$which"
4635			case ${val} in
4636			"" | native | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | arch3 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12)
4637				# OK
4638				;;
4639			*)
4640				echo "Unknown cpu used in --with-$which=$val." 1>&2
4641				exit 1
4642				;;
4643			esac
4644		done
4645
4646		case ${with_mode} in
4647		"" | esa | zarch)
4648			# OK
4649			;;
4650		*)
4651			echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
4652			exit 1
4653			;;
4654		esac
4655		;;
4656
4657	sh[123456ble]*-*-* | sh-*-*)
4658		supported_defaults="cpu"
4659		case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
4660		"" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
4661			# OK
4662			;;
4663		m2a | m2a-single | m2a-single-only | m2a-nofpu)
4664			;;
4665		m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
4666		        ;;
4667		*)
4668			echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
4669			echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
4670			echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
4671			echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
4672			exit 1
4673			;;
4674		esac
4675		;;
4676	sparc*-*-*)
4677		supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
4678
4679		for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
4680			eval "val=\$with_$which"
4681			case ${val} in
4682			"" | sparc | sparcv9 | sparc64 \
4683			| v7 | cypress \
4684			| v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
4685			| sparclite | f930 | f934 | sparclite86x \
4686			| sparclet | tsc701 \
4687			| v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
4688			| niagara3 | niagara4 | niagara7 | m8)
4689				# OK
4690				;;
4691			*)
4692				echo "Unknown cpu used in --with-$which=$val" 1>&2
4693				exit 1
4694				;;
4695			esac
4696		done
4697
4698		case ${with_float} in
4699		"" | soft | hard)
4700			# OK
4701			;;
4702		*)
4703			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4704			exit 1
4705			;;
4706		esac
4707		;;
4708
4709	spu-*-*)
4710		supported_defaults="arch tune"
4711
4712		for which in arch tune; do
4713			eval "val=\$with_$which"
4714			case ${val} in
4715			"" | cell | celledp)
4716				# OK
4717				;;
4718			*)
4719				echo "Unknown cpu used in --with-$which=$val." 1>&2
4720				exit 1
4721				;;
4722			esac
4723		done
4724		;;
4725
4726	tic6x-*-*)
4727		supported_defaults="arch"
4728
4729		case ${with_arch} in
4730		"" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
4731			# OK
4732			;;
4733		*)
4734			echo "Unknown arch used in --with-arch=$with_arch." 1>&2
4735			exit 1
4736			;;
4737		esac
4738		;;
4739
4740	v850*-*-*)
4741		supported_defaults=cpu
4742		case ${with_cpu} in
4743		"" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
4744			# OK
4745			;;
4746		*)
4747			echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4748			exit 1
4749			;;
4750		esac
4751		;;
4752	visium-*-*)
4753		supported_defaults="cpu"
4754		case $with_cpu in
4755		  "" | gr5 | gr6)
4756			;;
4757		  *)    echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4758			exit 1
4759			;;
4760		esac
4761		;;
4762esac
4763
4764# Set some miscellaneous flags for particular targets.
4765target_cpu_default2=
4766case ${target} in
4767	aarch64*-*-*)
4768		if test x"$target_cpu_cname" != x
4769		then
4770			target_cpu_default2=$target_cpu_cname
4771		fi
4772		;;
4773
4774	arm*-*-*)
4775		if test x$with_cpu = x
4776		then
4777			echo "Don't know the target cpu" 1>&2
4778			exit 1
4779		else
4780			target_cpu_default2="\\\"$with_cpu\\\""
4781		fi
4782		;;
4783
4784	hppa*-*-*)
4785		if test x$gas = xyes
4786		then
4787			target_cpu_default2="MASK_GAS"
4788		fi
4789		;;
4790
4791	fido*-*-* | m68k*-*-*)
4792		target_cpu_default2=$m68k_cpu_ident
4793		tmake_file="m68k/t-opts $tmake_file"
4794		if [ x"$m68k_arch_family" != x ]; then
4795		        tmake_file="m68k/t-$m68k_arch_family $tmake_file"
4796		fi
4797		;;
4798
4799	i[34567]86-*-darwin* | x86_64-*-darwin*)
4800		;;
4801	i[34567]86-*-linux* | x86_64-*-linux*)
4802		extra_objs="${extra_objs} cet.o"
4803		tmake_file="$tmake_file i386/t-linux i386/t-cet"
4804		;;
4805	i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
4806		tmake_file="$tmake_file i386/t-kfreebsd"
4807		;;
4808	i[34567]86-*-gnu*)
4809		tmake_file="$tmake_file i386/t-gnu"
4810		;;
4811	i[34567]86-*-msdosdjgpp*)
4812		tmake_file="${tmake_file} i386/t-djgpp"
4813		;;
4814	i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
4815		;;
4816	i[34567]86-*-cygwin* | x86_64-*-cygwin*)
4817		;;
4818	i[34567]86-*-mingw* | x86_64-*-mingw*)
4819		;;
4820	i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
4821		;;
4822	i[34567]86-*-freebsd*)
4823		;;
4824	x86_64-*-freebsd*)
4825		tmake_file="${tmake_file} i386/t-freebsd64"
4826		;;
4827	ia64*-*-linux*)
4828		;;
4829
4830	mips*-*-*)
4831		if test x$gnu_ld = xyes
4832		then
4833			target_cpu_default2="MASK_SPLIT_ADDRESSES"
4834		fi
4835		case ${target} in
4836			mips*el-*-*)
4837				tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
4838				;;
4839		esac
4840		if test x$with_arch != x; then
4841			default_mips_arch=$with_arch
4842		fi
4843		if test x$with_abi != x; then
4844			default_mips_abi=$with_abi
4845		fi
4846		case ${default_mips_arch} in
4847		    mips1)    tm_defines="$tm_defines MIPS_ISA_DEFAULT=1" ;;
4848		    mips2)    tm_defines="$tm_defines MIPS_ISA_DEFAULT=2" ;;
4849		    mips3)    tm_defines="$tm_defines MIPS_ISA_DEFAULT=3" ;;
4850		    mips4)    tm_defines="$tm_defines MIPS_ISA_DEFAULT=4" ;;
4851		    mips32)   tm_defines="$tm_defines MIPS_ISA_DEFAULT=32" ;;
4852		    mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=33" ;;
4853		    mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=37" ;;
4854		    mips64)   tm_defines="$tm_defines MIPS_ISA_DEFAULT=64" ;;
4855		    mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=65" ;;
4856		    mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=69" ;;
4857		esac
4858		case ${default_mips_abi} in
4859		    32)   tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
4860		    o64)  tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;;
4861		    n32)  tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;;
4862		    64)   tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;;
4863		    eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;;
4864		esac
4865		tmake_file="mips/t-mips $tmake_file"
4866		;;
4867
4868	powerpc*-*-* | rs6000-*-*)
4869		# FIXME: The PowerPC port uses the value set at compile time,
4870		# although it's only cosmetic.
4871		if test "x$with_cpu" != x
4872		then
4873			target_cpu_default2="\\\"$with_cpu\\\""
4874		fi
4875		out_file="${cpu_type}/${cpu_type}.c"
4876		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
4877		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
4878		tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
4879		;;
4880
4881	sh[123456ble]*-*-* | sh-*-*)
4882		c_target_objs="${c_target_objs} sh-c.o"
4883		cxx_target_objs="${cxx_target_objs} sh-c.o"
4884		;;
4885
4886	sparc*-*-*)
4887		# Some standard aliases.
4888		case x$with_cpu in
4889		xsparc)
4890			with_cpu=v7
4891			;;
4892		xsparcv9 | xsparc64)
4893			with_cpu=v9
4894			;;
4895		esac
4896
4897		if test x$with_tune = x ; then
4898		      case ${target} in
4899		      *-leon-*)
4900			  with_tune=leon
4901			  ;;
4902		      *-leon[3-9]*)
4903			  with_tune=leon3
4904			  ;;
4905		      esac
4906		fi
4907
4908		# The SPARC port checks this value at compile-time.
4909		target_cpu_default2="TARGET_CPU_$with_cpu"
4910		;;
4911
4912	v850*-*-*)
4913		case "x$with_cpu" in
4914		x)
4915			;;
4916		xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
4917			target_cpu_default2="TARGET_CPU_$with_cpu"
4918			;;
4919		xv850es)
4920			target_cpu_default2="TARGET_CPU_v850e1"
4921			;;
4922		esac
4923		;;
4924	visium-*-*)
4925		target_cpu_default2="TARGET_CPU_$with_cpu"
4926		;;
4927esac
4928
4929t=
4930all_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"
4931for option in $all_defaults
4932do
4933	eval "val=\$with_"`echo $option | sed s/-/_/g`
4934	if test -n "$val"; then
4935		case " $supported_defaults " in
4936		*" $option "*)
4937			;;
4938		*)
4939			echo "This target does not support --with-$option." 2>&1
4940			echo "Valid --with options are: $supported_defaults" 2>&1
4941			exit 1
4942			;;
4943		esac
4944
4945		if test "x$t" = x
4946		then
4947			t="{ \"$option\", \"$val\" }"
4948		else
4949			t="${t}, { \"$option\", \"$val\" }"
4950		fi
4951	fi
4952done
4953
4954if test "x$t" = x
4955then
4956	configure_default_options="{ { NULL, NULL} }"
4957else
4958	configure_default_options="{ ${t} }"
4959fi
4960
4961if test "$target_cpu_default2" != ""
4962then
4963	if test "$target_cpu_default" != ""
4964	then
4965		target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
4966	else
4967		target_cpu_default=$target_cpu_default2
4968	fi
4969fi
4970
4971case ${target} in
4972i[34567]86-*-* | x86_64-*-*)
4973	if test x$enable_as_accelerator = xyes; then
4974		extra_programs="mkoffload\$(exeext)"
4975	fi
4976	;;
4977esac
4978