lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # This file is generated from configure.ac by Autoconf. DO NOT EDIT! |
| 2 | |
| 3 | if test "x$libc_cv_gcc___thread" != xyes; then |
| 4 | as_fn_error $? "compiler support for __thread is required" "$LINENO" 5 |
| 5 | fi |
| 6 | |
| 7 | if 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 |
| 10 | fi |
| 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; } |
| 15 | if ${libc_cv_forced_unwind+:} false; then : |
| 16 | $as_echo_n "(cached) " >&6 |
| 17 | else |
| 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. |
| 22 | CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1" |
| 23 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 24 | /* end confdefs.h. */ |
| 25 | #include <unwind.h> |
| 26 | int |
| 27 | main () |
| 28 | { |
| 29 | |
| 30 | struct _Unwind_Exception exc; |
| 31 | struct _Unwind_Context *context; |
| 32 | _Unwind_GetCFA (context) |
| 33 | ; |
| 34 | return 0; |
| 35 | } |
| 36 | _ACEOF |
| 37 | if ac_fn_c_try_compile "$LINENO"; then : |
| 38 | libc_cv_forced_unwind=yes |
| 39 | else |
| 40 | libc_cv_forced_unwind=no |
| 41 | fi |
| 42 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 43 | CPPFLAGS="$old_CPPFLAGS" |
| 44 | fi |
| 45 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5 |
| 46 | $as_echo "$libc_cv_forced_unwind" >&6; } |
| 47 | if 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; } |
| 54 | if ${libc_cv_c_cleanup+:} false; then : |
| 55 | $as_echo_n "(cached) " >&6 |
| 56 | else |
| 57 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 58 | /* end confdefs.h. */ |
| 59 | |
| 60 | extern void some_function (void); |
| 61 | void cl (void *a) { } |
| 62 | int |
| 63 | main () |
| 64 | { |
| 65 | |
| 66 | int a __attribute__ ((cleanup (cl))); |
| 67 | some_function () |
| 68 | ; |
| 69 | return 0; |
| 70 | } |
| 71 | _ACEOF |
| 72 | if ac_fn_c_try_compile "$LINENO"; then : |
| 73 | libc_cv_c_cleanup=yes |
| 74 | else |
| 75 | libc_cv_c_cleanup=no |
| 76 | fi |
| 77 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 78 | fi |
| 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 |
| 85 | else |
| 86 | as_fn_error $? "forced unwind support is required" "$LINENO" 5 |
| 87 | fi |