mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
core/glibc patchins and fixins
This commit is contained in:
parent
ca9e3f37a7
commit
67114c114f
3 changed files with 87 additions and 6 deletions
|
@ -5,7 +5,8 @@
|
||||||
# NOTE: valgrind requires rebuilt with each major glibc version
|
# NOTE: valgrind requires rebuilt with each major glibc version
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - Patch glibc for ld-linux-armhf.so.3 and symlink ld-linux.so.3
|
# - Patch for ld-linux-armhf.so.3 transition and symlink ld-linux.so.3
|
||||||
|
# - Patch for hard-float ld.so.cache transition
|
||||||
# - Changed configure to enable ports add-on, specify our build host type
|
# - Changed configure to enable ports add-on, specify our build host type
|
||||||
# - Disabled distcc
|
# - Disabled distcc
|
||||||
|
|
||||||
|
@ -24,11 +25,12 @@ makedepends=('gcc>=4.7')
|
||||||
backup=(etc/gai.conf
|
backup=(etc/gai.conf
|
||||||
etc/locale.gen
|
etc/locale.gen
|
||||||
etc/nscd.conf)
|
etc/nscd.conf)
|
||||||
options=('!strip')
|
options=('!strip' '!distcc')
|
||||||
install=glibc.install
|
install=glibc.install
|
||||||
source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
|
source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
|
||||||
glibc-2.17-sync-with-linux37.patch
|
glibc-2.17-sync-with-linux37.patch
|
||||||
local-soname-hack.diff
|
local-soname-hack.diff
|
||||||
|
fix-hf-ld.so.cache.patch
|
||||||
nscd.service
|
nscd.service
|
||||||
nscd.tmpfiles
|
nscd.tmpfiles
|
||||||
locale.gen.txt
|
locale.gen.txt
|
||||||
|
@ -48,7 +50,10 @@ build() {
|
||||||
patch -p1 -i ${srcdir}/glibc-2.17-sync-with-linux37.patch
|
patch -p1 -i ${srcdir}/glibc-2.17-sync-with-linux37.patch
|
||||||
|
|
||||||
# ALARM: patch for hard-float ld-linux soname
|
# ALARM: patch for hard-float ld-linux soname
|
||||||
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && patch -p1 -i ${srcdir}/local-soname-hack.diff
|
if [[ $CARCH == "armv6h" || $CARCH == "armv7h" ]]; then
|
||||||
|
patch -p1 -i ${srcdir}/local-soname-hack.diff
|
||||||
|
patch -p1 -i ${srcdir}/fix-hf-ld.so.cache.patch
|
||||||
|
fi
|
||||||
|
|
||||||
cd ${srcdir}
|
cd ${srcdir}
|
||||||
mkdir glibc-build
|
mkdir glibc-build
|
||||||
|
@ -133,7 +138,7 @@ package() {
|
||||||
${srcdir}/glibc-${pkgver}/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
|
${srcdir}/glibc-${pkgver}/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
|
||||||
|
|
||||||
# ALARM: symlink ld-linux.so.3 for hard-float
|
# ALARM: symlink ld-linux.so.3 for hard-float
|
||||||
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && ln -s /lib/ld-${pkgver}.so ${pkgdir}/lib/ld-linux.so.3
|
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && ln -s /lib/ld-${pkgver}.so ${pkgdir}/usr/lib/ld-linux.so.3
|
||||||
|
|
||||||
# Do not strip the following files for improved debugging support
|
# Do not strip the following files for improved debugging support
|
||||||
# ("improved" as in not breaking gdb and valgrind...):
|
# ("improved" as in not breaking gdb and valgrind...):
|
||||||
|
@ -158,3 +163,12 @@ package() {
|
||||||
usr/lib/{libmemusage,libpcprofile,libSegFault}.so \
|
usr/lib/{libmemusage,libpcprofile,libSegFault}.so \
|
||||||
usr/lib/{pt_chown,{audit,gconv}/*.so}
|
usr/lib/{pt_chown,{audit,gconv}/*.so}
|
||||||
}
|
}
|
||||||
|
md5sums=('87bf675c8ee523ebda4803e8e1cec638'
|
||||||
|
'6db4d1661cf34282755dc90330465f6d'
|
||||||
|
'fb99380d94598cc76d793deebf630022'
|
||||||
|
'fa192d063312907797eb48f59da99588'
|
||||||
|
'dee46cbd2e544a61c263a0af39cc934c'
|
||||||
|
'ad8a9af15ab7eeaa23dc7ee85024af9f'
|
||||||
|
'bccbe5619e75cf1d97312ec3681c605c'
|
||||||
|
'07ac979b6ab5eeb778d55f041529d623'
|
||||||
|
'476e9113489f93b348b21e144b6a8fcf')
|
||||||
|
|
68
core/glibc/fix-hf-ld.so.cache.patch
Normal file
68
core/glibc/fix-hf-ld.so.cache.patch
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
diff --git a/elf/cache.c b/elf/cache.c
|
||||||
|
index 9901952..699550b 100644
|
||||||
|
--- a/elf/cache.c
|
||||||
|
+++ b/elf/cache.c
|
||||||
|
@@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
|
||||||
|
case FLAG_AARCH64_LIB64:
|
||||||
|
fputs (",AArch64", stdout);
|
||||||
|
break;
|
||||||
|
+ /* Uses the ARM soft-float ABI. */
|
||||||
|
+ case FLAG_ARM_LIBSF:
|
||||||
|
+ fputs (",soft-float", stdout);
|
||||||
|
+ break;
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
|
||||||
|
index 57a9a46..91190aa 100644
|
||||||
|
--- a/sysdeps/generic/ldconfig.h
|
||||||
|
+++ b/sysdeps/generic/ldconfig.h
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
#define FLAG_X8664_LIBX32 0x0800
|
||||||
|
#define FLAG_ARM_LIBHF 0x0900
|
||||||
|
#define FLAG_AARCH64_LIB64 0x0a00
|
||||||
|
+#define FLAG_ARM_LIBSF 0x0b00
|
||||||
|
|
||||||
|
/* Name of auxiliary cache. */
|
||||||
|
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
|
||||||
|
diff --git a/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h b/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
|
||||||
|
index acc4f28..1221181 100644
|
||||||
|
--- a/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
|
||||||
|
+++ b/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
|
||||||
|
@@ -18,12 +18,17 @@
|
||||||
|
|
||||||
|
#include <ldconfig.h>
|
||||||
|
|
||||||
|
+/* In order to support the transition from unmarked objects
|
||||||
|
+ to marked objects we must treat unmarked objects as
|
||||||
|
+ compatible with either FLAG_ARM_LIBHF or FLAG_ARM_LIBSF. */
|
||||||
|
#ifdef __ARM_PCS_VFP
|
||||||
|
# define _dl_cache_check_flags(flags) \
|
||||||
|
- ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6))
|
||||||
|
+ ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6) \
|
||||||
|
+ || (flags) == FLAG_ELF_LIBC6)
|
||||||
|
#else
|
||||||
|
# define _dl_cache_check_flags(flags) \
|
||||||
|
- ((flags) == FLAG_ELF_LIBC6)
|
||||||
|
+ ((flags) == (FLAG_ARM_LIBSF | FLAG_ELF_LIBC6) \
|
||||||
|
+ || (flags) == FLAG_ELF_LIBC6)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include_next <dl-cache.h>
|
||||||
|
diff --git a/ports/sysdeps/unix/sysv/linux/arm/readelflib.c b/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
|
||||||
|
index 81e5ccb..0fbd0dc 100644
|
||||||
|
--- a/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
|
||||||
|
+++ b/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
|
||||||
|
@@ -46,6 +46,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||||
|
if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD)
|
||||||
|
*flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6;
|
||||||
|
else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT)
|
||||||
|
+ *flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6;
|
||||||
|
+ else
|
||||||
|
+ /* We must assume the unmarked objects are compatible
|
||||||
|
+ with all ABI variants. Such objects may have been
|
||||||
|
+ generated in a transitional period when the ABI
|
||||||
|
+ tags were not added to all objects. */
|
||||||
|
*flag = FLAG_ELF_LIBC6;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,8 +3,7 @@ filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
sbin/ldconfig -r .
|
sbin/ldconfig -r .
|
||||||
[ -x sbin/init ] && sbin/init u
|
locale-gen
|
||||||
usr/sbin/locale-gen
|
|
||||||
|
|
||||||
[ -x usr/bin/install-info ] || return 0
|
[ -x usr/bin/install-info ] || return 0
|
||||||
for file in ${filelist[@]}; do
|
for file in ${filelist[@]}; do
|
||||||
|
|
Loading…
Reference in a new issue