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