Patchwork [cxx-conversion] COMPILER_FOR_BUILD in C++ mode

login
register
mail settings
Submitter Pedro Lamarão
Date April 14, 2012, 9:55 p.m.
Message ID <jmcrkn$arb$1@dough.gmane.org>
Download mbox | patch
Permalink /patch/152574/
State New
Headers show

Comments

Pedro Lamarão - April 14, 2012, 9:55 p.m.
2012-04-14   Pedro Lamarão  <pedro.lamarao@gmail.com>

	* Makefile.in: define COMPILER_FOR_BUILD etc. conditionally
	according with ENABLE_BUILD_WITH_CXX.

Patch

--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -731,12 +731,22 @@  CC_FOR_BUILD = @CC_FOR_BUILD@
 BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
 
 # Native compiler that we use.  This may be C++ some day.
+ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
 COMPILER_FOR_BUILD = $(CC_FOR_BUILD)
 BUILD_COMPILERFLAGS = $(BUILD_CFLAGS)
+else
+COMPILER_FOR_BUILD = $(COMPILER)
+BUILD_COMPILERFLAGS = $(COMPILER_FLAGS) -DIN_GCC -DGENERATOR_FILE
+endif
 
 # Native linker that we use.
+ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
 LINKER_FOR_BUILD = $(CC_FOR_BUILD)
 BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
+else
+LINKER_FOR_BUILD = $(LINKER)
+BUILD_LINKERFLAGS = $(LINKER_FLAGS)
+endif
 
 # Native linker and preprocessor flags.  For x-fragment overrides.
 BUILD_LDFLAGS=@BUILD_LDFLAGS@