From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1E3E3858C2C; Sun, 9 Jul 2023 18:31:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1E3E3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688927492; bh=ED1Hev4BBB6IbZp9QnN5k1i1oyGOjve9Xbyw866eKwc=; h=From:To:Subject:Date:From; b=aMWpYfuVe2h3LKQp6Xw1/RF5siX+nJGyWMr0j5nwyeIbAuictDpxWp7tAbLwu0QpV JiA8zr/hQcsMVzS2hqUQGy4um9EkMir49tUoN35krR3qad9z4mTetgJr7kpSaItzuG 88OBDZVz6Xuz58bdZOoAIaZnJU0EUCryF0iAfILw= From: "sagebar at web dot de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sagebar at web dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110607 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 =3D \ > 180 CFLAGS=3D"$(CFLAGS_FOR_BUILD)" \ > 181 LDFLAGS=3D"$(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 =3D \ > 180 CFLAGS=3D"$(CFLAGS_FOR_BUILD)" \ > 181 CXXFLAGS=3D"$(CXXFLAGS_FOR_BUILD)" \ > 182 LDFLAGS=3D"$(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 a= lso get used when building build-tools (which causes breakage)=