]> gcc.gnu.org Git - gcc.git/commitdiff
PR libstdc++/84654 Disable __float128 specializations for -mno-float128
authorJonathan Wakely <jwakely@redhat.com>
Tue, 7 Aug 2018 22:50:49 +0000 (23:50 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 7 Aug 2018 22:50:49 +0000 (23:50 +0100)
Backport from mainline
2018-05-08  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/85672
* include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
* include/Makefile.in: Regenerate.
* include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
within conditional block.

Backport from mainline
2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>

PR libstdc++/84654
* acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
* config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
* configure: Regenerate.
* include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
based on ENABLE_FLOAT128.
* include/Makefile.in: Regenerate.
* include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
[!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
_GLIBCXX_USE_FLOAT128.

From-SVN: r263382

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/c++config

index d4b6e15b82403464878b3d9e8f6deee9899ee2d9..81fa0ec1c5229b100226f4e042bd7696aab7ad92 100644 (file)
@@ -1,5 +1,29 @@
 2018-08-07  Jonathan Wakely  <jwakely@redhat.com>
 
+       Backport from mainline
+       2018-05-08  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/85672
+       * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
+       to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
+       * include/Makefile.in: Regenerate.
+       * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
+       within conditional block.
+
+       Backport from mainline
+       2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+       PR libstdc++/84654
+       * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
+       * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
+       * configure: Regenerate.
+       * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
+       based on ENABLE_FLOAT128.
+       * include/Makefile.in: Regenerate.
+       * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
+       [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
+       _GLIBCXX_USE_FLOAT128.
+
        Backport from mainline
        2017-06-17  Jonathan Wakely  <jwakely@redhat.com>
 
index 805148d3b7d0008f8faa382da3fb399144d74d28..67d844726538940fe26c0c47bcd1fa7d5bba951b 100644 (file)
@@ -3062,7 +3062,7 @@ dnl Note: also checks that the types aren't standard types.
 dnl
 dnl Defines:
 dnl  _GLIBCXX_USE_INT128
-dnl  _GLIBCXX_USE_FLOAT128
+dnl  ENABLE_FLOAT128
 dnl
 AC_DEFUN([GLIBCXX_ENABLE_INT128_FLOAT128], [
 
@@ -3117,13 +3117,12 @@ EOF
 
     AC_MSG_CHECKING([for __float128])
     if AC_TRY_EVAL(ac_compile); then
-      AC_DEFINE(_GLIBCXX_USE_FLOAT128, 1,
-      [Define if __float128 is supported on this host.])
       enable_float128=yes
     else
       enable_float128=no
     fi
     AC_MSG_RESULT($enable_float128)
+    GLIBCXX_CONDITIONAL(ENABLE_FLOAT128, test $enable_float128 = yes)
     rm -f conftest*
 
   AC_LANG_RESTORE
index f1527d9938b45b23b53850fa87f21e80d3fb6bfb..198f69626bfbb1a7ee4efea632564b86a9609820 100644 (file)
 /* Define if fchmodat is available in <sys/stat.h>. */
 #undef _GLIBCXX_USE_FCHMODAT
 
-/* Define if __float128 is supported on this host. */
-#undef _GLIBCXX_USE_FLOAT128
-
 /* Defined if gettimeofday is available. */
 #undef _GLIBCXX_USE_GETTIMEOFDAY
 
index d352918884b1b52b09d2477874635c5ded10e270..e1c55aa72ff591f87141a8952ddc1cdf9d6a03d6 100755 (executable)
@@ -728,6 +728,8 @@ BASIC_FILE_H
 CSTDIO_H
 SECTION_FLAGS
 WERROR
+ENABLE_FLOAT128_FALSE
+ENABLE_FLOAT128_TRUE
 thread_header
 glibcxx_PCHFLAGS
 GLIBCXX_BUILD_PCH_FALSE
@@ -11603,7 +11605,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11606 "configure"
+#line 11608 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11709,7 +11711,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11712 "configure"
+#line 11714 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15395,7 +15397,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15398 "configure"
+#line 15400 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15430,7 +15432,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15433 "configure"
+#line 15435 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15465,7 +15467,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15468 "configure"
+#line 15470 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15501,7 +15503,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15504 "configure"
+#line 15506 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15582,7 +15584,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15585 "configure"
+#line 15587 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15624,7 +15626,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15627 "configure"
+#line 15629 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15658,7 +15660,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15661 "configure"
+#line 15663 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15680,15 +15682,13 @@ $as_echo_n "checking for __float128... " >&6; }
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-
-$as_echo "#define _GLIBCXX_USE_FLOAT128 1" >>confdefs.h
-
       enable_float128=yes
     else
       enable_float128=no
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float128" >&5
 $as_echo "$enable_float128" >&6; }
+
     rm -f conftest*
 
   ac_ext=c
@@ -81315,6 +81315,15 @@ else
 fi
 
 
+    if test $enable_float128 = yes; then
+  ENABLE_FLOAT128_TRUE=
+  ENABLE_FLOAT128_FALSE='#'
+else
+  ENABLE_FLOAT128_TRUE='#'
+  ENABLE_FLOAT128_FALSE=
+fi
+
+
     if test $enable_libstdcxx_allocator_flag = new; then
   ENABLE_ALLOCATOR_NEW_TRUE=
   ENABLE_ALLOCATOR_NEW_FALSE='#'
@@ -81858,6 +81867,10 @@ if test -z "${GLIBCXX_BUILD_PCH_TRUE}" && test -z "${GLIBCXX_BUILD_PCH_FALSE}";
   as_fn_error "conditional \"GLIBCXX_BUILD_PCH\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_FLOAT128_TRUE}" && test -z "${ENABLE_FLOAT128_FALSE}"; then
+  as_fn_error "conditional \"ENABLE_FLOAT128\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_ALLOCATOR_NEW_TRUE}" && test -z "${ENABLE_ALLOCATOR_NEW_FALSE}"; then
   as_fn_error "conditional \"ENABLE_ALLOCATOR_NEW\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 370c1fe26820272b2d17094d3edcc8fd684c326f..85b22a606d54010435b992d256ed0c0b47e6b5c4 100644 (file)
@@ -1225,6 +1225,14 @@ stamp-allocator-new:
        echo 0 > stamp-allocator-new
 endif
 
+if ENABLE_FLOAT128
+stamp-float128:
+       echo 'define _GLIBCXX_USE_FLOAT128 1' > stamp-float128
+else
+stamp-float128:
+       echo 'undef _GLIBCXX_USE_FLOAT128' > stamp-float128
+endif
+
 # NB: The non-empty default ldbl_compat works around an AIX sed
 # oddity, see libstdc++/31957 for details.
 ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
@@ -1236,7 +1244,8 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
                              stamp-extern-template \
                              stamp-dual-abi \
                              stamp-cxx11-abi \
-                             stamp-allocator-new
+                             stamp-allocator-new \
+                             stamp-float128
        @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
        release=`sed 's/^\([0-9]*\).*$$/\1/' ${toplevel_srcdir}/gcc/BASE-VER` ;\
        ns_version=`cat stamp-namespace-version` ;\
@@ -1245,6 +1254,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
        dualabi=`cat stamp-dual-abi` ;\
        cxx11abi=`cat stamp-cxx11-abi` ;\
        allocatornew=`cat stamp-allocator-new` ;\
+       float128=`cat stamp-float128` ;\
        ldbl_compat='s,g,g,' ;\
        grep "^[         ]*#[    ]*define[       ][      ]*_GLIBCXX_LONG_DOUBLE_COMPAT[  ][      ]*1[    ]*$$" \
        ${CONFIG_HEADER} > /dev/null 2>&1 \
@@ -1257,6 +1267,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
        -e "s,define _GLIBCXX_USE_DUAL_ABI, define _GLIBCXX_USE_DUAL_ABI $$dualabi," \
        -e "s,define _GLIBCXX_USE_CXX11_ABI, define _GLIBCXX_USE_CXX11_ABI $$cxx11abi," \
        -e "s,define _GLIBCXX_USE_ALLOCATOR_NEW, define _GLIBCXX_USE_ALLOCATOR_NEW $$allocatornew," \
+       -e "s,define _GLIBCXX_USE_FLOAT128,$$float128," \
        -e "$$ldbl_compat" \
            < ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
        sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
index 50ad7eccb01d2e2155dd954e843cf913a9c55bae..d940fcbdf84a932e70e0ff66061bd26d5d48ddc5 100644 (file)
@@ -1656,6 +1656,11 @@ stamp-host: ${host_headers} ${bits_host_headers} ${ext_host_headers} ${host_head
 @ENABLE_ALLOCATOR_NEW_FALSE@stamp-allocator-new:
 @ENABLE_ALLOCATOR_NEW_FALSE@   echo 0 > stamp-allocator-new
 
+@ENABLE_FLOAT128_TRUE@stamp-float128:
+@ENABLE_FLOAT128_TRUE@ echo 'define _GLIBCXX_USE_FLOAT128 1' > stamp-float128
+@ENABLE_FLOAT128_FALSE@stamp-float128:
+@ENABLE_FLOAT128_FALSE@        echo 'undef _GLIBCXX_USE_FLOAT128' > stamp-float128
+
 # NB: The non-empty default ldbl_compat works around an AIX sed
 # oddity, see libstdc++/31957 for details.
 ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
@@ -1667,7 +1672,8 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
                              stamp-extern-template \
                              stamp-dual-abi \
                              stamp-cxx11-abi \
-                             stamp-allocator-new
+                             stamp-allocator-new \
+                             stamp-float128
        @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
        release=`sed 's/^\([0-9]*\).*$$/\1/' ${toplevel_srcdir}/gcc/BASE-VER` ;\
        ns_version=`cat stamp-namespace-version` ;\
@@ -1676,6 +1682,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
        dualabi=`cat stamp-dual-abi` ;\
        cxx11abi=`cat stamp-cxx11-abi` ;\
        allocatornew=`cat stamp-allocator-new` ;\
+       float128=`cat stamp-float128` ;\
        ldbl_compat='s,g,g,' ;\
        grep "^[         ]*#[    ]*define[       ][      ]*_GLIBCXX_LONG_DOUBLE_COMPAT[  ][      ]*1[    ]*$$" \
        ${CONFIG_HEADER} > /dev/null 2>&1 \
@@ -1688,6 +1695,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
        -e "s,define _GLIBCXX_USE_DUAL_ABI, define _GLIBCXX_USE_DUAL_ABI $$dualabi," \
        -e "s,define _GLIBCXX_USE_CXX11_ABI, define _GLIBCXX_USE_CXX11_ABI $$cxx11abi," \
        -e "s,define _GLIBCXX_USE_ALLOCATOR_NEW, define _GLIBCXX_USE_ALLOCATOR_NEW $$allocatornew," \
+       -e "s,define _GLIBCXX_USE_FLOAT128,$$float128," \
        -e "$$ldbl_compat" \
            < ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
        sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
index 8ca6b0345b12a00261acf393e8ccad11a05a12da..70bb49f9eec8804b810b1bbd0f2d6151d2bbe950 100644 (file)
@@ -634,4 +634,9 @@ namespace std
 # endif
 #endif
 
+/* Define if __float128 is supported on this host. */
+#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
+#define _GLIBCXX_USE_FLOAT128
+#endif
+
 // End of prewritten config; the settings discovered at configure time follow.
This page took 0.143779 seconds and 5 git commands to generate.