📄 config.gcc
字号:
# GCC build-, host- and target-specific configuration file.# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.#This file is part of GCC.#GCC is free software; you can redistribute it and/or modify it under#the terms of the GNU General Public License as published by the Free#Software Foundation; either version 2, or (at your option) any later#version.#GCC is distributed in the hope that it will be useful, but WITHOUT#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License#for more details.#You should have received a copy of the GNU General Public License#along with GCC; see the file COPYING. If not, write to the Free#Software Foundation, 59 Temple Place - Suite 330, Boston, MA#02111-1307, USA.# This is the GCC build-, host- and target-specific configuration file# where a configuration type, as recognized and generated by config.bfd,# is mapped to different system-specific definitions and files. This is# invoked by the autoconf-generated configure script, called for build,# host and target in that order, setting ${machine} to each. Putting it# in a separate shell file lets us skip running autoconf when modifying# build-, host- and target-specific information.# This file switches on the shell variable ${machine}, and also uses the# following shell variables:## with_* Various variables as set by configure.## enable_threads_flag Either the name, yes or no depending on whether# threads support was requested.## gas_flag Either yes or no depending on whether GNU as was# requested.## gnu_ld_flag Either yes or no depending on whether GNU ld was# requested.# This file sets the following shell variables for use by the# autoconf-generated configure script:## cpu_type The name of the cpu, if different from machine.## tm_file A list of target macro files, if different from# "$cpu_type/$cpu_type.h". Usually it's constructed# per target in a way like this:# tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"# Note that the preferred order is:# - specific target header "${cpu_type}/${cpu_type.h}"# - generic headers like dbxelf.h elfos.h, netware.h, etc.# - specializing target headers like ${cpu_type.h}/elf.h# This helps to keep OS specific stuff out of the CPU# defining header ${cpu_type}/${cpu_type.h}.## tm_p_file Location of file with declarations for functions# in $out_file.## out_file The name of the machine description C support# file, if different from "$cpu_type/$cpu_type.c".## md_file The name of the machine-description file, if# different from "$cpu_type/$cpu_type.md".## tmake_file A list of machine-description-specific# makefile-fragments, if different from# "$cpu_type/t-$cpu_type".## float_format Set to the symbolic name for the floating-point# formats used for this machine, if different from# "i64". Used to derive a header file name to# include, like "vax" for "float-vax.h". If no such# file is wanted, set to "none".## extra_objs List of extra objects that should be linked into# the compiler proper (cc1, cc1obj, cc1plus)# depending on target.## extra_headers List of used header files from the directory# config/${cpu_type}.## host_xmake_file List of host-specific makefile-fragments.## extra_passes List of extra executables compiled for this target# machine, used for compiling from source to object.## extra_parts List of extra object files that should be compiled# for this target machine.## extra_programs Like extra_passes, but these are used when linking.## host_extra_objs List of extra host-dependent objects that should# be linked into the compiler proper.## host_extra_gcc_objs List of extra host-dependent objects that should# be linked into the gcc driver.## c_target_objs List of extra target-dependent objects that be# linked into the C compiler only.## cxx_target_objs List of extra target-dependent objects that be# linked into the C++ compiler only.## build_xm_defines List of macros to define when compiling for the# build machine.## build_xm_file List of files to include when compiling for the# build machine.## host_xm_defines List of macros to define when compiling for the# host machine.## host_xm_file List of files to include when compiling for the# host machine.## xm_defines List of macros to define when compiling for the# target machine.## xm_file List of files to include when compiling for the# target machine.## use_collect2 Set to yes or no, depending on whether collect2# will be used.## target_cpu_default Set to override the default target model.## build_install_headers_dir# Target to use when installing header files.## host_truncate_target# Non-empty if the target name should be truncated# on this host, due to filename length issues.## gdb_needs_out_file_path# Set to yes if gdb needs a dir command with# `dirname $out_file`.## build_exeext Set to the suffix, if the build machine requires# executables to have a file name suffix.## host_exeext Set to the suffix, if the host machine requires# executables to have a file name suffix.## thread_file Set to control which thread package to use.## gas Set to yes or no depending on whether the target# system normally uses GNU as.# The following variables are used in each case-construct to build up the# outgoing variables:## xmake_file Makefile-fragment when this system is as a host,# for host_xmake_file.## extra_host_objs List of extra objects that should be linked into# the compiler proper when this system is a host,# for host_extra_objs.## install_headers_dir Makefile-target for how the header file directory# is installed, when this system is a build system,# for build_install_headers_dir.## truncate_target Non-empty if the target name should be truncated# when this system is a host, due to filename length# issues. For host_truncate_target.## exeext The suffix for executables on this system.## gnu_ld Set to yes or no depending on whether the target# system normally uses GNU ld.out_file=xmake_file=tmake_file=extra_headers=extra_passes=extra_parts=extra_programs=extra_objs=extra_host_objs=extra_gcc_objs=c_target_objs=cxx_target_objs=xm_defines=float_format=# Set this to force installation and use of collect2.use_collect2=# Set this to override the default target model.target_cpu_default=# Set this to control how the header file directory is installed.install_headers_dir=install-headers-tar# Set this if directory names should be truncated to 14 characters.truncate_target=# Set this if gdb needs a dir command with `dirname $out_file`gdb_needs_out_file_path=# Set this if the build machine requires executables to have a# file name suffix.exeext=# Set this to control which thread package will be used.thread_file=# Reinitialize these from the flag values every loop pass, since some# configure entries modify them.gas="$gas_flag"gnu_ld="$gnu_ld_flag"enable_threads=$enable_threads_flag# Obsolete configurations.# To avoid some tedious lists, we have a blacklist with a whitelist# embedded within it.case $machine in 1750a-* \ | a29k-* \ | alpha*-*-osf[123]* \ | arm-*-riscix* \ | c*-convex-* \ | clipper-* \ | elxsi-* \ | i860-* \ | i?86-*-aix* \ | i?86-*-bsd* \ | i?86-*-chorusos* \ | i?86-*-dgux* \ | i?86-*-freebsd1.* \ | i?86-*-isc* \ | i?86-*-linux*oldld* \ | i?86-*-osf1* \ | i?86-*-osfrose* \ | i?86-*-rtemscoff* \ | i?86-*-sunos* \ | i?86-go32-rtems* \ | i?86-next-* \ | i?86-sequent-bsd* \ | i?86-sequent-ptx[12]* \ | i?86-sequent-sysv3* \ | m68[k0]*-*-lynxos* \ | m68[k0]*-*-rtemscoff* \ | m68[k0]*-*-sysv3* \ | m68[k0]*-altos-* \ | m68[k0]*-apollo-* \ | m68[k0]*-apple-* \ | m68[k0]*-bull-* \ | m68[k0]*-convergent-* \ | m68[k0]*-isi-* \ | m68[k0]*-next-* \ | m68[k0]*-sony-* \ | m88k-* \ | mips-*-bsd* \ | mips-*-riscos* \ | mips-*-sysv* \ | mips-*-ultrix* \ | mips-dec-* \ | mips-sgi-irix[1234]* \ | mips-sony-* \ | mips-tandem-* \ | ns32k-* \ | pj-* \ | pjl-* \ | romp-* \ | sparc-*-rtemsaout* \ | we32k-* \) case $machine in mips-sni-sysv4 \ | m88k-*-aout* | m88k-*-openbsd* | m88k-*-sysv4* \ | ns32k-*-netbsd* | ns32k-*-openbsd* \ | romp-*-openbsd* \ ) # Whitelisted. ;; *) if test "x$enable_obsolete" != xyes; then echo "*** Configuration $machine is obsolete." >&2 echo "*** Specify --enable-obsolete to build it anyway." >&2 echo "*** Support will be REMOVED in the next major release of GCC," >&2 echo "*** unless a maintainer comes forward." >&2 exit 1 fi;; esacesac# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be# updated in each machine entry. Also set default extra_headers for some# machines.tm_p_file=cpu_type=`echo $machine | sed 's/-.*$//'`case $machine inalpha*-*-*) cpu_type=alpha ;;strongarm*-*-*) cpu_type=arm ;;arm*-*-*) cpu_type=arm ;;xscale-*-*) cpu_type=arm ;;c*-convex-*) cpu_type=convex extra_headers=proto.h ;;i[34567]86-*-*) cpu_type=i386 extra_headers="mmintrin.h xmmintrin.h" ;;x86_64-*-*) cpu_type=i386 extra_headers="mmintrin.h xmmintrin.h" ;;ia64-*-*) extra_headers=ia64intrin.h ;;hppa*-*-* | parisc*-*-*) cpu_type=pa ;;m680[012]0-*-*) cpu_type=m68k extra_headers=math-68881.h ;;m68k-*-*) extra_headers=math-68881.h ;;mips*-*-*) cpu_type=mips ;;pj*-*-*) cpu_type=pj ;;powerpc*-*-*) cpu_type=rs6000 extra_headers="ppc-asm.h altivec.h" ;;sparc*-*-*) cpu_type=sparc ;;sh64-*-*) cpu_type=sh ;;esactm_file=${cpu_type}/${cpu_type}.hif test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.hthen tm_p_file=${cpu_type}/${cpu_type}-protos.hficase $machine inx86_64-*-*) tm_file="i386/biarch64.h ${tm_file}" ;;esac# On a.out targets, we need to use collect2.case $machine in*-*-*aout*) use_collect2=yes ;;esac# Common parts for GNU/Linux, GNU/Hurd, OpenBSD, NetBSD, and FreeBSD systems.case $machine in*-*-linux*) xm_defines=POSIX case $machine in *-*-linux*ecoff* | *-*-linux*libc1* | *-*-linux*oldld* | *-*-linux*aout*) ;; *) case x${enable_threads} in x | xyes | xposix) thread_file='posix' ;; esac ;; esac ;;*-*-gnu*) # On the Hurd, the setup is just about the same on # each different CPU. The specific machines that we # support are matched above and just set $cpu_type. xm_defines=POSIX tm_file="${cpu_type}/gnu.h" extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" # GNU always uses ELF. elf=yes # GNU tools are the only tools. gnu_ld=yes gas=yes # These details are the same as for Linux. # But here we need a little extra magic. tmake_file="t-slibgcc-elf-ver t-linux t-gnu" case $machine in i[34567]86-*-*) tm_file="${cpu_type}/${cpu_type}.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" ;; esac ;;*-*-openbsd*) tm_file=${cpu_type}/openbsd.h tmake_file="t-libc-ok t-openbsd t-libgcc-pic" xm_defines=POSIX if test x$enable_threads = xyes; then thread_file='posix' tmake_file="${tmake_file} t-openbsd-thread" fi ;;*-*-netbsd*) tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd" xm_defines=POSIX gas=yes gnu_ld=yes ;;*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) # This is the place-holder for the generic a.out configuration # of FreeBSD. No actual configuration resides here since # there was only ever a bare-bones ix86 configuration for # a.out and it exists solely in the machine-specific section. # This place-holder must exist to avoid dropping into # the generic ELF configuration of FreeBSD (i.e. it must be # ordered before that section). ;;*-*-freebsd*) # This is the generic ELF configuration of FreeBSD. Later # machine-specific sections may refine and add to this # configuration. # # Due to tm_file entry ordering issues that vary between cpu # architectures, we only define fbsd_tm_file to allow the # machine-specific section to dictate the final order of all # entries of tm_file with the minor exception that components # of the tm_file set here will always be of the form: # # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h # # The machine-specific section should not tamper with this # ordering but may order all other entries of tm_file as it # pleases around the provided core setting. gas=yes gnu_ld=yes extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" case $machine in *-*-freebsd3 | *-*-freebsd[3].*) fbsd_tm_file="freebsd3.h";; *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";; *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";; *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";; *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;; esac tmake_file="t-slibgcc-elf-ver t-freebsd" xmake_file=none xm_defines=POSIX case x${enable_threads} in xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";; x | xyes | xpthreads | xposix) thread_file='posix' tmake_file="${tmake_file} t-freebsd-thread" # Before 5.0, FreeBSD can't bind shared libraries to -lc # when "optionally" threaded via weak pthread_* checks. case $machine in *-*-freebsd[34] | *-*-freebsd[34].*) tmake_file="${tmake_file} t-slibgcc-nolc-override";; esac ;; *) echo 'Unknown thread configuration for FreeBSD'; exit 1;; esac fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h" ;;esaccase $machine in# Support site-specific machine types.*local*) rest=`echo $machine | sed -e "s/$cpu_type-//"` tm_file=${cpu_type}/$rest.h if test -f $srcdir/config/${cpu_type}/xm-$rest.h then xm_file=${cpu_type}/xm-$rest.h fi if test -f $srcdir/config/${cpu_type}/x-$rest then xmake_file=${cpu_type}/x-$rest fi if test -f $srcdir/config/${cpu_type}/t-$rest then tmake_file=${cpu_type}/t-$rest fi ;;1750a-*-*) # 1750a is only supported as a target. case "$build,$host" in 1750a*,* | *,1750a* ) echo "*** $machine is only supported as a target" >&2 exit 1 esac ;;a29k-*-bsd* | a29k-*-sym1*) tm_file="${tm_file} a29k/unix.h" xm_defines=POSIX use_collect2=yes ;;a29k-*-udi | a29k-*-coff) tm_file="${tm_file} dbxcoff.h" tmake_file=a29k/t-a29kbare ;;a29k*-*-rtems*) xm_defines=POSIX tm_file="a29k/a29k.h a29k/rtems.h rtems.h" tmake_file="a29k/t-a29kbare t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' fi ;;a29k-wrs-vxworks*) tm_file="${tm_file} dbxcoff.h a29k/vx29k.h" tmake_file=a29k/t-vx29k extra_parts="crtbegin.o crtend.o"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -