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