public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sagebar at web dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/110607] New: Makefile.in build broken build-tools when CXXFLAGS is defined
Date: Sun, 09 Jul 2023 18:31:32 +0000	[thread overview]
Message-ID: <bug-110607-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110607

            Bug ID: 110607
           Summary: Makefile.in build broken build-tools when CXXFLAGS is
                    defined
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sagebar at web dot de
  Target Milestone: ---

This part in the main makefile:

> 177 # These variables must be set on the make command line for directories
> 178 # built for the build system to override those in BASE_FLAGS_TO_PASS.
> 179 EXTRA_BUILD_FLAGS = \
> 180         CFLAGS="$(CFLAGS_FOR_BUILD)" \
> 181         LDFLAGS="$(LDFLAGS_FOR_BUILD)"

Should instead be:

> 177 # These variables must be set on the make command line for directories
> 178 # built for the build system to override those in BASE_FLAGS_TO_PASS.
> 179 EXTRA_BUILD_FLAGS = \
> 180         CFLAGS="$(CFLAGS_FOR_BUILD)" \
> 181         CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
> 182         LDFLAGS="$(LDFLAGS_FOR_BUILD)"

Since some components of the build system are compiled as c++, if one wants to
define custom CXX-flags in cross-compilation situations, these flags then also
get used when building build-tools (which causes breakage)

             reply	other threads:[~2023-07-09 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 18:31 sagebar at web dot de [this message]
2023-07-09 18:45 ` [Bug bootstrap/110607] Makefile.in builds " pinskia at gcc dot gnu.org
2023-07-09 22:22 ` sagebar at web dot de

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-110607-4@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).