This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Check __GLIBC__ when using __SIGRTMIN in generic-morestack.c
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Wed, 14 Dec 2011 09:09:31 -0800
- Subject: PATCH: Check __GLIBC__ when using __SIGRTMIN in generic-morestack.c
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Since __SIGRTMIN is for the NPTL threading library, should we check
__GLIBC__ instead of __linux__? Otherwise, it fails to build with
Bionic library on Android.
H.J.
---
libgcc/ChangeLog.hjl | 4 ++++
libgcc/generic-morestack.c | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)
create mode 100644 libgcc/ChangeLog.hjl
diff --git a/libgcc/ChangeLog.hjl b/libgcc/ChangeLog.hjl
new file mode 100644
index 0000000..0088195
--- /dev/null
+++ b/libgcc/ChangeLog.hjl
@@ -0,0 +1,4 @@
+2011-12-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * generic-morestack.c (__generic_morestack_set_initial_sp): Check
+ __GLIBC__ instead of __linux__ when using __SIGRTMIN.
diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c
index 7e29bbc..f338294 100644
--- a/libgcc/generic-morestack.c
+++ b/libgcc/generic-morestack.c
@@ -459,7 +459,10 @@ __generic_morestack_set_initial_sp (void *sp, size_t len)
sigemptyset (&__morestack_initial_sp.mask);
sigfillset (&__morestack_fullmask);
-#ifdef __linux__
+ /* FIXME: This is glibc specific, not Linux specific. Android doesn't
+ use the NPTL threading library. There is no need to do this for
+ Android. */
+#ifdef __GLIBC__
/* On Linux, the first two real time signals are used by the NPTL
threading library. By taking them out of the set of signals, we
avoiding copying the signal mask in pthread_sigmask. More
--
1.7.6.4