about summary refs log tree commit diff
path: root/sysdeps
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 /sysdeps
parent72f1463df85a522bfd1568e47bd81371522ee358 (diff)
downloadglibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.tar.gz
glibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.tar.xz
glibc-3e2ee6f0e3471ceb4c49f8287676a7050401bf8f.zip
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 'sysdeps')
-rw-r--r--sysdeps/nptl/Makefile2
-rw-r--r--sysdeps/nptl/configure78
-rw-r--r--sysdeps/nptl/configure.ac37
3 files changed, 0 insertions, 117 deletions
diff --git a/sysdeps/nptl/Makefile b/sysdeps/nptl/Makefile
index e9339a3e12..212561b3f1 100644
--- a/sysdeps/nptl/Makefile
+++ b/sysdeps/nptl/Makefile
@@ -24,11 +24,9 @@ ifeq ($(subdir),rt)
 librt-sysdep_routines += timer_routines librt-cancellation
 CFLAGS-librt-cancellation.c += -fexceptions -fasynchronous-unwind-tables
 
-ifeq ($(have-forced-unwind),yes)
 tests += tst-mqueue8x
 CFLAGS-tst-mqueue8x.c += -fexceptions
 endif
-endif
 
 ifeq ($(subdir),posix)
 CFLAGS-confstr.c += -DLIBPTHREAD_VERSION='"NPTL $(version)"'
diff --git a/sysdeps/nptl/configure b/sysdeps/nptl/configure
deleted file mode 100644
index 18bae6bbc0..0000000000
--- a/sysdeps/nptl/configure
+++ /dev/null
@@ -1,78 +0,0 @@
-# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for forced unwind support" >&5
-$as_echo_n "checking for forced unwind support... " >&6; }
-if ${libc_cv_forced_unwind+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  old_CPPFLAGS="$CPPFLAGS"
-# Without inhibit_libc #define'd, GCC's unwind.h (at least for ia64)
-# will try to include <stdlib.h>, which doesn't exist yet if we're
-# building libc in a bare environment.
-CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unwind.h>
-int
-main ()
-{
-
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  libc_cv_forced_unwind=yes
-else
-  libc_cv_forced_unwind=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CPPFLAGS="$old_CPPFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5
-$as_echo "$libc_cv_forced_unwind" >&6; }
-if test $libc_cv_forced_unwind = yes; then
-  $as_echo "#define HAVE_FORCED_UNWIND 1" >>confdefs.h
-
-  old_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Werror -fexceptions"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C cleanup handling" >&5
-$as_echo_n "checking for C cleanup handling... " >&6; }
-if ${libc_cv_c_cleanup+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-extern void some_function (void);
-void cl (void *a) { }
-int
-main ()
-{
-
-  int a __attribute__ ((cleanup (cl)));
-  some_function ()
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  libc_cv_c_cleanup=yes
-else
-  libc_cv_c_cleanup=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_cleanup" >&5
-$as_echo "$libc_cv_c_cleanup" >&6; }
-  CFLAGS="$old_CFLAGS"
-  if test $libc_cv_c_cleanup = no; then
-    as_fn_error $? "the compiler must support C cleanup handling" "$LINENO" 5
-  fi
-else
-  as_fn_error $? "forced unwind support is required" "$LINENO" 5
-fi
diff --git a/sysdeps/nptl/configure.ac b/sysdeps/nptl/configure.ac
deleted file mode 100644
index 1ee3d576be..0000000000
--- a/sysdeps/nptl/configure.ac
+++ /dev/null
@@ -1,37 +0,0 @@
-dnl configure fragment for new libpthread implementation.
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
-dnl Iff <unwind.h> is available, make sure it is the right one and it
-dnl contains struct _Unwind_Exception.
-AC_CACHE_CHECK(dnl
-for forced unwind support, libc_cv_forced_unwind, [dnl
-old_CPPFLAGS="$CPPFLAGS"
-# Without inhibit_libc #define'd, GCC's unwind.h (at least for ia64)
-# will try to include <stdlib.h>, which doesn't exist yet if we're
-# building libc in a bare environment.
-CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1"
-AC_TRY_COMPILE([#include <unwind.h>], [
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)],
-libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)
-CPPFLAGS="$old_CPPFLAGS"])
-if test $libc_cv_forced_unwind = yes; then
-  AC_DEFINE(HAVE_FORCED_UNWIND)
-dnl Check for C cleanup handling.
-  old_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Werror -fexceptions"
-  AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
-  AC_TRY_COMPILE([
-extern void some_function (void);
-void cl (void *a) { }], [
-  int a __attribute__ ((cleanup (cl)));
-  some_function ()],
-libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
-  CFLAGS="$old_CFLAGS"
-  if test $libc_cv_c_cleanup = no; then
-    AC_MSG_ERROR([the compiler must support C cleanup handling])
-  fi
-else
-  AC_MSG_ERROR(forced unwind support is required)
-fi