[oe-commits] Khem Raj : gcc-4.5.inc: Fix code generation for armv4 with EABI

git version control git at git.openembedded.org
Fri Nov 12 05:06:38 UTC 2010


Module: openembedded.git
Branch: testing-next
Commit: 960846ba91afc8b75520671b719ee2c899cb1693
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=960846ba91afc8b75520671b719ee2c899cb1693

Author: Khem Raj <raj.khem at gmail.com>
Date:   Fri Nov  5 12:58:20 2010 -0700

gcc-4.5.inc: Fix code generation for armv4 with EABI

Also bump to latest SVN REV

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 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(-)

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.  */





More information about the Openembedded-commits mailing list