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