]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
gcc: Change runtime linker on armv7hl to ld-linux-armhf.so.3.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jul 2012 09:32:53 +0000 (11:32 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jul 2012 09:32:53 +0000 (11:32 +0200)
Fixes #10177.

gcc/gcc.nm
gcc/patches/gcc-4.7-arm-hfp-ldso.patch0 [new file with mode: 0644]

index dbd1fcbf47f70a247141986f180cb869b629d395..69f6fd2b1f8861b81a5883a0cd957883da6eda89 100644 (file)
@@ -8,7 +8,7 @@ build_cloog_ppl = 1
 
 name       = gcc
 version    = 4.7.1
-release    = 2
+release    = 3
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = Development/Compilers
@@ -36,7 +36,7 @@ build
                expect
                filesystem >= 002
                flex
-               glibc-devel
+               glibc-devel >= 2.16
                gmp-devel
                libffi-devel
                libmpc-devel
@@ -299,6 +299,7 @@ packages
                requires
                        binutils >= %{required_binutils_version}
                        filesystem >= 002
+                       glibc >= 2.16
                        glibc-devel
                        gmp-devel
                        cpp = %{thisver}
diff --git a/gcc/patches/gcc-4.7-arm-hfp-ldso.patch0 b/gcc/patches/gcc-4.7-arm-hfp-ldso.patch0
new file mode 100644 (file)
index 0000000..2f0b8c4
--- /dev/null
@@ -0,0 +1,52 @@
+2012-05-01  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef
+       comparing enumeration values.  Update comments.
+
+2012-04-26  Michael Hope  <michael.hope@linaro.org>
+           Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
+       (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
+       (GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
+       (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
+
+--- gcc/config/arm/linux-eabi.h        (revision 186858)
++++ gcc/config/arm/linux-eabi.h        (revision 187012)
+@@ -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 "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/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.  */