This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: enabling -O2 with gcc 2.96 and later
> | I did not follow this closely, but I think checking version numbers in
> | autoconf is morally wrong.
>
> Please, can you expand on this?
I was hoping that the autoconf documentation supports me more in this
matter than it does; perhaps I'm overly critical here.
The general idea behind autoconf appears to be that it tests for
features, not for specific versions of software. For example, to find
out whether gconv is supported, it would not test whether the version
of the GNU C library is >=2.1; instead, it would directly test for the
presence of <gconv.h>. That way, it will also work on HP/UX, in case
somebody has installed the gconv library separately.
So when you can, you should test for a feature, instead of testing
whether the version of the software you use is known to have the
feature.
> | ... What is the reason not to use -O2 in
> | earlier versions? Something is miscompiled?
>
> Compiling v-3 with gcc-2.95.2 -g -O2 produces an ICE.
I'd agree that this is difficult to test for, because gcc 2.95 will
crash for many reasons.
Regards,
Martin