aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure82
1 files changed, 18 insertions, 64 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 3fd03b8..69aa246 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -51990,64 +51990,6 @@ fi
fi
fi
- ac_fn_cxx_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
-if test "x$ac_cv_header_semaphore_h" = xyes; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX Semaphores and sem_timedwait" >&5
-$as_echo_n "checking for POSIX Semaphores and sem_timedwait... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <unistd.h>
- #include <semaphore.h>
- #include <limits.h>
-
-int
-main ()
-{
-
- #if !defined _POSIX_TIMEOUTS || _POSIX_TIMEOUTS <= 0
- # error "POSIX Timeouts option not supported"
- #elif !defined _POSIX_SEMAPHORES || _POSIX_SEMAPHORES <= 0
- # error "POSIX Semaphores option not supported"
- #else
- #if defined SEM_VALUE_MAX
- constexpr int sem_value_max = SEM_VALUE_MAX;
- #elif defined _POSIX_SEM_VALUE_MAX
- constexpr int sem_value_max = _POSIX_SEM_VALUE_MAX;
- #else
- # error "SEM_VALUE_MAX not available"
- #endif
- sem_t sem;
- sem_init(&sem, 0, sem_value_max);
- struct timespec ts = { 0 };
- sem_timedwait(&sem, &ts);
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_have_posix_semaphore=yes
-else
- ac_have_posix_semaphore=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- ac_have_posix_semaphore=no
-fi
-
-
-
- if test $ac_have_posix_semaphore = yes ; then
-
-$as_echo "#define HAVE_POSIX_SEMAPHORE 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_posix_semaphore" >&5
-$as_echo "$ac_have_posix_semaphore" >&6; }
-
CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -53537,7 +53479,13 @@ fi
BACKTRACE_CPPFLAGS="-D_GNU_SOURCE"
- GLIBCXX_LANG_PUSH
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ old_CXXFLAGS="$CXXFLAGS"
# libbacktrace's own configure.ac only tests atomics for int,
# but the code actually uses atomics for size_t and pointers as well.
@@ -53562,7 +53510,7 @@ main ()
int i = 0;
int* p = &i;
- size_t s = 0;
+ __SIZE_TYPE__ s = 0;
// backtrace_atomic_load_pointer
void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE);
// backtrace_atomic_load_int
@@ -53578,7 +53526,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
glibcxx_cv_libbacktrace_atomics=yes
else
glibcxx_cv_libbacktrace_atomics=no
@@ -53595,13 +53543,13 @@ $as_echo "$glibcxx_cv_libbacktrace_atomics" >&6; }
CXXFLAGS='-O0 -S'
cat > conftest.$ac_ext << EOF
-#line 53598 "configure"
+#line 53546 "configure"
#include <stddef.h>
int main()
{
int i = 0;
int* p = &i;
- size_t s = 0;
+ __SIZE_TYPE__ s = 0;
// backtrace_atomic_load_pointer
void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE);
// backtrace_atomic_load_int
@@ -53633,7 +53581,13 @@ $as_echo "$glibcxx_cv_libbacktrace_atomics" >&6; }
rm -f conftest*
fi
- GLIBCXX_LANG_POP
+ CXXFLAGS="$old_CXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test "$glibcxx_cv_libbacktrace_atomics" = yes; then
BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_ATOMIC_FUNCTIONS=1"