blob: cce07b35d285ba716fd8b72d822896da055807b3 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2
3if test "x$libc_cv_gcc___thread" != xyes; then
4 as_fn_error $? "compiler support for __thread is required" "$LINENO" 5
5fi
6
7if test "x${libc_cv_visibility_attribute}" != xyes ||
8 test "x${libc_cv_broken_visibility_attribute}" != xno; then
9 as_fn_error $? "working compiler support for visibility attribute is required" "$LINENO" 5
10fi
11
12
13{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for forced unwind support" >&5
14$as_echo_n "checking for forced unwind support... " >&6; }
15if ${libc_cv_forced_unwind+:} false; then :
16 $as_echo_n "(cached) " >&6
17else
18 old_CPPFLAGS="$CPPFLAGS"
19# Without inhibit_libc #define'd, GCC's unwind.h (at least for ia64)
20# will try to include <stdlib.h>, which doesn't exist yet if we're
21# building libc in a bare environment.
22CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1"
23cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24/* end confdefs.h. */
25#include <unwind.h>
26int
27main ()
28{
29
30struct _Unwind_Exception exc;
31struct _Unwind_Context *context;
32_Unwind_GetCFA (context)
33 ;
34 return 0;
35}
36_ACEOF
37if ac_fn_c_try_compile "$LINENO"; then :
38 libc_cv_forced_unwind=yes
39else
40 libc_cv_forced_unwind=no
41fi
42rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43CPPFLAGS="$old_CPPFLAGS"
44fi
45{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5
46$as_echo "$libc_cv_forced_unwind" >&6; }
47if test $libc_cv_forced_unwind = yes; then
48 $as_echo "#define HAVE_FORCED_UNWIND 1" >>confdefs.h
49
50 old_CFLAGS="$CFLAGS"
51 CFLAGS="$CFLAGS -Werror -fexceptions"
52 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C cleanup handling" >&5
53$as_echo_n "checking for C cleanup handling... " >&6; }
54if ${libc_cv_c_cleanup+:} false; then :
55 $as_echo_n "(cached) " >&6
56else
57 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58/* end confdefs.h. */
59
60extern void some_function (void);
61void cl (void *a) { }
62int
63main ()
64{
65
66 int a __attribute__ ((cleanup (cl)));
67 some_function ()
68 ;
69 return 0;
70}
71_ACEOF
72if ac_fn_c_try_compile "$LINENO"; then :
73 libc_cv_c_cleanup=yes
74else
75 libc_cv_c_cleanup=no
76fi
77rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78fi
79{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_cleanup" >&5
80$as_echo "$libc_cv_c_cleanup" >&6; }
81 CFLAGS="$old_CFLAGS"
82 if test $libc_cv_c_cleanup = no; then
83 as_fn_error $? "the compiler must support C cleanup handling" "$LINENO" 5
84 fi
85else
86 as_fn_error $? "forced unwind support is required" "$LINENO" 5
87fi