PR libstdc++/85672 #undef _GLIBCXX_USE_FLOAT128 when not supported
Restore the behaviour in GCC 8 and earlier where _GLIBCXX_USE_FLOAT128 is not defined when configure detects support is missing. This avoids having three states where the macro is either 1, 0, or undefined. 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. From-SVN: r260043
This commit is contained in:
parent
50e461dfe3
commit
41c3db9f28
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2018-05-07 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* doc/xml/manual/using.xml (table.cmd_options): Document that the
|
||||
|
@ -1232,10 +1232,10 @@ endif
|
||||
|
||||
if ENABLE_FLOAT128
|
||||
stamp-float128:
|
||||
echo 1 > stamp-float128
|
||||
echo 'define _GLIBCXX_USE_FLOAT128 1' > stamp-float128
|
||||
else
|
||||
stamp-float128:
|
||||
echo 0 > stamp-float128
|
||||
echo 'undef _GLIBCXX_USE_FLOAT128' > stamp-float128
|
||||
endif
|
||||
|
||||
# NB: The non-empty default ldbl_compat works around an AIX sed
|
||||
@ -1272,7 +1272,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, define _GLIBCXX_USE_FLOAT128 $$float128," \
|
||||
-e "s,define _GLIBCXX_USE_FLOAT128,$$float128," \
|
||||
-e "$$ldbl_compat" \
|
||||
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
|
||||
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
|
||||
|
@ -1663,9 +1663,9 @@ stamp-host: ${host_headers} ${bits_host_headers} ${ext_host_headers} ${host_head
|
||||
@ENABLE_ALLOCATOR_NEW_FALSE@ echo 0 > stamp-allocator-new
|
||||
|
||||
@ENABLE_FLOAT128_TRUE@stamp-float128:
|
||||
@ENABLE_FLOAT128_TRUE@ echo 1 > stamp-float128
|
||||
@ENABLE_FLOAT128_TRUE@ echo 'define _GLIBCXX_USE_FLOAT128 1' > stamp-float128
|
||||
@ENABLE_FLOAT128_FALSE@stamp-float128:
|
||||
@ENABLE_FLOAT128_FALSE@ echo 0 > 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.
|
||||
@ -1701,7 +1701,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, define _GLIBCXX_USE_FLOAT128 $$float128," \
|
||||
-e "s,define _GLIBCXX_USE_FLOAT128,$$float128," \
|
||||
-e "$$ldbl_compat" \
|
||||
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
|
||||
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
|
||||
|
@ -610,9 +610,8 @@ namespace std
|
||||
#endif
|
||||
|
||||
/* Define if __float128 is supported on this host. */
|
||||
#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
|
||||
#define _GLIBCXX_USE_FLOAT128
|
||||
#if !defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)
|
||||
#undef _GLIBCXX_USE_FLOAT128
|
||||
#endif
|
||||
|
||||
// End of prewritten config; the settings discovered at configure time follow.
|
||||
|
Loading…
Reference in New Issue
Block a user