This is an updated version of a patch Debian and Ubuntu are using to
use an alternate linker path for hardfloat binaries. The difference
with this one is that it covers the case where no float flag
was passed in, defaulting to the softfloat path.

2012-03-29  dann frazier <dann.fraz...@canonical.com>

        * config/arm/linux-elf.h: Use alternate linker path
          for hardfloat ABI

Index: gcc/config/arm/linux-elf.h
===================================================================
--- gcc/config/arm/linux-elf.h  (revision 185708)
+++ gcc/config/arm/linux-elf.h  (working copy)
@@ -59,14 +59,21 @@
 
 #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
 
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define LINUX_DYNAMIC_LINKER_SF "/lib/ld-linux.so.3"
+#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3"
 
 #define LINUX_TARGET_LINK_SPEC  "%{h*} \
    %{static:-Bstatic} \
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
    %{rdynamic:-export-dynamic} \
-   -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
+   %{msoft-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
+   %{mfloat-abi=soft*:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
+   %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
+   %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
+   %{!mfloat-abi: \
+     %{!msoft-float: \
+       %{!mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "}}} \
    -X \
    %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
    SUBTARGET_EXTRA_LINK_SPEC

Reply via email to