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...@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