This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch gentoo/2.18 created. glibc-2.18-12-g55ca5af
- From: vapier at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Aug 2013 21:33:58 -0000
- Subject: GNU C Library master sources branch gentoo/2.18 created. glibc-2.18-12-g55ca5af
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, gentoo/2.18 has been created
at 55ca5af0414f921d5bfc9ca95befc902653ae03b (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55ca5af0414f921d5bfc9ca95befc902653ae03b
commit 55ca5af0414f921d5bfc9ca95befc902653ae03b
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Aug 16 15:10:41 2013 -0400
mips: add clock_{g,s}ettime symbol compat hacks
we kind of screwed ourselves into a corner by having the clock symbols
exported only with the glibc-2.0 version ... this patch fixes the
export so all new binaries built against librt will use the correct
glibc-2.2 symbol version
diff --git a/Versions.def b/Versions.def
index 0854e6e..009a563 100644
--- a/Versions.def
+++ b/Versions.def
@@ -113,6 +113,7 @@ libresolv {
GLIBC_PRIVATE
}
librt {
+ GLIBC_2.0
GLIBC_2.1
GLIBC_2.2
GLIBC_2.3
diff --git a/ports/sysdeps/unix/sysv/linux/mips/Versions b/ports/sysdeps/unix/sysv/linux/mips/Versions
index a56322a..475a05b 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/Versions
+++ b/ports/sysdeps/unix/sysv/linux/mips/Versions
@@ -38,3 +38,9 @@ libc {
fallocate64;
}
}
+librt {
+ GLIBC_2.0 {
+ # c*
+ clock_gettime; clock_settime;
+ }
+}
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index d46057a..cae2f64 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -22,6 +22,7 @@
#include <sys/time.h>
#include <libc-internal.h>
#include <ldsodefs.h>
+#include <shlib-compat.h>
#if HP_TIMING_AVAIL
@@ -132,5 +133,15 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
return retval;
}
+#ifdef __mips__
+versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2);
+librt_hidden_ver (__clock_gettime, clock_gettime)
+
+# ifdef SHARED
+strong_alias (__clock_gettime, __mips_clock_gettime)
+compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0);
+# endif
+#else
weak_alias (__clock_gettime, clock_gettime)
libc_hidden_def (__clock_gettime)
+#endif
diff --git a/sysdeps/unix/clock_settime.c b/sysdeps/unix/clock_settime.c
index 6605e9e..1e7bd4a 100644
--- a/sysdeps/unix/clock_settime.c
+++ b/sysdeps/unix/clock_settime.c
@@ -20,6 +20,7 @@
#include <sys/time.h>
#include <libc-internal.h>
#include <ldsodefs.h>
+#include <shlib-compat.h>
#if HP_TIMING_AVAIL && !defined HANDLED_CPUTIME
@@ -124,4 +125,13 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
return retval;
}
+#ifdef __mips__
+versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2);
+
+# ifdef SHARED
+strong_alias (__clock_settime, __mips_clock_settime)
+compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0);
+# endif
+#else
weak_alias (__clock_settime, clock_settime)
+#endif
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bc05ece9a56bcf077bc5bd2007740e9db858faf
commit 1bc05ece9a56bcf077bc5bd2007740e9db858faf
Author: David Lamparter <equinox-gentoo@diac24.net>
Date: Fri Aug 16 15:06:34 2013 -0400
arm: fix PIC vs SHARED typos
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
2011-09-19 David Lamparter <equinox-gentoo@diac24.net>
* sysdeps/arm/eabi/setjmp.S: Change PIC to SHARED.
* sysdeps/arm/eabi/__longjmp.S: Likewise
diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S
index a5edede..6b29b38 100644
--- a/ports/sysdeps/arm/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
@@ -61,7 +61,7 @@ ENTRY (__longjmp)
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
@@ -114,7 +114,7 @@ ENTRY (__longjmp)
.Lrtld_local_ro:
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
# else
-# ifdef PIC
+# ifdef SHARED
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
.Lrtld_global_ro:
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
diff --git a/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S
index a6c161d..d2afde3 100644
--- a/ports/sysdeps/arm/setjmp.S
+++ b/ports/sysdeps/arm/setjmp.S
@@ -43,7 +43,7 @@ ENTRY (__sigsetjmp)
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
@@ -99,7 +99,7 @@ ENTRY (__sigsetjmp)
.Lrtld_local_ro:
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
# else
-# ifdef PIC
+# ifdef SHARED
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
.Lrtld_global_ro:
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17ce9372c431e3fecaba9285104f5d4fb32c4ebe
commit 17ce9372c431e3fecaba9285104f5d4fb32c4ebe
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Aug 16 15:05:26 2013 -0400
gentoo: disable building in timezone subdir
We've split this out into the package sys-libs/timezone-data
diff --git a/Makeconfig b/Makeconfig
index 62694c8..545725d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1032,7 +1032,7 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
stdlib stdio-common libio malloc string wcsmbs time dirent \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow gshadow po argp \
- crypt localedata timezone rt conform debug \
+ crypt localedata rt conform debug \
$(add-on-subdirs) dlfcn elf
ifndef avoid-generated
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e77a9e33f4bb104e205166a04f5280dcee5531d
commit 0e77a9e33f4bb104e205166a04f5280dcee5531d
Author: Stephanie J. Lockwood-Childs <wormo@gentoo.org>
Date: Fri Aug 16 15:03:41 2013 -0400
gentoo: support running tests under sandbox
when glibc runs its tests, it does so by invoking the local library loader.
in Gentoo, we build/run inside of our "sandbox" which itself is linked against
libdl (so that it can load libraries and pull out symbols). the trouble
is that when you upgrade from an older glibc to the new one, often times
internal symbols change name or abi. this is normally OK as you cannot use
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
we always say "keep all of the glibc libraries from the same build". but
when glibc runs its tests, it uses dynamic paths to point to its new local
copies of libraries. if the test doesnt use libdl, then glibc doesnt add
its path, and when sandbox triggers the loading of libdl, glibc does so
from the host system system. this gets us into the case of all libraries
are from the locally compiled version of glibc except for libdl.so.
http://bugs.gentoo.org/56898
diff --git a/Makeconfig b/Makeconfig
index a3d3e70..62694c8 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -612,7 +612,7 @@ comma = ,
sysdep-library-path = \
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
$(filter -Wl$(comma)-rpath-link=%,\
- $(sysdep-LDFLAGS)))))
+ $(sysdep-LDFLAGS)))) $(common-objpfx)/dlfcn)
# $(run-via-rtld-prefix) is a command that, when prepended to the name
# of a program built with the newly built library, produces a command
# that, executed on the host for which the library is built, runs that
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh
index 107ded0..becb0dc 100755
--- a/iconvdata/run-iconv-test.sh
+++ b/iconvdata/run-iconv-test.sh
@@ -35,7 +35,7 @@ GCONV_PATH=$codir/iconvdata
export GCONV_PATH
# We have to have some directories in the library path.
-LIBPATH=$codir:$codir/iconvdata
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
# How the start the iconv(1) program.
ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
diff --git a/nptl/tst-tls6.sh b/nptl/tst-tls6.sh
index fb23512..03a456c 100755
--- a/nptl/tst-tls6.sh
+++ b/nptl/tst-tls6.sh
@@ -25,7 +25,7 @@ test_wrapper_env=$1; shift
logfile=$common_objpfx/nptl/tst-tls6.out
# We have to find libc and nptl
-library_path=${common_objpfx}:${common_objpfx}nptl
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
LC_ALL=C
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16d4191978ab9965856ea3a0572c53f1700b6263
commit 16d4191978ab9965856ea3a0572c53f1700b6263
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Aug 16 15:00:53 2013 -0400
nptl: handle EAGAIN with some futex operations
https://bugs.gentoo.org/452184
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index 24fb052..bbf8d4e 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -260,7 +260,8 @@ __pthread_mutex_trylock (mutex)
private), 0, 0);
if (INTERNAL_SYSCALL_ERROR_P (e, __err)
- && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+ && ((INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+ || (INTERNAL_SYSCALL_ERRNO (e, __err) == EAGAIN)))
{
THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
index da93c48..32ed35d 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
@@ -94,7 +94,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
rt.tv_sec = sec;
rt.tv_nsec = nsec;
err = do_futex_timed_wait(isem, &rt);
- if (err != 0 && err != -EWOULDBLOCK)
+ if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
{
__set_errno (-err);
err = -1;
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
index 6b94d37..6dbd22b 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
@@ -67,7 +67,7 @@ __new_sem_wait (sem_t *sem)
while (1)
{
err = do_futex_wait(isem);
- if (err != 0 && err != -EWOULDBLOCK)
+ if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
{
__set_errno (-err);
err = -1;
@@ -112,7 +112,7 @@ __old_sem_wait (sem_t *sem)
/* Disable asynchronous cancellation. */
__pthread_disable_asynccancel (oldtype);
}
- while (err == 0 || err == -EWOULDBLOCK);
+ while (err == 0 || err == -EWOULDBLOCK || err == -EAGAIN);
__set_errno (-err);
return -1;
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18ff6fa20c4dbf616b8f1d0d6ebea84ab4fe38e2
commit 18ff6fa20c4dbf616b8f1d0d6ebea84ab4fe38e2
Author: Guy Martin <gmsoft@tuxicoman.be>
Date: Fri Aug 16 15:00:05 2013 -0400
rtld: do not ignore arch-specific CFLAGS
https://bugs.gentoo.org/452184
http://sourceware.org/bugzilla/show_bug.cgi?id=15005
http://sourceware.org/ml/libc-alpha/2013-01/msg00247.html
diff --git a/elf/Makefile b/elf/Makefile
index 3b58649..d703fe2 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -418,7 +418,7 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
-CFLAGS-rtld.c = $(SYSCONF-FLAGS)
+CFLAGS-rtld.c += $(SYSCONF-FLAGS)
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08c71a5db6716be0e176b0e5128bf6eb901714ad
commit 08c71a5db6716be0e176b0e5128bf6eb901714ad
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Aug 16 14:57:59 2013 -0400
nptl: support thread stacks that grow up
http://bugs.gentoo.org/301642
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 1e0fe1f..a3bfeb3 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -371,6 +371,15 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0))
{
uintptr_t adj;
+#if _STACK_GROWS_DOWN
+ char * stackaddr = (char *) attr->stackaddr;
+#else
+ /* Assume the same layout as the _STACK_GROWS_DOWN case,
+ with struct pthread at the top of the stack block.
+ Later we adjust the guard location and stack address
+ to match the _STACK_GROWS_UP case. */
+ char * stackaddr = (char *) attr->stackaddr + attr->stacksize;
+#endif
/* If the user also specified the size of the stack make sure it
is large enough. */
@@ -380,11 +389,11 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
/* Adjust stack size for alignment of the TLS block. */
#if TLS_TCB_AT_TP
- adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE)
+ adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE)
& __static_tls_align_m1;
assert (size > adj + TLS_TCB_SIZE);
#elif TLS_DTV_AT_TP
- adj = ((uintptr_t) attr->stackaddr - __static_tls_size)
+ adj = ((uintptr_t) stackaddr - __static_tls_size)
& __static_tls_align_m1;
assert (size > adj);
#endif
@@ -394,10 +403,10 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
the stack. It is the user's responsibility to do this if it
is wanted. */
#if TLS_TCB_AT_TP
- pd = (struct pthread *) ((uintptr_t) attr->stackaddr
+ pd = (struct pthread *) ((uintptr_t) stackaddr
- TLS_TCB_SIZE - adj);
#elif TLS_DTV_AT_TP
- pd = (struct pthread *) (((uintptr_t) attr->stackaddr
+ pd = (struct pthread *) (((uintptr_t) stackaddr
- __static_tls_size - adj)
- TLS_PRE_TCB_SIZE);
#endif
@@ -409,7 +418,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
pd->specific[0] = pd->specific_1stblock;
/* Remember the stack-related values. */
- pd->stackblock = (char *) attr->stackaddr - size;
+ pd->stackblock = (char *) stackaddr - size;
pd->stackblock_size = size;
/* This is a user-provided stack. It will not be queued in the
@@ -635,7 +644,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
#elif _STACK_GROWS_DOWN
char *guard = mem;
-# elif _STACK_GROWS_UP
+#elif _STACK_GROWS_UP
char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
#endif
if (mprotect (guard, guardsize, PROT_NONE) != 0)
@@ -731,7 +740,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
*stack = stacktop;
#elif _STACK_GROWS_UP
*stack = pd->stackblock;
- assert (*stack > 0);
#endif
return 0;
diff --git a/nptl/pthread_attr_getstack.c b/nptl/pthread_attr_getstack.c
index 03907b7..6bca1b5 100644
--- a/nptl/pthread_attr_getstack.c
+++ b/nptl/pthread_attr_getstack.c
@@ -32,7 +32,11 @@ __pthread_attr_getstack (attr, stackaddr, stacksize)
iattr = (struct pthread_attr *) attr;
/* Store the result. */
+#ifdef _STACK_GROWS_DOWN
*stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
+#else
+ *stackaddr = (char *) iattr->stackaddr;
+#endif
*stacksize = iattr->stacksize;
return 0;
diff --git a/nptl/pthread_attr_setstack.c b/nptl/pthread_attr_setstack.c
index 4bd314e..7648a2a 100644
--- a/nptl/pthread_attr_setstack.c
+++ b/nptl/pthread_attr_setstack.c
@@ -48,7 +48,11 @@ __pthread_attr_setstack (attr, stackaddr, stacksize)
#endif
iattr->stacksize = stacksize;
+#if _STACK_GROWS_DOWN
iattr->stackaddr = (char *) stackaddr + stacksize;
+#else
+ iattr->stackaddr = (char *) stackaddr;
+#endif
iattr->flags |= ATTR_FLAG_STACKADDR;
return 0;
@@ -81,7 +85,11 @@ __old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
# endif
iattr->stacksize = stacksize;
+#if _STACK_GROWS_DOWN
iattr->stackaddr = (char *) stackaddr + stacksize;
+#else
+ iattr->stackaddr = (char *) stackaddr;
+#endif
iattr->flags |= ATTR_FLAG_STACKADDR;
return 0;
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 7f714f8..736cc89 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -401,13 +401,26 @@ start_thread (void *arg)
#ifdef _STACK_GROWS_DOWN
char *sp = CURRENT_STACK_FRAME;
size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
-#else
-# error "to do"
-#endif
assert (freesize < pd->stackblock_size);
if (freesize > PTHREAD_STACK_MIN)
__madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
-
+#else
+ /* Page aligned start of memory to free (higher than or equal
+ to current sp plus the minimum stack size). */
+ void *freeblock = (void*)((size_t)(CURRENT_STACK_FRAME
+ + PTHREAD_STACK_MIN
+ + pagesize_m1)
+ & ~pagesize_m1);
+ char *free_end = (char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1);
+ /* Is there any space to free? */
+ if (free_end > (char *)freeblock)
+ {
+ size_t freesize = (size_t)(free_end - (char *)freeblock);
+ assert (freesize < pd->stackblock_size);
+ __madvise (freeblock, freesize, MADV_DONTNEED);
+ }
+#endif
+
/* If the thread is detached free the TCB. */
if (IS_DETACHED (pd))
/* Free the TCB. */
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 88ac072..6c84f8b 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -60,7 +60,11 @@ pthread_getattr_np (thread_id, attr)
if (__builtin_expect (thread->stackblock != NULL, 1))
{
iattr->stacksize = thread->stackblock_size;
+#ifdef _STACK_GROWS_DOWN
iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize;
+#else
+ iattr->stackaddr = (char *) thread->stackblock;
+#endif
}
else
{
@@ -129,12 +133,17 @@ pthread_getattr_np (thread_id, attr)
stack extension request. */
iattr->stacksize = (iattr->stacksize
& -(intptr_t) GLRO(dl_pagesize));
-
+#if _STACK_GROWS_DOWN
/* The limit might be too high. */
if ((size_t) iattr->stacksize
> (size_t) iattr->stackaddr - last_to)
iattr->stacksize = (size_t) iattr->stackaddr - last_to;
-
+#else
+ /* The limit might be too high. */
+ if ((size_t) iattr->stacksize
+ > to - (size_t) iattr->stackaddr)
+ iattr->stacksize = to - (size_t) iattr->stackaddr;
+#endif
/* We succeed and no need to look further. */
ret = 0;
break;
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd8e484bf1a7cac40e6aba71fc4235aac7950eea
commit fd8e484bf1a7cac40e6aba71fc4235aac7950eea
Author: Thorsten Kukuk <kukuk@suse.de>
Date: Fri Aug 16 14:54:23 2013 -0400
reload /etc/resolv.conf when it has changed
if /etc/resolv.conf is updated, then make sure applications
already running get the updated information.
ripped from SuSE
http://bugs.gentoo.org/177416
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index 48d3200..fc32b3b 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -22,6 +22,7 @@
#include <arpa/nameser.h>
#include <resolv.h>
#include <bits/libc-lock.h>
+#include <sys/stat.h>
/* The following bit is copied from res_data.c (where it is #ifdef'ed
@@ -95,6 +96,20 @@ int
__res_maybe_init (res_state resp, int preinit)
{
if (resp->options & RES_INIT) {
+ static time_t last_mtime, last_check;
+ time_t now;
+ struct stat statbuf;
+
+ time (&now);
+ if (now != last_check) {
+ last_check = now;
+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
+ last_mtime = statbuf.st_mtime;
+ atomicinclock (lock);
+ atomicinc (__res_initstamp);
+ atomicincunlock (lock);
+ }
+ }
if (__res_initstamp != resp->_u._ext.initstamp) {
if (resp->nscount > 0)
__res_iclose (resp, true);
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43b9f7a0f1accffc3cdadbd5b8e2fc5bc2b83fe6
commit 43b9f7a0f1accffc3cdadbd5b8e2fc5bc2b83fe6
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Aug 16 14:52:25 2013 -0400
Fix localedef segfault when run under exec-shield, PaX or similar
http://bugs.debian.org/198099
http://bugs.debian.org/231438
diff --git a/locale/programs/3level.h b/locale/programs/3level.h
index 9b8b1b9..93b643c 100644
--- a/locale/programs/3level.h
+++ b/locale/programs/3level.h
@@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
}
}
}
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+ to inlined functions. Help it a little bit with this hack. */
+#define wchead_table_iterate(tp, fn) \
+do \
+ { \
+ struct wchead_table *t = (tp); \
+ uint32_t index1; \
+ for (index1 = 0; index1 < t->level1_size; index1++) \
+ { \
+ uint32_t lookup1 = t->level1[index1]; \
+ if (lookup1 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup1_shifted = lookup1 << t->q; \
+ uint32_t index2; \
+ for (index2 = 0; index2 < (1 << t->q); index2++) \
+ { \
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
+ if (lookup2 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup2_shifted = lookup2 << t->p; \
+ uint32_t index3; \
+ for (index3 = 0; index3 < (1 << t->p); index3++) \
+ { \
+ struct element_t *lookup3 \
+ = t->level3[index3 + lookup2_shifted]; \
+ if (lookup3 != NULL) \
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
+ lookup3); \
+ } \
+ } \
+ } \
+ } \
+ } \
+ } while (0)
+
#endif
#ifndef NO_FINALIZE
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=630f1e84ebb2574b480d9637bfd8e25d4507e5ec
commit 630f1e84ebb2574b480d9637bfd8e25d4507e5ec
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sat May 4 14:12:58 2013 -0400
make fortify logic checks less angry
the fortify/optimization check does not play well with our default gcc specs
http://sourceware.org/ml/libc-alpha/2012-06/msg00068.html
diff --git a/include/features.h b/include/features.h
index c9be10a..476aa13 100644
--- a/include/features.h
+++ b/include/features.h
@@ -322,10 +322,11 @@
# define __USE_REENTRANT 1
#endif
+#if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+# undef _FORTIFY_SOURCE
+#endif
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
-# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
-# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
-# elif !__GNUC_PREREQ (4, 1)
+# if !__GNUC_PREREQ (4, 1)
# warning _FORTIFY_SOURCE requires GCC 4.1 or later
# elif _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1ef729251fec30082c58d69fcc7d482d7ced7db
commit b1ef729251fec30082c58d69fcc7d482d7ced7db
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sat May 4 14:10:41 2013 -0400
workaround crash when handling signals in static PIEs
work around ... not entirely sure what is going on here.
2011-03-01 squeezy <vina@mailserver.eu>
* sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol
http://bugs.gentoo.org/283470
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
index 4b5d1e1..5390318 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
@@ -39,7 +39,7 @@
/* Using the hidden attribute here does not change the code but it
helps to avoid warnings. */
-extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
+extern void restore_rt (void) asm ("__restore_rt") __attribute__((__visibility__("hidden")));
/* If ACT is not NULL, change the action for SIG to *ACT.
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=632bb8406a6d242d94b11ae86ad1bd2e8fd387d3
commit 632bb8406a6d242d94b11ae86ad1bd2e8fd387d3
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sat May 4 14:07:11 2013 -0400
disable ldconfig during install
do not bother running ldconfig on DESTDIR. it wants to write the temp cache
file outside of the chroot. doesnt matter anyways as we wont use the cache
results (portage will rebuild cache), so running ldconfig is simply a waste
of time.
http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html
https://bugs.gentoo.org/431038
diff --git a/Makefile b/Makefile
index 7d8eccf..0c92e4f 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,7 @@ install-symbolic-link: subdir_install
rm -f $(symbolic-link-list)
install:
+dont-bother-with-destdir:
-test ! -x $(common-objpfx)elf/ldconfig || LC_ALL=C LANGUAGE=C \
$(common-objpfx)elf/ldconfig $(addprefix -r ,$(install_root)) \
$(slibdir) $(libdir)
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources