diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-01-14 18:21:30 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2011-01-14 18:21:30 -0600 |
commit | d5b7bc4192fc0d47af897ac70379cf4c49bc334c (patch) | |
tree | 1b683435eec8d123e7b0aa8549840cbde240d046 /main/libc0.9.32 | |
parent | fb86ab2de02e2d3dcc72e301c39a1bff60d2edc5 (diff) | |
download | aports-d5b7bc4192fc0d47af897ac70379cf4c49bc334c.tar.bz2 aports-d5b7bc4192fc0d47af897ac70379cf4c49bc334c.tar.xz |
main/libc0.9.32: add patch to fix NPTL TLS on ARM.
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r-- | main/libc0.9.32/APKBUILD | 4 | ||||
-rw-r--r-- | main/libc0.9.32/arm-nptl-tls.patch | 69 |
2 files changed, 72 insertions, 1 deletions
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD index 5b424fb962..6cddc0bd72 100644 --- a/main/libc0.9.32/APKBUILD +++ b/main/libc0.9.32/APKBUILD @@ -27,6 +27,7 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2 1.patch 2.patch 0001-libm-x86_64-implement-fesetround.patch + arm-nptl-tls.patch uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 @@ -125,7 +126,8 @@ md5sums="ec2ec3e187bd68327ee94c31846d275a uClibc-0.9.32-rc1.tar.bz2 8f55efc31c41bf70d99006a7d2f7fe1e 1.patch 350a608e3d3b148af882f6e074225465 2.patch e0c901502602f7e9e002d910d0f32ab9 0001-libm-x86_64-implement-fesetround.patch +2b4e27207b15e2d4b3e9b853513634f6 arm-nptl-tls.patch 145aaeb1833159397cfac9902e3877ab uclibcconfig.x86 cb1bcf2ff83029b6943d4799d926932b uclibcconfig.x86_64 145aaeb1833159397cfac9902e3877ab uclibcconfig.i486 -4a4e5b1a1a50a302f8511e4e5ac26ad4 uclibcconfig.arm" +81fd4be5e79d55c0ae75ec6acd151e81 uclibcconfig.arm" diff --git a/main/libc0.9.32/arm-nptl-tls.patch b/main/libc0.9.32/arm-nptl-tls.patch new file mode 100644 index 0000000000..44a038624f --- /dev/null +++ b/main/libc0.9.32/arm-nptl-tls.patch @@ -0,0 +1,69 @@ +From 565b8d14a1dc2ce1a9c4110232e1abf88f0572ed Mon Sep 17 00:00:00 2001 +From: William Pitcock <nenolod@dereferenced.org> +Date: Fri, 14 Jan 2011 18:17:24 -0600 +Subject: [PATCH] nptl: fix TLS support on arm + +Signed-off-by: William Pitcock <nenolod@dereferenced.org> +--- + libpthread/nptl/sysdeps/arm/Makefile.arch | 2 + + libpthread/nptl/sysdeps/arm/libc-tls.c | 38 +++++++++++++++++++++++++++++ + 2 files changed, 40 insertions(+), 0 deletions(-) + create mode 100644 libpthread/nptl/sysdeps/arm/libc-tls.c + +diff --git a/libpthread/nptl/sysdeps/arm/Makefile.arch b/libpthread/nptl/sysdeps/arm/Makefile.arch +index a8bc1aa..d463253 100644 +--- a/libpthread/nptl/sysdeps/arm/Makefile.arch ++++ b/libpthread/nptl/sysdeps/arm/Makefile.arch +@@ -15,3 +15,5 @@ ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread + ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread + ASFLAGS-aeabi_read_tp.S = -DNOT_IN_libc=1 + ++libc_arch_a_CSRC = libc-tls.c ++ +diff --git a/libpthread/nptl/sysdeps/arm/libc-tls.c b/libpthread/nptl/sysdeps/arm/libc-tls.c +new file mode 100644 +index 0000000..a9e6d4f +--- /dev/null ++++ b/libpthread/nptl/sysdeps/arm/libc-tls.c +@@ -0,0 +1,38 @@ ++/* Thread-local storage handling in the ELF dynamic linker. MIPS version. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include <sysdeps/generic/libc-tls.c> ++#include <dl-tls.h> ++ ++#if USE_TLS ++ ++/* On ARM, linker optimizations are not required, so __tls_get_addr ++ can be called even in statically linked binaries. In this case module ++ must be always 1 and PT_TLS segment exist in the binary, otherwise it ++ would not link. */ ++ ++void * ++__tls_get_addr (tls_index *ti) ++{ ++ dtv_t *dtv = THREAD_DTV (); ++ return (char *) dtv[1].pointer.val + ti->ti_offset; ++} ++ ++#endif ++ +-- +1.7.3.5 + |