From b4f5e1078b7eaea5524061ff0bd4134d2d9988de Mon Sep 17 00:00:00 2001 From: Ken Werner Date: Mon, 4 Jun 2012 16:29:30 +0200 Subject: Add armhf-loader.patch for Linaro GCC 4.6 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 --- recipes-devtools/gcc/gcc-linaro-4.6.inc | 1 + .../gcc/gcc-linaro-4.6/armhf-loader.patch | 47 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 recipes-devtools/gcc/gcc-linaro-4.6/armhf-loader.patch 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. */ -- cgit v1.2.3