Passes option to the compilation phase.
To pass multiple options, specify them in order as a comma-separated list. Options that are passed to components with -Q can be reordered. Options that the driver recognizes are kept in the correct order. Do not use -Q for options that the driver already recognizes. For example, the C++ compiler recognizes the -z option for the linker (ld). If you issue a command like this
CC -G -zallextract mylib.a -zdefaultextract ... // correct
the -z options are passed in order to the linker. But if you specify the command like this
CC -G -Qoption ld -zallextract mylib.a -Qoption ld -zdefaultextract ... // error
the -z options can be reordered, giving incorrect results.
phase must have one of the following values.
Table A–18 The -Qoption Values
SPARC |
x86 |
---|---|
ccfe |
ccfe |
iropt |
cg386 |
cg |
codegen |
CClink |
CClink |
ld |
ld |
In the following command line, when ld is invoked by the CC driver, –Qoption passes the –i and –m options to ld.
example% CC -Qoption ld -i,-m test.c |
Be careful to avoid unintended effects. For example,
-Qoption ccfe -features=bool,iddollar |
is interpreted as
-Qoption ccfe -features=bool -Qoption ccfe iddollar |
The correct usage is
-Qoption ccfe -features=bool,-features=iddollar |