This is the mail archive of the
mailing list for the GCC project.
Re: How to handle linker options beginning with -f?
>>>>> "H" == H J Lu <email@example.com> writes:
H> I had the same problem when I added -rdynamic for Linux. I
H> couldn't find a better name which gcc would take and I was too
H> lazy to hack gcc.c for it :-).
It occurs to me that there is a bigger question here.
Fundamentally, there is a tension between trying to provide
compatibility with vendor compilers (which provide lots of funky
options) and trying to provide a uniform interface across platforms.
As part of the GNU project, I think our goal should be to make life
easy for GNU programmers, which means emphasizing the latter. It is
more important that building GNU programs can be done easily and
uniformly across platforms than that we provide compatibility with
I think that means we should get rid of all the -rfoo gunk at some
Which is why MD_MODIFY_ARGUMENTS or whatever would be good. This
would provide an interface whereby backwards compatibility (for the
Solaris options, the GNU/Linux options, and the Apple options) oculd
be provided -- all by rewriting them in terms of -Wl -- before showing
them to the rest of the driver.
That would allow us to factor this gunk into the machine-dependent
areas where it belongs while keeping the driver as simple and clean as
More controversially, I think we should then stop advertising the
non-Wl versions of the options, except for options like -static and
-shared that GCC specifically supports on multiple platforms as a
means of making life easy for GNU programmers by transforming these
options into the appropriate options for the linker on the target
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com