aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Werner <ken.werner@linaro.org>2012-06-04 16:29:30 +0200
committerKen Werner <ken.werner@linaro.org>2012-06-04 16:29:30 +0200
commitb4f5e1078b7eaea5524061ff0bd4134d2d9988de (patch)
tree5a73fe3e52125b9a117b30f939c5ebd8e1071a69
parentff1b674025fec528f774b296bc1cf518eaf329ff (diff)
downloadmeta-linaro-4.7-2012.05.tar.gz
Add armhf-loader.patch for Linaro GCC 4.6binary-4.6-2012.034.7-2012.054.6-2012.05
This change fixes the name of the loader in case of ARM hard float. The patch is a backport of r114985 of Linaro GCC 4.7 which itself is a backport of r186859 and r187012 from mainline FSF. Signed-off-by: Ken Werner <ken.werner@linaro.org>
-rw-r--r--recipes-devtools/gcc/gcc-linaro-4.6.inc1
-rw-r--r--recipes-devtools/gcc/gcc-linaro-4.6/armhf-loader.patch47
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-linaro-4.6.inc b/recipes-devtools/gcc/gcc-linaro-4.6.inc
index 1277d15e..9f269c0d 100644
--- a/recipes-devtools/gcc/gcc-linaro-4.6.inc
+++ b/recipes-devtools/gcc/gcc-linaro-4.6.inc
@@ -8,6 +8,7 @@ BINV = "4.6.4"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gcc-${PV}' ], d)}"
SRC_URI = "https://launchpad.net/gcc-linaro/4.6/4.6-${RELEASE}/+download/gcc-${PV}-${RELEASE}.tar.bz2 \
+ file://armhf-loader.patch \
file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
file://64bithack.patch \
file://optional_libstdc.patch \
diff --git a/recipes-devtools/gcc/gcc-linaro-4.6/armhf-loader.patch b/recipes-devtools/gcc/gcc-linaro-4.6/armhf-loader.patch
new file mode 100644
index 00000000..f3afc929
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-linaro-4.6/armhf-loader.patch
@@ -0,0 +1,47 @@
+This patch changes the hard float loader path to /lib/ld-linux-armhf.so.3.
+It is a backport of r114985 of Linaro GCC 4.7 which itself is a backport of
+r186859 and r187012 from mainline FSF.
+
+Upstream-Status: Backport
+
+Index: gcc-linaro-4.6-2012.05/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-linaro-4.6-2012.05.orig/gcc/config/arm/linux-eabi.h
++++ gcc-linaro-4.6-2012.05/gcc/config/arm/linux-eabi.h
+@@ -32,7 +32,8 @@
+ while (false)
+
+ /* We default to a soft-float ABI so that binaries can run on all
+- target hardware. */
++ target hardware. If you override this to use the hard-float ABI then
++ change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+
+@@ -59,10 +60,23 @@
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+ #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
+
+-/* Use ld-linux.so.3 so that it will be possible to run "classic"
+- GNU/Linux binaries on an EABI system. */
++/* GNU/Linux on ARM currently supports three dynamic linkers:
++ - ld-linux.so.2 - for the legacy ABI
++ - ld-linux.so.3 - for the EABI-derived soft-float ABI
++ - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
++ All the dynamic linkers live in /lib.
++ We default to soft-float, but this can be overridden by changing both
++ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
++
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
++
++#define GLIBC_DYNAMIC_LINKER \
++ "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
++ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
++ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */