summaryrefslogtreecommitdiff
path: root/libstdc++-v3/acinclude.m4
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-05-04 12:07:09 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-05-04 12:07:09 +0100
commitad0a3be4df5eecc79075d899fd79179d0f61270e (patch)
treef6076b0429da786eee7a2e0107fb8346369c7241 /libstdc++-v3/acinclude.m4
parent93f8cb4965cebee125f96376367f05e18ee5749b (diff)
libstdc++: Remove _GLIBCXX_USE_INT128 autoconf macro
We don't need to decide whether to use __int128 when running configure, we can do so at compilation time by seeing if __SIZEOF_INT128__ is defined and if it's greater than __SIZEOF_LONG_LONG__. This removes another unnecessary architecture-specific config macro in <bits/c++config.h>, so the same header can work for 32-bit or 64-bit compilation on AIX. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_INT128_FLOAT128): Remove checks for __int128 and rename to GLIBCXX_ENABLE_FLOAT128. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Adjust to use GLIBCXX_ENABLE_FLOAT128. * include/bits/random.h (_Select_uint_least_t<s, 1>): Use __SIZEOF_INT128__ to decide whether to use __int128. * include/std/charconv (__to_chars_unsigned_type): Likewise.
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r--libstdc++-v3/acinclude.m436
1 files changed, 4 insertions, 32 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 7b78e148fbd..94897a654c9 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3049,15 +3049,14 @@ EOF
])
dnl
-dnl Check for GNU 128-bit integer and floating point types.
+dnl Check for GNU 128-bit floating point type.
dnl
-dnl Note: also checks that the types aren't standard types.
+dnl Note: also checks that the type isn't a standard types.
dnl
dnl Defines:
-dnl _GLIBCXX_USE_INT128
dnl ENABLE_FLOAT128
dnl
-AC_DEFUN([GLIBCXX_ENABLE_INT128_FLOAT128], [
+AC_DEFUN([GLIBCXX_ENABLE_FLOAT128], [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
@@ -3065,34 +3064,7 @@ AC_DEFUN([GLIBCXX_ENABLE_INT128_FLOAT128], [
# Fake what AC_TRY_COMPILE does, without linking as this is
# unnecessary for this test.
- cat > conftest.$ac_ext << EOF
-[#]line __oline__ "configure"
-template<typename T1, typename T2>
- struct same
- { typedef T2 type; };
-
-template<typename T>
- struct same<T, T>;
-
-int main()
-{
- typename same<long, __int128>::type i1;
- typename same<long long, __int128>::type i2;
-}
-EOF
-
- AC_MSG_CHECKING([for __int128])
- if AC_TRY_EVAL(ac_compile); then
- AC_DEFINE(_GLIBCXX_USE_INT128, 1,
- [Define if __int128 is supported on this host.])
- enable_int128=yes
- else
- enable_int128=no
- fi
- AC_MSG_RESULT($enable_int128)
- rm -f conftest*
-
- cat > conftest.$ac_ext << EOF
+ cat > conftest.$ac_ext << EOF
[#]line __oline__ "configure"
template<typename T1, typename T2>
struct same