aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-10-27 21:46:03 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-10-27 21:46:03 +0000
commit3e2ee6f0e3471ceb4c49f8287676a7050401bf8f (patch)
treeb3b95b912899d4a1ae295c7f4122960858fc9f4d /nptl
parent72f1463df85a522bfd1568e47bd81371522ee358 (diff)
downloadglibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.zip
glibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.tar.gz
glibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.tar.bz2
Remove sysdeps/nptl/configure.ac.
sysdeps/nptl/configure.ac tests for forced unwind support and the C cleanup attribute, giving errors if either is unsupported. It does nothing beyond running those two tests. Both the attribute, and _Unwind_GetCFA which is used in the forced unwind test, were added in GCC 3.3. Thus these tests are long obsolete, and this patch removes the configure fragment running them, along with associated conditionals. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * sysdeps/nptl/configure.ac: Remove file. * sysdeps/nptl/configure: Remove generated file. * configure.ac (libc_cv_forced_unwind): Do not substitute. * configure: Regenerated. * config.h.in (HAVE_FORCED_UNWIND): Remove #undef. * config.make.in (have-forced-unwind): Remove variable. * nptl/Makefile [$(have-forced-unwind) = yes]: Make code unconditional. * nptl/descr.h [HAVE_FORCED_UNWIND]: Likewise. * nptl/unwind.c [HAVE_FORCED_UNWIND]: Likewise. (__pthread_unwind) [!HAVE_FORCED_UNWIND]: Remove conditional code. * nptl/version.c [HAVE_FORCED_UNWIND]: Make code unconditional. * sysdeps/nptl/Makefile [$(have-forced-unwind) = yes]: Make code unconditional.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/descr.h6
-rw-r--r--nptl/unwind.c34
-rw-r--r--nptl/version.c2
4 files changed, 1 insertions, 43 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 311b1a7..7b816a3 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -311,14 +311,12 @@ LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
CFLAGS-tst-cleanup2.c = -fno-builtin
CFLAGS-tst-cleanupx2.c = -fno-builtin
-ifeq ($(have-forced-unwind),yes)
tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \
tst-cancelx6 tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 \
tst-cancelx11 tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 \
tst-cancelx16 tst-cancelx17 tst-cancelx18 tst-cancelx20 tst-cancelx21 \
tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3 tst-cleanupx4 \
tst-oncex3 tst-oncex4
-endif
ifeq ($(build-shared),yes)
tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-_res1 tst-fini1 \
tst-stackguard1
diff --git a/nptl/descr.h b/nptl/descr.h
index a502048..bd99c36 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -32,9 +32,7 @@
#include <dl-sysdep.h>
#include "../nptl_db/thread_db.h"
#include <tls.h>
-#ifdef HAVE_FORCED_UNWIND
-# include <unwind.h>
-#endif
+#include <unwind.h>
#define __need_res_state
#include <resolv.h>
#include <kernel-features.h>
@@ -362,10 +360,8 @@ struct pthread
/* Next descriptor with a pending event. */
struct pthread *nextevent;
-#ifdef HAVE_FORCED_UNWIND
/* Machine-specific unwind info. */
struct _Unwind_Exception exc;
-#endif
/* If nonzero pointer to area allocated for the stack and its
size. */
diff --git a/nptl/unwind.c b/nptl/unwind.c
index 904187e..5a41c1b 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -25,8 +25,6 @@
#include "pthreadP.h"
#include <jmpbuf-unwind.h>
-#ifdef HAVE_FORCED_UNWIND
-
#ifdef _STACK_GROWS_DOWN
# define FRAME_LEFT(frame, other, adj) \
((uintptr_t) frame - adj >= (uintptr_t) other - adj)
@@ -107,8 +105,6 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
__libc_fatal ("FATAL: exception not rethrown\n");
}
-#endif /* have forced unwind */
-
void
__cleanup_fct_attribute __attribute ((noreturn))
@@ -117,42 +113,12 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
struct pthread *self = THREAD_SELF;
-#ifdef HAVE_FORCED_UNWIND
/* This is not a catchable exception, so don't provide any details about
the exception type. We do need to initialize the field though. */
THREAD_SETMEM (self, exc.exception_class, 0);
THREAD_SETMEM (self, exc.exception_cleanup, &unwind_cleanup);
_Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf);
-#else
- /* Handle the compatibility stuff first. Execute all handlers
- registered with the old method. We don't execute them in order,
- instead, they will run first. */
- struct _pthread_cleanup_buffer *oldp = ibuf->priv.data.cleanup;
- struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup);
-
- if (curp != oldp)
- {
- do
- {
- /* Pointer to the next element. */
- struct _pthread_cleanup_buffer *nextp = curp->__prev;
-
- /* Call the handler. */
- curp->__routine (curp->__arg);
-
- /* To the next. */
- curp = nextp;
- }
- while (curp != oldp);
-
- /* Mark the current element as handled. */
- THREAD_SETMEM (self, cleanup, curp);
- }
-
- /* We simply jump to the registered setjmp buffer. */
- __libc_unwind_longjmp ((struct __jmp_buf_tag *) ibuf->cancel_jmp_buf, 1);
-#endif
/* NOTREACHED */
/* We better do not get here. */
diff --git a/nptl/version.c b/nptl/version.c
index cfa2acb..ba01a65 100644
--- a/nptl/version.c
+++ b/nptl/version.c
@@ -27,9 +27,7 @@ static const char banner[] =
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n"
-#ifdef HAVE_FORCED_UNWIND
"Forced unwind support included.\n"
-#endif
;