public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/25672] [4.6/4.7/4.8 Regression] cross build's libgcc picks up CFLAGS
Date: Tue, 15 Jan 2013 15:03:00 -0000	[thread overview]
Message-ID: <bug-25672-4-60CZ24ujn6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-25672-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #33 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-15 15:02:54 UTC ---
Re-confirmed on the 4.7 branch.  configury now has

# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
# We want to ensure that TARGET libraries (which we know are built with
# gcc) are built with "-O2 -g", so include those options when setting
# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
if test "x$CFLAGS_FOR_TARGET" = x; then
  CFLAGS_FOR_TARGET=$CFLAGS
  case " $CFLAGS " in
    *" -O2 "*) ;;
    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
  esac
  case " $CFLAGS " in
    *" -g "* | *" -g3 "*) ;;
    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
  esac
fi
AC_SUBST(CFLAGS_FOR_TARGET)
...
(likewise CXXFLAGS_FOR_TARGET)

but substituting CFLAGS here is certainly wrong.  The above seems to be
overeagerly trying to honor CFLAGS more broadly as a convenience.  But
doing so when build != target looks wrong.

As alternative it should be documented that CFLAGS also applies to
target libraries unless CFLAGS_FOR_TARGET is set.


  parent reply	other threads:[~2013-01-15 15:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-25672-4@http.gcc.gnu.org/bugzilla/>
2010-09-26 19:36 ` [Bug bootstrap/25672] [4.3/4.4?/4.5 regression] " pluto at agmk dot net
2011-06-27 15:05 ` rguenth at gcc dot gnu.org
2012-03-13 15:11 ` [Bug bootstrap/25672] [4.4?/4.5 " jakub at gcc dot gnu.org
2012-03-27  8:40 ` [Bug bootstrap/25672] [4.5 Regression] " rguenth at gcc dot gnu.org
2012-03-27 18:53 ` pluto at agmk dot net
2012-07-02  9:26 ` [Bug bootstrap/25672] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2013-01-15 15:03 ` rguenth at gcc dot gnu.org [this message]
2013-04-12 15:18 ` [Bug bootstrap/25672] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-05-11 12:37 ` [Bug bootstrap/25672] [4.7/4.8/4.9/4.10 " pinskia at gcc dot gnu.org
2014-05-11 18:48 ` olegendo at gcc dot gnu.org
2014-06-12 13:49 ` rguenth at gcc dot gnu.org
2014-12-19 13:33 ` [Bug bootstrap/25672] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-03-09 20:47 ` aldyh at gcc dot gnu.org
2015-03-10  7:59 ` olegendo at gcc dot gnu.org
2015-03-10 16:38 ` aldyh at gcc dot gnu.org
2015-03-10 16:40 ` [Bug bootstrap/25672] [4.8/4.9 " aldyh at gcc dot gnu.org
2015-06-23  8:25 ` rguenth at gcc dot gnu.org
2015-06-26 20:01 ` [Bug bootstrap/25672] [4.9 " jakub at gcc dot gnu.org
2015-06-26 20:31 ` jakub at gcc dot gnu.org

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=bug-25672-4-60CZ24ujn6@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).