mirror of git://gcc.gnu.org/git/gcc.git
Fix compilation of build/*.o when using C++.
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. 2012-05-31 Diego Novillo <dnovillo@google.com> * configure.ac (CXX_FOR_BUILD): Define and substitute. (BUILD_CXXFLAGS): Define and substitute. * Makefile.in (BUILD_CXXFLAGS): Define. (CXX_FOR_BUILD): 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. * configure: Regenerate. From-SVN: r188069
This commit is contained in:
parent
6f4185d786
commit
bdd5dc28aa
|
@ -1,3 +1,15 @@
|
||||||
|
2012-05-31 Diego Novillo <dnovillo@google.com>
|
||||||
|
|
||||||
|
* configure.ac (CXX_FOR_BUILD): Define and substitute.
|
||||||
|
(BUILD_CXXFLAGS): Define and substitute.
|
||||||
|
* Makefile.in (BUILD_CXXFLAGS): Define.
|
||||||
|
(CXX_FOR_BUILD): 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.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
|
2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
* Makefile.in: Fix many dependencies.
|
* Makefile.in: Fix many dependencies.
|
||||||
|
|
|
@ -728,15 +728,27 @@ DIR = ../gcc
|
||||||
|
|
||||||
# Native compiler for the build machine and its switches.
|
# Native compiler for the build machine and its switches.
|
||||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||||
|
CXX_FOR_BUILD = @CXX_FOR_BUILD@
|
||||||
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
|
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
|
||||||
|
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
|
||||||
|
|
||||||
# Native compiler that we use. This may be C++ some day.
|
# Native compiler that we use. This may be C++ some day.
|
||||||
|
ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
|
||||||
COMPILER_FOR_BUILD = $(CC_FOR_BUILD)
|
COMPILER_FOR_BUILD = $(CC_FOR_BUILD)
|
||||||
BUILD_COMPILERFLAGS = $(BUILD_CFLAGS)
|
BUILD_COMPILERFLAGS = $(BUILD_CFLAGS)
|
||||||
|
else
|
||||||
|
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
|
||||||
|
BUILD_COMPILERFLAGS = $(BUILD_CXXFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Native linker that we use.
|
# Native linker that we use.
|
||||||
|
ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
|
||||||
LINKER_FOR_BUILD = $(CC_FOR_BUILD)
|
LINKER_FOR_BUILD = $(CC_FOR_BUILD)
|
||||||
BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
|
BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
|
||||||
|
else
|
||||||
|
LINKER_FOR_BUILD = $(CXX_FOR_BUILD)
|
||||||
|
BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Native linker and preprocessor flags. For x-fragment overrides.
|
# Native linker and preprocessor flags. For x-fragment overrides.
|
||||||
BUILD_LDFLAGS=@BUILD_LDFLAGS@
|
BUILD_LDFLAGS=@BUILD_LDFLAGS@
|
||||||
|
|
|
@ -703,7 +703,9 @@ LIBTOOL
|
||||||
collect2
|
collect2
|
||||||
STMP_FIXINC
|
STMP_FIXINC
|
||||||
BUILD_LDFLAGS
|
BUILD_LDFLAGS
|
||||||
|
BUILD_CXXFLAGS
|
||||||
BUILD_CFLAGS
|
BUILD_CFLAGS
|
||||||
|
CXX_FOR_BUILD
|
||||||
CC_FOR_BUILD
|
CC_FOR_BUILD
|
||||||
inhibit_libc
|
inhibit_libc
|
||||||
SYSTEM_HEADER_DIR
|
SYSTEM_HEADER_DIR
|
||||||
|
@ -11835,7 +11837,9 @@ fi
|
||||||
|
|
||||||
# These are the normal (build=host) settings:
|
# These are the normal (build=host) settings:
|
||||||
CC_FOR_BUILD='$(CC)'
|
CC_FOR_BUILD='$(CC)'
|
||||||
|
CXX_FOR_BUILD='$(CXX)'
|
||||||
BUILD_CFLAGS='$(ALL_CFLAGS)'
|
BUILD_CFLAGS='$(ALL_CFLAGS)'
|
||||||
|
BUILD_CXXFLAGS='$(ALL_CXXFLAGS)'
|
||||||
BUILD_LDFLAGS='$(LDFLAGS)'
|
BUILD_LDFLAGS='$(LDFLAGS)'
|
||||||
STMP_FIXINC=stmp-fixinc
|
STMP_FIXINC=stmp-fixinc
|
||||||
|
|
||||||
|
@ -17967,7 +17971,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 17970 "configure"
|
#line 17974 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -18073,7 +18077,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 18076 "configure"
|
#line 18080 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
|
|
@ -1848,7 +1848,9 @@ AC_SUBST(inhibit_libc)
|
||||||
|
|
||||||
# These are the normal (build=host) settings:
|
# These are the normal (build=host) settings:
|
||||||
CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
|
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_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
|
||||||
|
BUILD_CXXFLAGS='$(ALL_CXXFLAGS)' AC_SUBST(BUILD_CXXFLAGS)
|
||||||
BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
|
BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
|
||||||
STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
|
STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue