We use different toolchain directories for different
authorImre Kaloz <kaloz@openwrt.org>
Fri, 25 Feb 2011 16:52:25 +0000 (16:52 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Fri, 25 Feb 2011 16:52:25 +0000 (16:52 +0000)
ARM archs, so we should set the default arch of gcc
to reflect this.

This enables EABI support for armv4 CPUs.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
SVN-Revision: 25705

rules.mk
toolchain/Config.in
toolchain/gcc/common.mk

index b69769aa407ecb92fcc0898a13bc5b424d7dac4d..b778a2e84e86fd87277c6d3bb5b51f617824be4b 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -54,21 +54,15 @@ endif
 HOST_FPIC:=-fPIC
 
 ARCH_SUFFIX:=
+GCC_ARCH:=
+
+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)),)
   ARCH_SUFFIX:=_r2
 endif
-ifneq ($(findstring -march=armv4,$(TARGET_OPTIMIZATION)),)
-  ARCH_SUFFIX:=_v4
-endif
-ifneq ($(findstring -march=armv4t,$(TARGET_OPTIMIZATION)),)
-  ARCH_SUFFIX:=_v4t
-endif
-ifneq ($(findstring -march=armv5t,$(TARGET_OPTIMIZATION)),)
-  ARCH_SUFFIX:=_v5t
-endif
-ifneq ($(findstring -march=armv5te,$(TARGET_OPTIMIZATION)),)
-  ARCH_SUFFIX:=_v5te
-endif
 ifdef CONFIG_HAS_SPE_FPU
   TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
 endif
index 318847f736922ed8f613c52a46760c0886c35fc2..bc9e6df06d22f44f1bace8d07ab96749fe2d87cf 100644 (file)
@@ -90,8 +90,6 @@ config EABI_SUPPORT
        bool
        depends arm||armeb
        prompt "Enable EABI support" if TOOLCHAINOPTS
-       default n if TARGET_gemini
-       default n if TARGET_cns21xx
        default y
        help
          Enable ARM EABI support
index 0f22e4102140e11b109b54d876315fc4fc0f9efc..888cf7a1e5a8e846cc3dd95c2e421d42cb4d6637 100644 (file)
@@ -167,6 +167,10 @@ ifdef CONFIG_powerpc
   TARGET_CFLAGS := $(patsubst -Os,-O2,$(TARGET_CFLAGS))
 endif
 
+ifneq ($(GCC_ARCH),)
+  GCC_CONFIGURE+= --with-arch=$(GCC_ARCH)
+endif
+
 GCC_MAKE:= \
        export SHELL="$(BASH)"; \
        $(MAKE) $(TOOLCHAIN_JOBS) \