This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LIBGCC_SPEC
On Feb 17, 2004, at 1:59 PM, Jim Wilson wrote:
Matt Austern wrote:
Unfortunately, this comment is no longer true. A target can indeed
define LIBGCC_SPEC, but that definition is no longer used. Instead,
the LIBGCC_SPEC is munged by a function called init_gcc_specs. There
doesn't seem to be any way of turning the munging off (short of
disabling shared libgcc entirely), which means that targets where the
munged spec string is inappropriate are just out of luck.
This seems a little confused. LIBGCC_SPEC is used as intended, and
then it is munged in order to support some target independent
features, such as handling shared libgcc related options.
As Geoff said, I don't believe the "target independent" part. The
munging encodes specific library names and the way they correspond to
specific options. There are even comments in gcc.c saying that some of
this is just guesswork and that it's probably wrong on some targets.
Munging spec strings strikes me as deeply wrong. The whole point of
target-overridable spec lines is that this is supposed to be under the
control of individual targets. As it, it's not. The spec string you
get is a complicated interaction between the one you write and the
logic in gcc.c. This is not a good place to be.
--Matt