Mercurial > hg > truffle
diff make/linux/makefiles/gcc.make @ 5897:7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
Reviewed-by: dholmes, ohrstrom, ohair, jcoomes
author | erikj |
---|---|
date | Wed, 22 Feb 2012 09:24:35 +0100 |
parents | 719f7007c8e8 |
children | 3d7ea1dbe0de |
line wrap: on
line diff
--- a/make/linux/makefiles/gcc.make Wed Feb 22 10:32:29 2012 -0800 +++ b/make/linux/makefiles/gcc.make Wed Feb 22 09:24:35 2012 +0100 @@ -25,21 +25,26 @@ #------------------------------------------------------------------------ # CC, CXX & AS -# When cross-compiling the ALT_COMPILER_PATH points -# to the cross-compilation toolset -ifdef CROSS_COMPILE_ARCH -CXX = $(ALT_COMPILER_PATH)/g++ -CC = $(ALT_COMPILER_PATH)/gcc -HOSTCXX = g++ -HOSTCC = gcc -else -CXX = g++ -CC = gcc -HOSTCXX = $(CXX) -HOSTCC = $(CC) +# If a SPEC is not set already, then use these defaults. +ifeq ($(SPEC),) + # When cross-compiling the ALT_COMPILER_PATH points + # to the cross-compilation toolset + ifdef CROSS_COMPILE_ARCH + CXX = $(ALT_COMPILER_PATH)/g++ + CC = $(ALT_COMPILER_PATH)/gcc + HOSTCXX = g++ + HOSTCC = gcc + STRIP = $(ALT_COMPILER_PATH)/strip + else + CXX = g++ + CC = gcc + HOSTCXX = $(CXX) + HOSTCC = $(CC) + STRIP = strip + endif + AS = $(CC) -c endif -AS = $(CC) -c # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only # prints the numbers (e.g. "2.95", "3.2.1") @@ -261,9 +266,3 @@ ifdef MINIMIZE_RAM_USAGE CFLAGS += -DMINIMIZE_RAM_USAGE endif - -ifdef CROSS_COMPILE_ARCH - STRIP = $(ALT_COMPILER_PATH)/strip -else - STRIP = strip -endif