-xcode=pic13 and -xcode=pic32, as suggested in PR 35555.
This also fixes and old bug where -fPIC (32 bit) had been translated to
-kpic (13 bit), but apparently that doesn't make a big difference in
practice.
transformations can decide whether they happen in a C or a C++ compiler.
Now the wrappers don't depend on the basename of the executed compiler
wrapper anymore.
Fixes PR 35555.
options. Some others (c99, CC) can. To avoid linker errors about
"illegal option -- 1", these options are converted to -xO0 and -xO1,
which work.
Committed during the freeze to avoid breakage of packages. The code that
passed the -O0 and -O1 options through is relatively new, so there may
not have shown packages that break because of this.
the wrapped command and exit. This will be used by libtool which needs
to figure out the true command name. Yeah, it is ugly behaviour from
libtool, but I'm not going to rewrite libtool.
Change ok-ed by jlam.
may lead to failure for some packages, a note to the user is printed
when a wrapped command fails, including the "real" command line of the
wrapped command.
This change arose from the implicit addition of the -std=c99, -std=gnu99
or -c99 options, which made some packages fail with obscure error
messages. This change helps users get to the real cause more quickly.
When discarding arguments, split_arg is set to yes, so that no empty
arguments are added to the resulting command line. A more informative
debugging message is also printed in that case.
Added a debugging message to transform_to(), for consistency with the
other functions.
Added some code to check for unknown options.
Reindented the file so that the compiler options are better visible.
They had been hidden by the massive block comments before. Also, every
option has got its own line so that one only needs to read the first
column to find the relevant code.
make the wrapper code less frightening. For example, instead of
arg="${arg#-Wl,}"
$debug_log $wrapperlog " (transform-sunpro-cc) to: $arg"
addtocache=yes
one can simply write
transform_to "${arg-Wl,}"
The functions that are currently implemented are: transform_to,
transform_discard, transform_to_nocache, transform_discard,
transform_pass and transform_pass_unknown.