From: Michael Tremer Date: Mon, 28 Nov 2011 23:02:08 +0000 (+0100) Subject: glibc: Enable build for armv5tel. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8827f595cee31cf4e74ce16c82c451e14e2a4a0b;p=ipfire-3.x.git glibc: Enable build for armv5tel. --- diff --git a/glibc/glibc.nm b/glibc/glibc.nm index cf2259edd..626bc5b40 100644 --- a/glibc/glibc.nm +++ b/glibc/glibc.nm @@ -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 index 000000000..0a1080a76 --- /dev/null +++ b/glibc/patches/glibc-2.14-arm-hardened.patch0 @@ -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)