make/linux/makefiles/gcc.make

changeset 3600
7292cff45988
parent 3518
719f7007c8e8
child 3649
3d7ea1dbe0de
     1.1 --- a/make/linux/makefiles/gcc.make	Wed Feb 22 10:32:29 2012 -0800
     1.2 +++ b/make/linux/makefiles/gcc.make	Wed Feb 22 09:24:35 2012 +0100
     1.3 @@ -25,21 +25,26 @@
     1.4  #------------------------------------------------------------------------
     1.5  # CC, CXX & AS
     1.6  
     1.7 -# When cross-compiling the ALT_COMPILER_PATH points
     1.8 -# to the cross-compilation toolset
     1.9 -ifdef CROSS_COMPILE_ARCH
    1.10 -CXX = $(ALT_COMPILER_PATH)/g++
    1.11 -CC  = $(ALT_COMPILER_PATH)/gcc
    1.12 -HOSTCXX = g++
    1.13 -HOSTCC  = gcc
    1.14 -else
    1.15 -CXX = g++
    1.16 -CC  = gcc
    1.17 -HOSTCXX = $(CXX)
    1.18 -HOSTCC  = $(CC)
    1.19 +# If a SPEC is not set already, then use these defaults.
    1.20 +ifeq ($(SPEC),)
    1.21 +  # When cross-compiling the ALT_COMPILER_PATH points
    1.22 +  # to the cross-compilation toolset
    1.23 +  ifdef CROSS_COMPILE_ARCH
    1.24 +    CXX = $(ALT_COMPILER_PATH)/g++
    1.25 +    CC  = $(ALT_COMPILER_PATH)/gcc
    1.26 +    HOSTCXX = g++
    1.27 +    HOSTCC  = gcc
    1.28 +    STRIP = $(ALT_COMPILER_PATH)/strip
    1.29 +  else
    1.30 +    CXX = g++
    1.31 +    CC  = gcc
    1.32 +    HOSTCXX = $(CXX)
    1.33 +    HOSTCC  = $(CC)
    1.34 +    STRIP = strip
    1.35 +  endif
    1.36 +  AS  = $(CC) -c
    1.37  endif
    1.38  
    1.39 -AS  = $(CC) -c
    1.40  
    1.41  # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
    1.42  # prints the numbers (e.g. "2.95", "3.2.1")
    1.43 @@ -261,9 +266,3 @@
    1.44  ifdef MINIMIZE_RAM_USAGE
    1.45  CFLAGS += -DMINIMIZE_RAM_USAGE
    1.46  endif
    1.47 -
    1.48 -ifdef CROSS_COMPILE_ARCH
    1.49 -  STRIP = $(ALT_COMPILER_PATH)/strip
    1.50 -else
    1.51 -  STRIP = strip
    1.52 -endif

mercurial