]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
glibc: Enable build for armv5tel.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Nov 2011 23:02:08 +0000 (00:02 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Nov 2011 23:02:08 +0000 (00:02 +0100)
glibc/glibc.nm
glibc/patches/glibc-2.14-arm-hardened.patch0 [new file with mode: 0644]

index cf2259edd8bd35f13b6980f26facce83cea0808e..626bc5b40593f046d961b36cce3a37a86e70f307 100644 (file)
@@ -63,6 +63,11 @@ build
        prepare_cmds
                ln -svf ../glibc-ports-%{ports_version} ports
 
+               if [ "%{DISTRO_ARCH}" = "armv5tel" ]; then
+                       sed -i configure \
+                               "s/libc_cv_gcc_static_libgcc=-static-libgcc/libc_cv_gcc_static_libgcc=/"
+               fi
+
                # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
                # unknown whether this is a bash bug or a Glibc problem. Disable
                # installation of this locale in order to avoid the problem.
diff --git a/glibc/patches/glibc-2.14-arm-hardened.patch0 b/glibc/patches/glibc-2.14-arm-hardened.patch0
new file mode 100644 (file)
index 0000000..0a1080a
--- /dev/null
@@ -0,0 +1,48 @@
+patch by David Lamparter to fix build errors for hardened/arm systems.
+the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
+whether the code is going into a shared library when it should be using
+"SHARED".  otherwise, building static PIC code goes wrong.
+
+https://bugs.gentoo.org/336914
+http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
+
+--- ports/sysdeps/arm/eabi/setjmp.S
++++ ports/sysdeps/arm/eabi/setjmp.S
+@@ -37,7 +37,7 @@
+       add     a3, a3, a4
+       ldr     a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ #else
+-#ifdef PIC
++#ifdef SHARED
+       ldr     a3, 1f
+       ldr     a4, Lrtld_global_ro
+ 0:    add     a3, pc, a3
+@@ -84,7 +84,7 @@
+ Lrtld_local_ro:
+       .long   C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+ #else
+-#ifdef PIC
++#ifdef SHARED
+ 1:    .long   _GLOBAL_OFFSET_TABLE_ - 0b - 8
+ Lrtld_global_ro:
+       .long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+--- ports/sysdeps/arm/eabi/__longjmp.S
++++ ports/sysdeps/arm/eabi/__longjmp.S
+@@ -43,7 +43,7 @@
+       add     a2, a2, a3
+       ldr     a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ #else
+-#ifdef PIC
++#ifdef SHARED
+       ldr     a2, 1f
+       ldr     a3, Lrtld_global_ro
+ 0:    add     a2, pc, a2
+@@ -87,7 +87,7 @@
+ Lrtld_local_ro:
+       .long   C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+ #else
+-#ifdef PIC
++#ifdef SHARED
+ 1:    .long   _GLOBAL_OFFSET_TABLE_ - 0b - 8
+ Lrtld_global_ro:
+       .long   C_SYMBOL_NAME(_rtld_global_ro)(GOT)