This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: explanation (was Re: gcc std namespace bug)
On Aug 10, 2000, Levente Farkas <lfarkas@mindmaker.hu> wrote:
> -fhonor-std is an option for gcc so I when I use gcc I could have to
> use BOTH version (with AND without) -fhonor-std.
It's not the only GCC option that changes the ABI and requires
libraries to be compiled with it. -fvtable-thunks and -fnew-abi are
other such options.
I agree it's not obvious for users that this is the case (I myself
have fallen victim of -fvtable-thunks, many years ago, when I started
using g++). But the alternatives are no better:
(i) not offer these options, hard-wiring the selection at GCC build
time. People willing to enable them would have to change the sources
before the build.
(ii) create an additional set of multilibs for each alternative, i.e.,
one with -fhonor-std, one without it; one with -fnew-abi, one without
it, one with -fvtable-thunks, one without it, etc. If you bear in
mind that the number of multilibs grows exponentially on the number of
options, you'll agree this is very impractical, in terms of build time
and disk space use, considering that few people use these options.
(iii) arrange for the linker to refuse to link together object files
generated with incompatible sets of flags. This would certainly be a
good thing, but it would only work on platforms in which the GNU
linker is in use.
Which of these are you volunteering to implement? :-) :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me