From 27847b8e14f823f6f4fd8f00fbd65341695cb221 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 7 Oct 2013 00:16:20 +0200 Subject: libc/glibc: add latest version Take two patches from upstream at the same time. Signed-off-by: "Yann E. MORIN" diff --git a/config/libc/glibc.in b/config/libc/glibc.in index f8ab1a0..bb9becc 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -14,6 +14,10 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config LIBC_GLIBC_V_2_18 + bool + prompt "2.18" + config LIBC_GLIBC_V_2_17 bool prompt "2.17" @@ -73,6 +77,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "2.18" if LIBC_GLIBC_V_2_18 default "2.17" if LIBC_GLIBC_V_2_17 default "2.16.0" if LIBC_GLIBC_V_2_16_0 default "2.15" if LIBC_GLIBC_V_2_15 diff --git a/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch b/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch new file mode 100644 index 0000000..40e3632 --- /dev/null +++ b/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch @@ -0,0 +1,65 @@ +commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e +Author: Will Newton +Date: Thu Aug 29 20:10:26 2013 +0100 + + ARM: Fix clone code when built for Thumb. + + The mov lr, pc instruction will lose the Thumb bit from the return address + so use blx lr instead. + + ports/ChangeLog.arm: + + 2013-08-30 Will Newton + + [BZ #15909] + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx + instead of mov lr, pc. + + (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa) + +diff --git a/NEWS b/NEWS +index b023c30..f64fb82 100644 +--- a/NEWS ++++ b/NEWS +@@ -5,6 +5,12 @@ See the end for copying conditions. + Please send GNU C library bug reports via + using `glibc' in the "product" field. + ++Version 2.18.1 ++ ++* The following bugs are resolved with this release: ++ ++ 15909. ++ + Version 2.18 + + * The following bugs are resolved with this release: +diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm +index 1e7a35c..54debd7 100644 +--- a/ports/ChangeLog.arm ++++ b/ports/ChangeLog.arm +@@ -1,3 +1,9 @@ ++2013-08-30 Will Newton ++ ++ [BZ #15909] ++ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx ++ instead of mov lr, pc. ++ + 2013-07-03 Joseph Myers + + * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST): +diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S +index ce9c2a5..6e74fa7 100644 +--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S ++++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S +@@ -93,8 +93,8 @@ PSEUDO_END (__clone) + mov lr, pc + bx ip + #else +- mov lr, pc +- ldr pc, [sp], #8 ++ ldr lr, [sp], #8 ++ blx lr + #endif + + @ and we are done, passing the return value through r0 diff --git a/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch b/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch new file mode 100644 index 0000000..7ad9fdf --- /dev/null +++ b/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch @@ -0,0 +1,78 @@ +commit 2770d15e7e880821fc586619c59eb45180628e16 +Author: Siddhesh Poyarekar +Date: Thu Oct 3 08:26:21 2013 +0530 + + Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal + + Fixes BZ #15996. + + The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead + of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the + already existing convenience macro USE_REQUEUE_PI. + +diff --git a/NEWS b/NEWS +index f64fb82..fb6069d 100644 +--- a/NEWS ++++ b/NEWS +@@ -9,7 +9,7 @@ Version 2.18.1 + + * The following bugs are resolved with this release: + +- 15909. ++ 15909, 15996. + + Version 2.18 + +diff --git a/nptl/ChangeLog b/nptl/ChangeLog +index eae5079..2d78490 100644 +--- a/nptl/ChangeLog ++++ b/nptl/ChangeLog +@@ -1,3 +1,12 @@ ++2013-10-03 Siddhesh Poyarekar ++ ++ [BZ #15996] ++ * pthread_cond_broadcast.c (__pthread_cond_broadcast) ++ [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use ++ USE_REQUEUE_PI. ++ * pthread_cond_signal.c (__pthread_cond_signal) ++ [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise. ++ + 2013-07-23 David S. Miller + + * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment. +diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c +index 0702ec0..7ba9efa 100644 +--- a/nptl/pthread_cond_broadcast.c ++++ b/nptl/pthread_cond_broadcast.c +@@ -63,10 +63,7 @@ __pthread_cond_broadcast (cond) + + #if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; +- pi_flag &= mut->__data.__kind; +- +- if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) ++ if (USE_REQUEUE_PI (mut)) + { + if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, + &mut->__data.__lock, futex_val, +diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c +index 102d0b3..ffc35dc 100644 +--- a/nptl/pthread_cond_signal.c ++++ b/nptl/pthread_cond_signal.c +@@ -49,14 +49,9 @@ __pthread_cond_signal (cond) + + #if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; + pthread_mutex_t *mut = cond->__data.__mutex; + +- /* Do not use requeue for pshared condvars. */ +- if (mut != (void *) ~0l) +- pi_flag &= mut->__data.__kind; +- +- if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0) ++ if (USE_REQUEUE_PI (mut) + /* This can only really fail with a ENOSYS, since nobody can modify + futex while we have the cond_lock. */ + && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0, -- cgit v0.10.2-6-g49f6