diff mbox series

Add CXX_FOR_BUILD to HOST_EXPORTS

Message ID 20190618213404.11880-1-mforney@mforney.org
State New
Headers show
Series Add CXX_FOR_BUILD to HOST_EXPORTS | expand

Commit Message

Michael Forney June 18, 2019, 9:34 p.m. UTC
gcc/configure needs this to generate auto-build.h using the right C++
compiler.

2019-06-18  Michael Forney  <mforney@mforney.org>

	* Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD.
	* Makefile.in: Regenerate.

---
I ran into this since I needed to pass some special flags to the build
C++ compiler for my system and was getting the mysterious error

	make[3]: *** No rule to make target 'auto-build.h', needed by 'build/genmddeps.o'.  Stop.

Turns out this was because the sub-configure run by gcc/configure was
failing because my CXX_FOR_BUILD was being ignored, but it is not treated
as a fatal error (#65794). The configure directory containing config.log
is subsequently deleted, making it difficult to figure out what actually
went wrong.

 Makefile.in  | 1 +
 Makefile.tpl | 1 +
 2 files changed, 2 insertions(+)

Comments

Jeff Law Aug. 23, 2019, 9:37 p.m. UTC | #1
On 6/18/19 3:34 PM, Michael Forney wrote:
> 2019-06-18  Michael Forney  <mforney@mforney.org>
> 
> 	* Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD.
> 	* Makefile.in: Regenerate.
THanks.  I've installed this on the trunk.

jeff
diff mbox series

Patch

diff --git a/Makefile.in b/Makefile.in
index 02cc7a39094..86c0c6d5b2d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -198,6 +198,7 @@  HOST_EXPORTS = \
 	AR="$(AR)"; export AR; \
 	AS="$(AS)"; export AS; \
 	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+	CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
 	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
 	LD="$(LD)"; export LD; \
 	LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \
diff --git a/Makefile.tpl b/Makefile.tpl
index 1cdc023c82f..efed1511750 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -201,6 +201,7 @@  HOST_EXPORTS = \
 	AR="$(AR)"; export AR; \
 	AS="$(AS)"; export AS; \
 	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+	CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
 	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
 	LD="$(LD)"; export LD; \
 	LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \