Mercurial > hg > openjdk > icedtea > jdk7 > jdk
changeset 4522:766c048eb152
Allow the compiler used to be overridden by setting BUILD_GCC/BUILD_CPP.
author | andrew |
---|---|
date | Fri, 29 Jul 2011 03:58:51 +0100 |
parents | 2512ff54e498 |
children | ccf86bbc61fd |
files | make/common/shared/Compiler-gcc.gmk |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/make/common/shared/Compiler-gcc.gmk Fri Jul 29 02:35:52 2011 +0100 +++ b/make/common/shared/Compiler-gcc.gmk Fri Jul 29 03:58:51 2011 +0100 @@ -53,9 +53,17 @@ ifeq ($(PLATFORM), linux) + ifndef BUILD_GCC + BUILD_GCC=$(COMPILER_PATH)gcc + endif + + ifndef BUILD_CPP + BUILD_CPP=$(COMPILER_PATH)g++ + endif + # Settings specific to Linux - CC = $(COMPILER_PATH)gcc - CPP = $(COMPILER_PATH)gcc -E + CC = $(BUILD_GCC) + CPP = $(BUILD_GCC) -E # statically link libstdc++ before C++ ABI is stablized on Linux ifneq ($(STATIC_CXX),false) STATIC_CXX = true @@ -64,9 +72,9 @@ # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" # We need to use gcc to statically link the C++ runtime. gcc and g++ use # the same subprocess to compile C++ files, so it is OK to build using gcc. - CXX = $(COMPILER_PATH)gcc + CXX = $(BUILD_GCC) else - CXX = $(COMPILER_PATH)g++ + CXX = $(BUILD_CPP) endif # Option used to create a shared library SHARED_LIBRARY_FLAG = -shared -mimpure-text