aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-11-05 12:58:20 -0700
committerKhem Raj <raj.khem@gmail.com>2010-11-05 13:00:12 -0700
commit960846ba91afc8b75520671b719ee2c899cb1693 (patch)
treeac23ba7c66b66ad7e73b92a156fb4946fd29eef3
parentd4c084b2e51748cfb50c73b65348303af9235122 (diff)
downloadopenembedded-960846ba91afc8b75520671b719ee2c899cb1693.zip
openembedded-960846ba91afc8b75520671b719ee2c899cb1693.tar.gz
openembedded-960846ba91afc8b75520671b719ee2c899cb1693.tar.bz2
gcc-4.5.inc: Fix code generation for armv4 with EABI
Also bump to latest SVN REV Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes/gcc/gcc-4.5.inc5
-rw-r--r--recipes/gcc/gcc-4.5/gcc-armv4-pass-fix-v4bx-to-ld.patch29
2 files changed, 32 insertions, 2 deletions
diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index c9412e6..910be9c 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 0000000..5d1a033
--- /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. */