92
fred.c
jim.d
-d fred.c
-d jim.d
%{S:X; T:Y; :D}
If
was given to GCC, substitutes
S
There can be as many clauses as you need. This may be combined with
The conditional text
spaces, or even newlines. They are processed as usual, as described above. Trailing white space in
is ignored. White space may also appear anywhere on the left side of the colon in these constructs,
except between
or
.
The
,
,
, and
-O
-f
-m
-W
the negated form of a
is ignored, except with {
The character
at the beginning of the predicate text is used to indicate that a command should be
|
piped to the following command, but only if
It is built into GCC which switches take arguments and which do not. (You might think it would be
useful to generalize this to allow each compiler's spec to say which switches take arguments. But this
cannot be done in a consistent fashion. GCC cannot even decide which input files have been specified
without knowing which switches take arguments, and it must know which input files to compile in
order to tell which compilers to run).
GCC also knows implicitly that arguments starting in
passed to the linker in their proper position among the other output files.
4.16. Specifying Target Machine and Compiler Version
The usual way to run GCC is to run the executable called
compiling, or
machine -gcc- version
last. Sometimes this is inconvenient, so GCC provides options that will switch to another cross-
compiler or version.
-b
machine
The argument
machine
The value to use for
GCC as a cross-compiler. For example, if a cross-compiler was configured with
, meaning to compile for an 80386 running System V, then you would specify
i386v
to run that cross compiler.
-V
version
The argument
version
versions are installed. For example,
The
and
options work by running the
-V
-b
no real reason to use them if you can just run that directly.
4.17. Hardware Models and Configurations
Earlier we discussed the standard option
completely different target machines, such as VAX vs. 68000 vs. 80386.
-foo -baz
-bar -boggle
-foo -baz -boggle
-bar -baz -boggle
; else if
X
in a %{
:
} or similar construct may contain other nested
X
S
X
and the corresponding word.
*
switches are handled specifically in these constructs. If another value of
,
, or
switch is found later in the command line, the earlier switch value
-f
-m
-W
*} where
is just one letter, which passes all matching options.
S
S
specifies the target machine for compilation.
is the same as was specified as the machine type when configuring
machine
specifies which version of GCC to run. This is useful when multiple
version
Chapter 4. GCC Command Options
was given to GCC, substitutes
T
is specified.
-pipe
are to be treated as compiler output files, and
-l
gcc
to run a version other than the one that was installed
might be
2.0
machine -gcc- version
which chooses among different installed compilers for
-b
; else substitutes
Y
,
,
, and
.
!
|
, or
machine -gcc
, meaning to run GCC version 2.0.
executable, so there's
.
D
as needed.
*
constructs or
%
X
or
-O
when cross-
configure
-b i386v
Need help?
Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?