toolchain/gcc: update 4.7-linaro to 2013.03
[openwrt/openwrt.git] / rules.mk
index 53d4468..17b71f9 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -60,7 +60,7 @@ ifneq ($(filter -march=armv%,$(TARGET_OPTIMIZATION)),)
   ARCH_SUFFIX:=_$(patsubst -march=arm%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
   GCC_ARCH:=$(patsubst -march=%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
 endif
-ifneq ($(findstring -mips32r2,$(TARGET_OPTIMIZATION)),)
+ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),)
   ARCH_SUFFIX:=_r2
 endif
 ifdef CONFIG_HAS_SPE_FPU
@@ -175,6 +175,7 @@ PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
 export PKG_CONFIG
 
 HOSTCC:=gcc
+HOSTCXX:=g++
 HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include
 HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
 HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib
@@ -196,6 +197,7 @@ INSTALL_CONF:=install -m0600
 TARGET_CC_NOCACHE:=$(TARGET_CC)
 TARGET_CXX_NOCACHE:=$(TARGET_CXX)
 HOSTCC_NOCACHE:=$(HOSTCC)
+HOSTCXX_NOCACHE:=$(HOSTCXX)
 export TARGET_CC_NOCACHE
 export TARGET_CXX_NOCACHE
 export HOSTCC_NOCACHE
@@ -204,6 +206,7 @@ ifneq ($(CONFIG_CCACHE),)
   TARGET_CC:= ccache_cc
   TARGET_CXX:= ccache_cxx
   HOSTCC:= ccache $(HOSTCC)
+  HOSTCXX:= ccache $(HOSTCXX)
 endif
 
 TARGET_CONFIGURE_OPTS = \