📄 tm.texi
字号:
Cross compilers do not use this macro and do not search either@file{/usr/local/include} or its replacement.@findex SYSTEM_INCLUDE_DIR@item SYSTEM_INCLUDE_DIRDefine this macro as a C string constant if you wish to specify asystem-specific directory to search for header files before the standarddirectory. @code{SYSTEM_INCLUDE_DIR} comes before@code{STANDARD_INCLUDE_DIR} in the search order.Cross compilers do not use this macro and do not search the directoryspecified.@findex STANDARD_INCLUDE_DIR@item STANDARD_INCLUDE_DIRDefine this macro as a C string constant if you wish to override thestandard choice of @file{/usr/include} as the default prefix totry when searching for header files.Cross compilers do not use this macro and do not search either@file{/usr/include} or its replacement.@findex STANDARD_INCLUDE_COMPONENT@item STANDARD_INCLUDE_COMPONENTThe ``component'' corresponding to @code{STANDARD_INCLUDE_DIR}.See @code{INCLUDE_DEFAULTS}, below, for the description of components.If you do not define this macro, no component is used.@findex INCLUDE_DEFAULTS@item INCLUDE_DEFAULTSDefine this macro if you wish to override the entire default search pathfor include files. For a native compiler, the default search pathusually consists of @code{GCC_INCLUDE_DIR}, @code{LOCAL_INCLUDE_DIR},@code{SYSTEM_INCLUDE_DIR}, @code{GPLUSPLUS_INCLUDE_DIR}, and@code{STANDARD_INCLUDE_DIR}. In addition, @code{GPLUSPLUS_INCLUDE_DIR}and @code{GCC_INCLUDE_DIR} are defined automatically by @file{Makefile},and specify private search areas for GCC. The directory@code{GPLUSPLUS_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, and flag for C++-only directories,and a flag showing that the includes in the directory don't need to bewrapped in @code{extern @samp{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 upper-case letters. For example, it might be @samp{GCC}or @samp{BINUTILS}. If the package is part of the a vendor-suppliedoperating system, code the component name as @samp{0}.For example, here is the definition used for VAX/VMS:@example#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@} \@}@end example@end tableHere is the order of prefixes tried for exec files:@enumerate@itemAny prefixes specified by the user with @samp{-B}.@itemThe environment variable @code{GCC_EXEC_PREFIX}, if any.@itemThe directories specified by the environment variable @code{COMPILER_PATH}.@itemThe macro @code{STANDARD_EXEC_PREFIX}.@item@file{/usr/lib/gcc/}.@itemThe macro @code{MD_EXEC_PREFIX}, if any.@end enumerateHere is the order of prefixes tried for startfiles:@enumerate@itemAny prefixes specified by the user with @samp{-B}.@itemThe environment variable @code{GCC_EXEC_PREFIX}, if any.@itemThe directories specified by the environment variable @code{LIBRARY_PATH}(native only, cross compilers do not use this).@itemThe macro @code{STANDARD_EXEC_PREFIX}.@item@file{/usr/lib/gcc/}.@itemThe macro @code{MD_EXEC_PREFIX}, if any.@itemThe macro @code{MD_STARTFILE_PREFIX}, if any.@itemThe macro @code{STANDARD_STARTFILE_PREFIX}.@item@file{/lib/}.@item@file{/usr/lib/}.@end enumerate@node Run-time Target@section Run-time Target Specification@cindex run-time target specification@cindex predefined macros@cindex target specifications@c prevent bad page break with this lineHere are run-time target specifications.@table @code@findex CPP_PREDEFINES@item CPP_PREDEFINESDefine this to be a string constant containing @samp{-D} options todefine the predefined macros that identify this machine and system.These macros will be predefined unless the @samp{-ansi} option isspecified.In addition, a parallel set of macros are predefined, whose names aremade by appending @samp{__} at the beginning and at the end. These@samp{__} macros are permitted by the ANSI standard, so they arepredefined regardless of whether @samp{-ansi} is specified.For example, on the Sun, one can use the following value:@smallexample"-Dmc68000 -Dsun -Dunix"@end smallexampleThe result is to define the macros @code{__mc68000__}, @code{__sun__}and @code{__unix__} unconditionally, and the macros @code{mc68000},@code{sun} and @code{unix} provided @samp{-ansi} is not specified.@findex extern int target_flags@item extern int target_flags;This declaration should be present.@cindex optional hardware or system features@cindex features, optional, in system conventions@item TARGET_@dots{}This series of macros is to allow compiler command arguments toenable or disable the use of optional features of the target machine.For example, one machine description serves both the 68000 andthe 68020; a command argument tells the compiler whether it shoulduse 68020-only instructions or not. This command argument worksby means of a macro @code{TARGET_68020} that tests a bit in@code{target_flags}.Define a macro @code{TARGET_@var{featurename}} for each such option.Its definition should test a bit in @code{target_flags}; for example:@smallexample#define TARGET_68020 (target_flags & 1)@end smallexampleOne place where these macros are used is in the condition-expressionsof instruction patterns. Note how @code{TARGET_68020} appearsfrequently in the 68000 machine description file, @file{m68k.md}.Another place they are used is in the definitions of the othermacros in the @file{@var{machine}.h} file.@findex TARGET_SWITCHES@item TARGET_SWITCHESThis macro defines names of command options to set and clearbits in @code{target_flags}. Its definition is an initializerwith a subgrouping for each command option.Each subgrouping contains a string constant, that defines the optionname, and a number, which contains the bits to set in@code{target_flags}. A negative number says to clear bits instead;the negative of the number is which bits to clear. The actual optionname is made by appending @samp{-m} to the specified name.One of the subgroupings should have a null string. The number inthis grouping is the default value for @code{target_flags}. Anytarget options act starting with that value.Here is an example which defines @samp{-m68000} and @samp{-m68020}with opposite meanings, and picks the latter as the default:@smallexample#define TARGET_SWITCHES \ @{ @{ "68020", 1@}, \ @{ "68000", -1@}, \ @{ "", 1@}@}@end smallexample@findex TARGET_OPTIONS@item TARGET_OPTIONSThis macro is similar to @code{TARGET_SWITCHES} but defines names of commandoptions that have values. Its definition is an initializer with asubgrouping for each command option.Each subgrouping contains a string constant, that defines the fixed partof the option name, and the address of a variable. The variable, type@code{char *}, is set to the variable part of the given option if the fixedpart matches. The actual option name is made by appending @samp{-m} to thespecified name.Here is an example which defines @samp{-mshort-data-@var{number}}. If thegiven option is @samp{-mshort-data-512}, the variable @code{m88k_short_data}will be set to the string @code{"512"}.@smallexampleextern char *m88k_short_data;#define TARGET_OPTIONS \ @{ @{ "short-data-", &m88k_short_data @} @}@end smallexample@findex TARGET_VERSION@item TARGET_VERSIONThis macro is a C statement to print on @code{stderr} a stringdescribing the particular machine description choice. Every machinedescription should define @code{TARGET_VERSION}. For example:@smallexample#ifdef MOTOROLA#define TARGET_VERSION \ fprintf (stderr, " (68k, Motorola syntax)");#else#define TARGET_VERSION \ fprintf (stderr, " (68k, MIT syntax)");#endif@end smallexample@findex OVERRIDE_OPTIONS@item OVERRIDE_OPTIONSSometimes certain combinations of command options do not make sense ona particular target machine. You can define a macro@code{OVERRIDE_OPTIONS} to take account of this. This macro, ifdefined, is executed once just after all the command options have beenparsed.Don't use this macro to turn on various extra optimizations for@samp{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for.@findex OPTIMIZATION_OPTIONS@item OPTIMIZATION_OPTIONS (@var{level})Some machines may desire to change what optimizations are performed forvarious optimization levels. This macro, if defined, is executed oncejust after the optimization level is determined and before the remainderof the command options have been parsed. Values set in this macro areused as the default values for the other command line options.@var{level} is the optimization level specified; 2 if @samp{-O2} isspecified, 1 if @samp{-O} is specified, and 0 if neither is specified.You should not use this macro to change options that are notmachine-specific. These should uniformly selected by the sameoptimization level on all supported machines. Use this macro to enablemachine-specific optimizations.@strong{Do not examine @code{write_symbols} inthis macro!} The debugging options are not supposed to alter thegenerated code.@findex CAN_DEBUG_WITHOUT_FP@item CAN_DEBUG_WITHOUT_FPDefine this macro if debugging can be performed even without a framepointer. If this macro is defined, GNU CC will turn on the@samp{-fomit-frame-pointer} option whenever @samp{-O} is specified.@end table@node Storage Layout@section Storage Layout@cindex storage layoutNote that the definitions of the macros in this table which are sizes oralignments measured in bits do not need to be constant. They can be Cexpressions that refer to static variables, such as the @code{target_flags}.@xref{Run-time Target}.@table @code@findex BITS_BIG_ENDIAN@item BITS_BIG_ENDIANDefine this macro to have the value 1 if the most significant bit in abyte has the lowest number; otherwise define it to have the value zero.This means that bit-field instructions count from the most significantbit. If the machine has no bit-field instructions, then this must stillbe defined, but it doesn't matter which value it is defined to. Thismacro need not be a constant.This macro does not affect the way structure fields are packed intobytes or words; that is controlled by @code{BYTES_BIG_ENDIAN}.@findex BYTES_BIG_ENDIAN@item BYTES_BIG_ENDIANDefine this macro to have the value 1 if the most significant byte in aword has the lowest number. This macro need not be a constant.@findex WORDS_BIG_ENDIAN@item WORDS_BIG_ENDIANDefine this macro to have the value 1 if, in a multiword object, themost significant word has the lowest number. This applies to bothmemory locations and registers; GNU CC fundamentally assumes that theorder of words in memory is the same as the order in registers. Thismacro need not be a constant.@findex LIBGCC2_WORDS_BIG_ENDIAN@item LIBGCC2_WORDS_BIG_ENDIANDefine this macro if WORDS_BIG_ENDIAN is not constant. This must be aconstant value with the same meaning as WORDS_BIG_ENDIAN, which will beused only when compiling libgcc2.c. Typically the value will be setbased on preprocessor defines.@findex FLOAT_WORDS_BIG_ENDIAN@item FLOAT_WORDS_BIG_ENDIANDefine this macro to have the value 1 if @code{DFmode}, @code{XFmode} or@code{TFmode} floating point numbers are stored in memory with the wordcontaining the sign bit at the lowest address; otherwise define it to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -