diff options
-rw-r--r-- | toolchain/uclibc/patches/0.9.34-git/0001-libpthread-modify-CFLAGS-pthread_once.c-to-avoid-ear.patch | 40 | ||||
-rw-r--r-- | toolchain/uclibc/patches/0.9.34-git/0003-test-once3.patch | 32 |
2 files changed, 40 insertions, 32 deletions
diff --git a/toolchain/uclibc/patches/0.9.34-git/0001-libpthread-modify-CFLAGS-pthread_once.c-to-avoid-ear.patch b/toolchain/uclibc/patches/0.9.34-git/0001-libpthread-modify-CFLAGS-pthread_once.c-to-avoid-ear.patch new file mode 100644 index 000000000..66f12c751 --- /dev/null +++ b/toolchain/uclibc/patches/0.9.34-git/0001-libpthread-modify-CFLAGS-pthread_once.c-to-avoid-ear.patch @@ -0,0 +1,40 @@ +From 82cc57d5a508dbd7a2f578dc13f91dafda4d6cd9 Mon Sep 17 00:00:00 2001 +From: Yang Yingliang <yangyingliang@huawei.com> +Date: Fri, 29 Aug 2014 11:21:30 +0800 +Subject: [PATCH] libpthread: modify CFLAGS-pthread_once.c to avoid earlier + setting being replaced + +I use uclibc in arch arm. The CFLAGS-pthread_once.c has been set +to -DNOT_IN_libc -DIS_IN_libpthread in +libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch. +But it will be replaced by -fexceptions -fasynchronous-unwind-tables in +libpthread/nptl/Makefile.in. + +If CFLAGS-pthread_once.c has no -DIS_IN_libpthread the testcase +tst-once3 in test/nptl/ will be failed. The reason is pthread_once +calls another pthread_cleanup_push() which is not under IS_IN_libpthread +so that clear_once_control do not be called when the thread is canceled. +So pthread_once will hang up when it's called second time. + +Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> +Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> +--- + libpthread/nptl/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in +index 0008822..1b9ba8c 100644 +--- a/libpthread/nptl/Makefile.in ++++ b/libpthread/nptl/Makefile.in +@@ -186,7 +186,7 @@ CFLAGS-forward.c = -fexceptions + CFLAGS-pthread_testcancel.c = -fexceptions + CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables + CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables +-CFLAGS-pthread_once.c = $(uses-callbacks) -fexceptions \ ++CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \ + -fasynchronous-unwind-tables + CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables + CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables +-- +2.0.1 + diff --git a/toolchain/uclibc/patches/0.9.34-git/0003-test-once3.patch b/toolchain/uclibc/patches/0.9.34-git/0003-test-once3.patch deleted file mode 100644 index 2e4b5cd80..000000000 --- a/toolchain/uclibc/patches/0.9.34-git/0003-test-once3.patch +++ /dev/null @@ -1,32 +0,0 @@ -I use uclibc in arch arm. The CFLAGS-pthread_once.c has been set -to -DNOT_IN_libc -DIS_IN_libpthread in -libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch. -But it will be replaced by -fexceptions -fasynchronous-unwind-tables in -libpthread/nptl/Makefile.in. - -If CFLAGS-pthread_once.c has no -DIS_IN_libpthread the testcase -tst-once3 in test/nptl/ will be failed. The reason is pthread_once -calls another pthread_cleanup_push() which is not under IS_IN_libpthread -so that clear_once_control do not be called when the thread is canceled. -So pthread_once will hang up when it's called second time. - -Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> ---- - libpthread/nptl/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in -index 0008822..1b9ba8c 100644 ---- a/libpthread/nptl/Makefile.in -+++ b/libpthread/nptl/Makefile.in -@@ -186,7 +186,7 @@ CFLAGS-forward.c = -fexceptions - CFLAGS-pthread_testcancel.c = -fexceptions - CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables - CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables --CFLAGS-pthread_once.c = $(uses-callbacks) -fexceptions \ -+CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \ - -fasynchronous-unwind-tables - CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables - CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables --- -1.8.0 |