Next:Run-time Target Specification, Previous:The Globaltargetm Variable, Up:Target Description Macros and Functions [Contents][Index]
You can control the compilation driver.
A list of specs for the driver itself. It should be a suitableinitializer for an array of strings, with no surrounding braces.
The driver applies these specs to its own command line between loadingdefaultspecs files (but not command-line specified ones) andchoosing the multilib directory or running any subcommands. Itapplies them in the order given, so each spec can depend on theoptions added by earlier ones. It is also possible to remove optionsusing ‘%<option’ in the usual way.
This macro can be useful when a port has several interdependent targetoptions. It provides a way of standardizing the command line sothat the other specs are easier to write.
Do not define this macro if it does not need to do anything.
A list of specs used to support configure-time default options (i.e.--with options) in the driver. It should be a suitable initializerfor an array of structures, each containing two strings, without theoutermost pair of surrounding braces.
The first item in the pair is the name of the default. This must matchthe code inconfig.gcc for the target. The second item is a specto apply if a default with this name was specified. The string‘%(VALUE)’ in the spec will be replaced by the value of the defaulteverywhere it occurs.
The driver will apply these specs to its own command line between loadingdefaultspecs files and processingDRIVER_SELF_SPECS, usingthe same mechanism asDRIVER_SELF_SPECS.
Do not define this macro if it does not need to do anything.
A C string constant that tells the GCC driver program options topass to CPP. It can also specify how to translate options yougive to GCC into options for GCC to pass to the CPP.
Do not define this macro if it does not need to do anything.
A C string constant which is appended to the value ofCPP_SPEC.LIBC_CPP_SPEC is intended to depend upon theC library in use.
Do not define this macro if it does not need to do anything.
This macro is just likeCPP_SPEC, but is used for C++, ratherthan C. If you do not define this macro, then the value ofCPP_SPEC (if any) will be used instead.
A C string constant that tells the GCC driver program options topass tocc1,cc1plus,f771, and the other languagefront ends.It can also specify how to translate options you give to GCC into optionsfor GCC to pass to front ends.
Do not define this macro if it does not need to do anything.
A C string constant that tells the GCC driver program options topass tocc1plus. It can also specify how to translate options yougive to GCC into options for GCC to pass to thecc1plus.
Do not define this macro if it does not need to do anything.Note that everything defined in CC1_SPEC is already passed tocc1plus so there is no need to duplicate the contents ofCC1_SPEC in CC1PLUS_SPEC.
A C string constant that tells the GCC driver program options topass to the assembler. It can also specify how to translate optionsyou give to GCC into options for GCC to pass to the assembler.See the filesun3.h for an example of this.
Do not define this macro if it does not need to do anything.
A C string constant that tells the GCC driver program how torun any programs which cleanup after the normal assembler.Normally, this is not needed. See the filemips.h foran example of this.
Do not define this macro if it does not need to do anything.
Define this macro, with no value, if the driver should give the assembleran argument consisting of a single dash,-, to instruct it toread from its standard input (which will be a pipe connected to theoutput of the compiler proper). This argument is given after any-o option specifying the name of the output file.
If you do not define this macro, the assembler is assumed to read itsstandard input if given no non-option arguments. If your assemblercannot read standard input at all, use a ‘%{pipe:%e}’ construct;seemips.h for instance.
A C string constant that tells the GCC driver program options topass to the linker. It can also specify how to translate options yougive to GCC into options for GCC to pass to the linker.
Do not define this macro if it does not need to do anything.
A C string constant which is appended to the value ofLINK_SPEC.LIBC_LINK_SPEC is intended to depend upon theC library in use.
Do not define this macro if it does not need to do anything.
Another C string constant used much likeLINK_SPEC. The differencebetween the two is thatLIB_SPEC is used at the end of thecommand given to the linker.
If this macro is not defined, a default is provided thatloads the standard C library from the usual place. Seegcc.cc.
Another C string constant that tells the GCC driver programhow and when to place a reference tolibgcc.a into thelinker command line. This constant is placed both before and afterthe value ofLIB_SPEC.
If this macro is not defined, the GCC driver provides a default thatpasses the string-lgcc to the linker.
By default, ifENABLE_SHARED_LIBGCC is defined, theLIBGCC_SPEC is not directly used by the driver program but isinstead modified to refer to different versions oflibgcc.adepending on the values of the command line flags-static,-shared,-static-libgcc, and-shared-libgcc. Ontargets where these modifications are inappropriate, defineREAL_LIBGCC_SPEC instead.REAL_LIBGCC_SPEC tells thedriver how to place a reference tolibgcc on the link commandline, but, unlikeLIBGCC_SPEC, it is used unmodified.
A macro that controls the modifications toLIBGCC_SPECmentioned inREAL_LIBGCC_SPEC. If nonzero, a spec will begenerated that uses--as-needed or equivalent options and thesharedlibgcc in place of thestatic exception handler library, when linking without any of-static,-static-libgcc, or-shared-libgcc.
If defined, this C string constant is added toLINK_SPEC.WhenUSE_LD_AS_NEEDED is zero or undefined, it also affectsthe modifications toLIBGCC_SPEC mentioned inREAL_LIBGCC_SPEC.
Another C string constant used much likeLINK_SPEC. Thedifference between the two is thatSTARTFILE_SPEC is used atthe very beginning of the command given to the linker.
If this macro is not defined, a default is provided that loads thestandard C startup file from the usual place. Seegcc.cc.
Another C string constant used much likeLINK_SPEC. Thedifference between the two is thatENDFILE_SPEC is used atthe very end of the command given to the linker.
Do not define this macro if it does not need to do anything.
GCC-v will print the thread model GCC was configured to use.However, this doesn’t work on platforms that are multilibbed on threadmodels, such as AIX 4.3. On such platforms, defineTHREAD_MODEL_SPEC such that it evaluates to a string withoutblanks that names one of the recognized thread models.%*, thedefault value of this macro, will expand to the value ofthread_file set inconfig.gcc.
Define this macro to add a suffix to the target sysroot when GCC isconfigured with a sysroot. This will cause GCC to search for usr/lib,et al, within sysroot+suffix.
Define this macro to add a headers_suffix to the target sysroot whenGCC is configured with a sysroot. This will cause GCC to pass theupdated sysroot+headers_suffix to CPP, causing it to search forusr/include, et al, within sysroot+headers_suffix.
Define this macro to provide additional specifications to put in thespecs file that can be used in various specifications likeCC1_SPEC.
The definition should be an initializer for an array of structures,containing a string constant, that defines the specification name, and astring constant that provides the specification.
Do not define this macro if it does not need to do anything.
EXTRA_SPECS is useful when an architecture contains severalrelated targets, which have various…_SPECS which are similarto each other, and the maintainer would like one central place to keepthese definitions.
For example, the PowerPC System V.4 targets useEXTRA_SPECS todefine either_CALL_SYSV when the System V calling sequence isused or_CALL_AIX when the older AIX-based calling sequence isused.
Theconfig/rs6000/rs6000.h target file defines:
#define EXTRA_SPECS \ { "cpp_sysv_default", CPP_SYSV_DEFAULT },#define CPP_SYS_DEFAULT ""Theconfig/rs6000/sysv.h target file defines:
#undef CPP_SPEC#define CPP_SPEC \"%{posix: -D_POSIX_SOURCE } \%{mcall-sysv: -D_CALL_SYSV } \%{!mcall-sysv: %(cpp_sysv_default) } \%{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"#undef CPP_SYSV_DEFAULT#define CPP_SYSV_DEFAULT "-D_CALL_SYSV"while theconfig/rs6000/eabiaix.h target file definesCPP_SYSV_DEFAULT as:
#undef CPP_SYSV_DEFAULT#define CPP_SYSV_DEFAULT "-D_CALL_AIX"
Define this macro if the driver program should find the librarylibgcc.a. If you do not define this macro, the driver program will passthe argument-lgcc to tell the linker to do the search.
The sequence in which libgcc and libc are specified to the linker.By default this is%G %L %G.
Define this macro to add additional steps to be executed after linker.The default value of this macro is empty string.
A C string constant giving the complete command line need to execute thelinker. When you do this, you will need to update your port each time achange is made to the link command line withingcc.cc. Therefore,define this macro only if you need to completely redefine the commandline for invoking the linker and there is no other way to accomplishthe effect you need. Overriding this macro may be avoidable by overridingLINK_GCC_C_SEQUENCE_SPEC instead.
boolTARGET_ALWAYS_STRIP_DOTDOT ¶True if.. components should always be removed from directory namescomputed relative to GCC’s internal directories, false (default) if suchcomponents should be preserved and directory names containing them passedto other tools such as the linker.
Define this macro as a C expression for the initializer of an array ofstring to tell the driver program which options are defaults for thistarget and thus do not need to be handled specially when usingMULTILIB_OPTIONS.
Do not define this macro ifMULTILIB_OPTIONS is not defined inthe target makefile fragment or if none of the options listed inMULTILIB_OPTIONS are set by default.SeeTarget Makefile Fragments.
Define this macro to tellgcc that it should only translatea-B prefix into a-L linker option if the prefixindicates an absolute file name.
If defined, this macro is an additional prefix to try afterSTANDARD_EXEC_PREFIX.MD_EXEC_PREFIX is not searchedwhen the compiler is built as a crosscompiler. If you defineMD_EXEC_PREFIX, then be sure to add itto the list of directories used to find the assembler inconfigure.ac.
Define this macro as a C string constant if you wish to override thestandard choice oflibdir as the default prefix totry when searching for startup files such ascrt0.o.STANDARD_STARTFILE_PREFIX is not searched when the compileris built as a cross compiler.
Define this macro as a C string constant if you wish to override thestandard choice of/lib as a prefix to try after the default prefixwhen searching for startup files such ascrt0.o.STANDARD_STARTFILE_PREFIX_1 is not searched when the compileris built as a cross compiler.
Define this macro as a C string constant if you wish to override thestandard choice of/lib as yet another prefix to try after thedefault prefix when searching for startup files such ascrt0.o.STANDARD_STARTFILE_PREFIX_2 is not searched when the compileris built as a cross compiler.
If defined, this macro supplies an additional prefix to try after thestandard prefixes.MD_EXEC_PREFIX is not searched when thecompiler is built as a cross compiler.
If defined, this macro supplies yet another prefix to try after thestandard prefixes. It is not searched when the compiler is built as across compiler.
Define this macro as a C string constant if you wish to set environmentvariables for programs called by the driver, such as the assembler andloader. The driver passes the value of this macro toputenv toinitialize the necessary environment variables.
Define this macro as a C string constant if you wish to override thestandard choice of/usr/local/include as the default prefix totry when searching for local header files.LOCAL_INCLUDE_DIRcomes beforeNATIVE_SYSTEM_HEADER_DIR (set inconfig.gcc, normally/usr/include) in the search order.
Cross compilers do not search either/usr/local/include or itsreplacement.
The “component” corresponding toNATIVE_SYSTEM_HEADER_DIR.SeeINCLUDE_DEFAULTS, below, for the description of components.If you do not define this macro, no component is used.
Define this macro if you wish to override the entire default search pathfor include files. For a native compiler, the default search pathusually consists ofGCC_INCLUDE_DIR,LOCAL_INCLUDE_DIR,GPLUSPLUS_INCLUDE_DIR, andNATIVE_SYSTEM_HEADER_DIR. In addition,GPLUSPLUS_INCLUDE_DIRandGCC_INCLUDE_DIR are defined automatically byMakefile,and specify private search areas for GCC. The directoryGPLUSPLUS_INCLUDE_DIR is used only for C++ programs.
The definition should be an initializer for an array of structures.Each array element should have four elements: the directory name (astring constant), the component name (also a string constant), a flagfor C++-only directories,and a flag showing that the includes in the directory don’t need to bewrapped inextern ‘C’ when compiling C++. Mark the end ofthe array with a null element.
The component name denotes what GNU package the include file is part of,if any, in all uppercase letters. For example, it might be ‘GCC’or ‘BINUTILS’. If the package is part of a vendor-suppliedoperating system, code the component name as ‘0’.
For example, here is the definition used for VAX/VMS:
#define INCLUDE_DEFAULTS \{ \ { "GNU_GXX_INCLUDE:", "G++", 1, 1}, \ { "GNU_CC_INCLUDE:", "GCC", 0, 0}, \ { "SYS$SYSROOT:[SYSLIB.]", 0, 0, 0}, \ { ".", 0, 0, 0}, \ { 0, 0, 0, 0} \}Here is the order of prefixes tried for exec files:
GCC_EXEC_PREFIX or, ifGCC_EXEC_PREFIXis not set and the compiler has not been installed in the configure-timeprefix, the location in which the compiler has actually been installed.COMPILER_PATH.STANDARD_EXEC_PREFIX, if the compiler has been installedin the configured-timeprefix.MD_EXEC_PREFIX, if defined, but only if this is a nativecompiler.Here is the order of prefixes tried for startfiles:
GCC_EXEC_PREFIX or its automatically determinedvalue based on the installed toolchain location.LIBRARY_PATH(or port-specific name; native only, cross compilers do not use this).STANDARD_EXEC_PREFIX, but only if the toolchain is installedin the configuredprefix or this is a native compiler.MD_EXEC_PREFIX, if defined, but only if this is a nativecompiler.MD_STARTFILE_PREFIX, if defined, but only if this is anative compiler, or we have a target system root.MD_STARTFILE_PREFIX_1, if defined, but only if this is anative compiler, or we have a target system root.STANDARD_STARTFILE_PREFIX, with any sysroot modifications.If this path is relative it will be prefixed byGCC_EXEC_PREFIX andthe machine suffix orSTANDARD_EXEC_PREFIX and the machine suffix.STANDARD_STARTFILE_PREFIX_1, but only if this is a nativecompiler, or we have a target system root. The default for this macro is/lib/.STANDARD_STARTFILE_PREFIX_2, but only if this is a nativecompiler, or we have a target system root. The default for this macro is/usr/lib/.Next:Run-time Target Specification, Previous:The Globaltargetm Variable, Up:Target Description Macros and Functions [Contents][Index]