From 960846ba91afc8b75520671b719ee2c899cb1693 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 5 Nov 2010 12:58:20 -0700 Subject: gcc-4.5.inc: Fix code generation for armv4 with EABI Also bump to latest SVN REV Signed-off-by: Khem Raj --- recipes/gcc/gcc-4.5.inc | 5 ++-- .../gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch | 29 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 recipes/gcc/gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc index c9412e68d2..910be9ca8e 100644 --- a/recipes/gcc/gcc-4.5.inc +++ b/recipes/gcc/gcc-4.5.inc @@ -8,9 +8,9 @@ DEPENDS = "mpfr gmp libmpc libelf" NATIVEDEPS = "mpfr-native gmp-native libmpc-native" -INC_PR = "r17" +INC_PR = "r18" -SRCREV = "165931" +SRCREV = "166342" PV = "4.5" # BINV should be incremented after updating to a revision # after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made @@ -31,6 +31,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \ file://libstdc++-emit-__cxa_end_cleanup-in-text.patch \ file://arm-bswapsi2.patch \ file://Makefile.in.patch \ + file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ file://linaro/gcc-4.5-linaro-r99297.patch \ file://linaro/gcc-4.5-linaro-r99298.patch \ file://linaro/gcc-4.5-linaro-r99299.patch \ diff --git a/recipes/gcc/gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch b/recipes/gcc/gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch new file mode 100644 index 0000000000..5d1a033a9b --- /dev/null +++ b/recipes/gcc/gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch @@ -0,0 +1,29 @@ +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream + +-Khem +Index: gcc-4.5/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.5.orig/gcc/config/arm/linux-eabi.h ++++ gcc-4.5/gcc/config/arm/linux-eabi.h +@@ -63,10 +63,14 @@ + #undef GLIBC_DYNAMIC_LINKER + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4:--fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC LINUX_TARGET_LINK_SPEC BE8_LINK_SPEC ++#define LINK_SPEC LINUX_TARGET_LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC + + /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we + do not use -lfloat. */ -- cgit 1.2.3-korg