diff mbox

Use C++ in COMPILER_FOR_BUILD if needed (issue6191056)

Message ID 4FA9A60A.4030307@google.com
State New
Headers show

Commit Message

Diego Novillo May 8, 2012, 11:02 p.m. UTC
On 12-05-08 15:46 , Diego Novillo wrote:
> Found this while testing the C++ conversion for vec.[ch] on the
> cxx-conversion branch.  We do not build the build/*.o files with g++,
> so I was getting lots of syntax errors while compiling build/vec.o.
>
> I am not completely sure if the changes are correct.  But it works for
> me.
>
> Tested on x86_64.  OK for trunk?
>
> 2012-05-08   Diego Novillo<dnovillo@google.com>
>
> 	* Makefile.in (CXX_FOR_BUILD): Define.
> 	(BUILD_CXX_FLAGS): Define
> 	(COMPILER_FOR_BUILD): Set to CXX_FOR_BUILD if building with C++.
> 	(LINKER_FOR_BUILD): Likewise.
> 	(BUILD_COMPILERFLAGS): Set to BUILD_CXXFLAGS if building with C++.
> 	(BUILD_LINKERFLAGS): Likewise.


I forgot to include the changes needed in configure.ac to export 
CXX_FOR_BUILD.

Without this, incremental builds from <build>/gcc will fail because
the value of CXX_FOR_BUILD will not be set.

Tested on x86_64.  OK for trunk?


2012-05-08   Diego Novillo  <dnovillo@google.com>

         * configure.ac (CXX_FOR_BUILD): Define and substitute.
         * configure: Regenerate.
diff mbox

Patch

diff --git a/gcc/configure.ac b/gcc/configure.ac
index b3cfed4..a05f4f9 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1848,6 +1848,7 @@  AC_SUBST(inhibit_libc)

  # These are the normal (build=host) settings:
  CC_FOR_BUILD='$(CC)'           AC_SUBST(CC_FOR_BUILD)
+CXX_FOR_BUILD='$(CXX)'         AC_SUBST(CXX_FOR_BUILD)
  BUILD_CFLAGS='$(ALL_CFLAGS)'   AC_SUBST(BUILD_CFLAGS)
  BUILD_LDFLAGS='$(LDFLAGS)'     AC_SUBST(BUILD_LDFLAGS)
  STMP_FIXINC=stmp-fixinc                AC_SUBST(STMP_FIXINC)