📄 tm.texi
字号:
@item LINK_LIBGCC_SPECIAL_1
Define this macro if the driver program should find the library
@file{libgcc.a}. If you do not define this macro, the driver program will pass
the argument @option{-lgcc} to tell the linker to do the search.
This macro is similar to @code{LINK_LIBGCC_SPECIAL}, except that it does
not affect @option{-L} options.
@findex LINK_COMMAND_SPEC
@item LINK_COMMAND_SPEC
A C string constant giving the complete command line need to execute the
linker. When you do this, you will need to update your port each time a
change is made to the link command line within @file{gcc.c}. Therefore,
define this macro only if you need to completely redefine the command
line for invoking the linker and there is no other way to accomplish
the effect you need.
@findex LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
@item LINK_ELIMINATE_DUPLICATE_LDIRECTORIES
A nonzero value causes collect2 to remove duplicate -L<directory> search
directories from linking commands. Do not give it a nonzero value if
removing duplicate search directories changes the linker's semantics.
@findex MULTILIB_DEFAULTS
@item MULTILIB_DEFAULTS
Define this macro as a C expression for the initializer of an array of
string to tell the driver program which options are defaults for this
target and thus do not need to be handled specially when using
@code{MULTILIB_OPTIONS}.
Do not define this macro if @code{MULTILIB_OPTIONS} is not defined in
the target makefile fragment or if none of the options listed in
@code{MULTILIB_OPTIONS} are set by default.
@xref{Target Fragment}.
@findex RELATIVE_PREFIX_NOT_LINKDIR
@item RELATIVE_PREFIX_NOT_LINKDIR
Define this macro to tell @code{gcc} that it should only translate
a @option{-B} prefix into a @option{-L} linker option if the prefix
indicates an absolute file name.
@findex STANDARD_EXEC_PREFIX
@item STANDARD_EXEC_PREFIX
Define this macro as a C string constant if you wish to override the
standard choice of @file{/usr/local/lib/gcc-lib/} as the default prefix to
try when searching for the executable files of the compiler.
@findex MD_EXEC_PREFIX
@item MD_EXEC_PREFIX
If defined, this macro is an additional prefix to try after
@code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched
when the @option{-b} option is used, or the compiler is built as a cross
compiler. If you define @code{MD_EXEC_PREFIX}, then be sure to add it
to the list of directories used to find the assembler in @file{configure.in}.
@findex STANDARD_STARTFILE_PREFIX
@item STANDARD_STARTFILE_PREFIX
Define this macro as a C string constant if you wish to override the
standard choice of @file{/usr/local/lib/} as the default prefix to
try when searching for startup files such as @file{crt0.o}.
@findex MD_STARTFILE_PREFIX
@item MD_STARTFILE_PREFIX
If defined, this macro supplies an additional prefix to try after the
standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the
@option{-b} option is used, or when the compiler is built as a cross
compiler.
@findex MD_STARTFILE_PREFIX_1
@item MD_STARTFILE_PREFIX_1
If defined, this macro supplies yet another prefix to try after the
standard prefixes. It is not searched when the @option{-b} option is
used, or when the compiler is built as a cross compiler.
@findex INIT_ENVIRONMENT
@item INIT_ENVIRONMENT
Define this macro as a C string constant if you wish to set environment
variables for programs called by the driver, such as the assembler and
loader. The driver passes the value of this macro to @code{putenv} to
initialize the necessary environment variables.
@findex LOCAL_INCLUDE_DIR
@item LOCAL_INCLUDE_DIR
Define this macro as a C string constant if you wish to override the
standard choice of @file{/usr/local/include} as the default prefix to
try when searching for local header files. @code{LOCAL_INCLUDE_DIR}
comes before @code{SYSTEM_INCLUDE_DIR} in the search order.
Cross compilers do not use this macro and do not search either
@file{/usr/local/include} or its replacement.
@findex MODIFY_TARGET_NAME
@item MODIFY_TARGET_NAME
Define this macro if you with to define command-line switches that modify the
default target name
For each switch, you can include a string to be appended to the first
part of the configuration name or a string to be deleted from the
configuration name, if present. The definition should be an initializer
for an array of structures. Each array element should have three
elements: the switch name (a string constant, including the initial
dash), one of the enumeration codes @code{ADD} or @code{DELETE} to
indicate whether the string should be inserted or deleted, and the string
to be inserted or deleted (a string constant).
For example, on a machine where @samp{64} at the end of the
configuration name denotes a 64-bit target and you want the @option{-32}
and @option{-64} switches to select between 32- and 64-bit targets, you would
code
@smallexample
#define MODIFY_TARGET_NAME \
@{ @{ "-32", DELETE, "64"@}, \
@{"-64", ADD, "64"@}@}
@end smallexample
@findex SYSTEM_INCLUDE_DIR
@item SYSTEM_INCLUDE_DIR
Define this macro as a C string constant if you wish to specify a
system-specific directory to search for header files before the standard
directory. @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 directory
specified.
@findex STANDARD_INCLUDE_DIR
@item STANDARD_INCLUDE_DIR
Define this macro as a C string constant if you wish to override the
standard choice of @file{/usr/include} as the default prefix to
try 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_COMPONENT
The ``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_DEFAULTS
Define this macro if you wish to override the entire default search path
for include files. For a native compiler, the default search path
usually 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 (a
string constant), the component name (also a string constant), a flag
for C++-only directories,
and a flag showing that the includes in the directory don't need to be
wrapped in @code{extern @samp{C}} when compiling C++. Mark the end of
the 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 a vendor-supplied
operating 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 table
Here is the order of prefixes tried for exec files:
@enumerate
@item
Any prefixes specified by the user with @option{-B}.
@item
The environment variable @code{GCC_EXEC_PREFIX}, if any.
@item
The directories specified by the environment variable @code{COMPILER_PATH}.
@item
The macro @code{STANDARD_EXEC_PREFIX}.
@item
@file{/usr/lib/gcc/}.
@item
The macro @code{MD_EXEC_PREFIX}, if any.
@end enumerate
Here is the order of prefixes tried for startfiles:
@enumerate
@item
Any prefixes specified by the user with @option{-B}.
@item
The environment variable @code{GCC_EXEC_PREFIX}, if any.
@item
The directories specified by the environment variable @code{LIBRARY_PATH}
(or port-specific name; native only, cross compilers do not use this).
@item
The macro @code{STANDARD_EXEC_PREFIX}.
@item
@file{/usr/lib/gcc/}.
@item
The macro @code{MD_EXEC_PREFIX}, if any.
@item
The macro @code{MD_STARTFILE_PREFIX}, if any.
@item
The 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 line
Here are run-time target specifications.
@table @code
@findex CPP_PREDEFINES
@item CPP_PREDEFINES
Define this to be a string constant containing @option{-D} options to
define the predefined macros that identify this machine and system.
These macros will be predefined unless the @option{-ansi} option (or a
@option{-std} option for strict ISO C conformance) is specified.
In addition, a parallel set of macros are predefined, whose names are
made by appending @samp{__} at the beginning and at the end. These
@samp{__} macros are permitted by the ISO standard, so they are
predefined regardless of whether @option{-ansi} or a @option{-std} option
is specified.
For example, on the Sun, one can use the following value:
@smallexample
"-Dmc68000 -Dsun -Dunix"
@end smallexample
The 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 @option{-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 to
enable or disable the use of optional features of the target machine.
For example, one machine description serves both the 68000 and
the 68020; a command argument tells the compiler whether it should
use 68020-only instructions or not. This command argument works
by 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}. It is
recommended that a helper macro @code{TARGET_MASK_@var{featurename}}
is defined for each bit-value to test, and used in
@code{TARGET_@var{featurename}} and @code{TARGET_SWITCHES}. For
example:
@smallexample
#define TARGET_MASK_68020 1
#define TARGET_68020 (target_flags & TARGET_MASK_68020)
@end smallexample
One place where these macros are used is in the condition-expressions
of instruction patterns. Note how @code{TARGET_68020} appears
frequently in the 68000 machine description file, @file{m68k.md}.
Another place they are used is in the definitions of the other
macros in the @file{@var{machine}.h} file.
@findex TARGET_SWITCHES
@item TARGET_SWITCHES
This macro defines names of command options to set and clear
bits in @code{target_flags}. Its definition is an initializer
with a subgrouping for each command option.
Each subgrouping contains a string constant, that defines the option
name, a number, which contains the bits to set in
@code{target_flags}, and a second string which is the description
displayed by @option{--help}. If the number is negative then the bits specified
by the number are cleared instead of being set. If the description
string is present but empty, then no help information will be displayed
for that option, but it will not count as an undocumented option. The
actual option name is made by appending @samp{-m} to the specified name.
Non-empty description strings should be marked with @code{N_(@dots{})} for
@command{xgettext}. In addition to the description for @option{--help},
more detailed documentation for each option should be added to
@file{invoke.texi}.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -