From 251a81393389b99059cdb1461dd9633e830b6243 Mon Sep 17 00:00:00 2001 From: kaloz Date: Fri, 25 Feb 2011 16:52:25 +0000 Subject: [PATCH] We use different toolchain directories for different 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25705 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- rules.mk | 18 ++++++------------ toolchain/Config.in | 2 -- toolchain/gcc/common.mk | 4 ++++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/rules.mk b/rules.mk index b69769aa4..b778a2e84 100644 --- 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 diff --git a/toolchain/Config.in b/toolchain/Config.in index 318847f73..bc9e6df06 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -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 diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 0f22e4102..888cf7a1e 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -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) \ -- 2.20.1