1.1 --- a/config/libc/glibc.in Mon Oct 07 00:03:19 2013 +0200
1.2 +++ b/config/libc/glibc.in Mon Oct 07 00:16:20 2013 +0200
1.3 @@ -14,6 +14,10 @@
1.4 # Don't remove next line
1.5 # CT_INSERT_VERSION_BELOW
1.6
1.7 +config LIBC_GLIBC_V_2_18
1.8 + bool
1.9 + prompt "2.18"
1.10 +
1.11 config LIBC_GLIBC_V_2_17
1.12 bool
1.13 prompt "2.17"
1.14 @@ -73,6 +77,7 @@
1.15 string
1.16 # Don't remove next line
1.17 # CT_INSERT_VERSION_STRING_BELOW
1.18 + default "2.18" if LIBC_GLIBC_V_2_18
1.19 default "2.17" if LIBC_GLIBC_V_2_17
1.20 default "2.16.0" if LIBC_GLIBC_V_2_16_0
1.21 default "2.15" if LIBC_GLIBC_V_2_15
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch Mon Oct 07 00:16:20 2013 +0200
2.3 @@ -0,0 +1,65 @@
2.4 +commit 4f2bcda964d4fff56855e0c66198c9bcb682ea1e
2.5 +Author: Will Newton <will.newton@linaro.org>
2.6 +Date: Thu Aug 29 20:10:26 2013 +0100
2.7 +
2.8 + ARM: Fix clone code when built for Thumb.
2.9 +
2.10 + The mov lr, pc instruction will lose the Thumb bit from the return address
2.11 + so use blx lr instead.
2.12 +
2.13 + ports/ChangeLog.arm:
2.14 +
2.15 + 2013-08-30 Will Newton <will.newton@linaro.org>
2.16 +
2.17 + [BZ #15909]
2.18 + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
2.19 + instead of mov lr, pc.
2.20 +
2.21 + (cherry picked from commit 6b06ac56cdfc9293908724e51e827534e97819aa)
2.22 +
2.23 +diff --git a/NEWS b/NEWS
2.24 +index b023c30..f64fb82 100644
2.25 +--- a/NEWS
2.26 ++++ b/NEWS
2.27 +@@ -5,6 +5,12 @@ See the end for copying conditions.
2.28 + Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
2.29 + using `glibc' in the "product" field.
2.30 +
2.31 ++Version 2.18.1
2.32 ++
2.33 ++* The following bugs are resolved with this release:
2.34 ++
2.35 ++ 15909.
2.36 ++
2.37 + Version 2.18
2.38 +
2.39 + * The following bugs are resolved with this release:
2.40 +diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
2.41 +index 1e7a35c..54debd7 100644
2.42 +--- a/ports/ChangeLog.arm
2.43 ++++ b/ports/ChangeLog.arm
2.44 +@@ -1,3 +1,9 @@
2.45 ++2013-08-30 Will Newton <will.newton@linaro.org>
2.46 ++
2.47 ++ [BZ #15909]
2.48 ++ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
2.49 ++ instead of mov lr, pc.
2.50 ++
2.51 + 2013-07-03 Joseph Myers <joseph@codesourcery.com>
2.52 +
2.53 + * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST):
2.54 +diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S
2.55 +index ce9c2a5..6e74fa7 100644
2.56 +--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S
2.57 ++++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S
2.58 +@@ -93,8 +93,8 @@ PSEUDO_END (__clone)
2.59 + mov lr, pc
2.60 + bx ip
2.61 + #else
2.62 +- mov lr, pc
2.63 +- ldr pc, [sp], #8
2.64 ++ ldr lr, [sp], #8
2.65 ++ blx lr
2.66 + #endif
2.67 +
2.68 + @ and we are done, passing the return value through r0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch Mon Oct 07 00:16:20 2013 +0200
3.3 @@ -0,0 +1,78 @@
3.4 +commit 2770d15e7e880821fc586619c59eb45180628e16
3.5 +Author: Siddhesh Poyarekar <siddhesh@redhat.com>
3.6 +Date: Thu Oct 3 08:26:21 2013 +0530
3.7 +
3.8 + Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal
3.9 +
3.10 + Fixes BZ #15996.
3.11 +
3.12 + The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead
3.13 + of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the
3.14 + already existing convenience macro USE_REQUEUE_PI.
3.15 +
3.16 +diff --git a/NEWS b/NEWS
3.17 +index f64fb82..fb6069d 100644
3.18 +--- a/NEWS
3.19 ++++ b/NEWS
3.20 +@@ -9,7 +9,7 @@ Version 2.18.1
3.21 +
3.22 + * The following bugs are resolved with this release:
3.23 +
3.24 +- 15909.
3.25 ++ 15909, 15996.
3.26 +
3.27 + Version 2.18
3.28 +
3.29 +diff --git a/nptl/ChangeLog b/nptl/ChangeLog
3.30 +index eae5079..2d78490 100644
3.31 +--- a/nptl/ChangeLog
3.32 ++++ b/nptl/ChangeLog
3.33 +@@ -1,3 +1,12 @@
3.34 ++2013-10-03 Siddhesh Poyarekar <siddhesh@redhat.com>
3.35 ++
3.36 ++ [BZ #15996]
3.37 ++ * pthread_cond_broadcast.c (__pthread_cond_broadcast)
3.38 ++ [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
3.39 ++ USE_REQUEUE_PI.
3.40 ++ * pthread_cond_signal.c (__pthread_cond_signal)
3.41 ++ [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
3.42 ++
3.43 + 2013-07-23 David S. Miller <davem@davemloft.net>
3.44 +
3.45 + * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
3.46 +diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c
3.47 +index 0702ec0..7ba9efa 100644
3.48 +--- a/nptl/pthread_cond_broadcast.c
3.49 ++++ b/nptl/pthread_cond_broadcast.c
3.50 +@@ -63,10 +63,7 @@ __pthread_cond_broadcast (cond)
3.51 +
3.52 + #if (defined lll_futex_cmp_requeue_pi \
3.53 + && defined __ASSUME_REQUEUE_PI)
3.54 +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP;
3.55 +- pi_flag &= mut->__data.__kind;
3.56 +-
3.57 +- if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP)
3.58 ++ if (USE_REQUEUE_PI (mut))
3.59 + {
3.60 + if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX,
3.61 + &mut->__data.__lock, futex_val,
3.62 +diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c
3.63 +index 102d0b3..ffc35dc 100644
3.64 +--- a/nptl/pthread_cond_signal.c
3.65 ++++ b/nptl/pthread_cond_signal.c
3.66 +@@ -49,14 +49,9 @@ __pthread_cond_signal (cond)
3.67 +
3.68 + #if (defined lll_futex_cmp_requeue_pi \
3.69 + && defined __ASSUME_REQUEUE_PI)
3.70 +- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP;
3.71 + pthread_mutex_t *mut = cond->__data.__mutex;
3.72 +
3.73 +- /* Do not use requeue for pshared condvars. */
3.74 +- if (mut != (void *) ~0l)
3.75 +- pi_flag &= mut->__data.__kind;
3.76 +-
3.77 +- if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0)
3.78 ++ if (USE_REQUEUE_PI (mut)
3.79 + /* This can only really fail with a ENOSYS, since nobody can modify
3.80 + futex while we have the cond_lock. */
3.81 + && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0,