public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: grozin@gentoo.org
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Should this be considered a gcc bug?
Date: Tue, 21 Apr 2015 09:57:16 +0600 (NOVT)	[thread overview]
Message-ID: <alpine.LRH.2.11.1504210940150.65217@star.inp.nsk.su> (raw)

Hello *,

There was a bug #526194 - dev-lisp/sbcl does not respect CFLAGS. It was 
"fixed" by Mark Wright <gienah@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	other threads:[~2015-04-21  3:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  3:57 grozin [this message]
2015-04-21  4:35 ` [gentoo-dev] Should this be considered a gcc bug? Andrew Savchenko
2015-04-21  5:18 ` Jeroen Roovers
2015-04-21 15:02 ` William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.11.1504210940150.65217@star.inp.nsk.su \
    --to=grozin@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox