This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: enabling -O2 with gcc 2.96 and later


> No offense intended, but so is this second attempt, IMHO :-)
> 
> How about:
> 
> AC_EGREP_CPP([ok], [
> #if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
> ok
> #fi
> ], [OPTLEVEL='-O2'], [OPTLEVEL=])
> AC_SUBST(OPTLEVEL)

I did not follow this closely, but I think checking version numbers in
autoconf is morally wrong. What is the reason not to use -O2 in
earlier versions? Something is miscompiled? Well, check for the
miscompilation then, instead of the version number.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]