Hello *,

There was a bug #526194 - dev-lisp/sbcl does not respect CFLAGS. It was "fixed" by Mark Wright <gie...@gentoo.org> on Jan 31 - Feb 1. However, after this fix the upstream CFLAGS were appended to the user-supplyed ${CFLAGS}. And the upstream CFLAGS contain -O3. So, is a user has, e.g., -O2 in his/her ${CFLAGS}, it was silently replaced by -O3. For some time, nobody noticed this: gcc-4.8 happily compiled the C stuff in sbcl with -O3.

However, after the upgrade to gcc-4.9 problems began (bug #544070). On amd64, gcc is still happy co compile sbcl with -O3. However, on x86 this leads to a crash of a freshly compiled sbcl runtime. Namely, the combinations

-O2 -march=<something>
-O3

behave correctly, and produce a working sbcl; but

-O3 -march=<something>

lead to the crush. I have changed the above "fix" in sbcl-1.2.10 in such a way that now it appends only -g -Wall -Wsign-compare to ${CFLAGS}, but not -O3. This resolves the bug #544070, unless a user has -O3 -march=<something> in his/her ${CFLAGS}.

Shouldn't gcc-4.9 on x86 produce with -O3 something functionally equivalent to the -O2 case, only more optimized? Should this be considered a gcc-4.9 bug?

Andrey

Reply via email to