+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.
+
2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
dnl
dnl Defines:
dnl _GLIBCXX_USE_INT128
-dnl _GLIBCXX_USE_FLOAT128
+dnl ENABLE_FLOAT128
dnl
AC_DEFUN([GLIBCXX_ENABLE_INT128_FLOAT128], [
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
/* 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
CSTDIO_H
SECTION_FLAGS
WERROR
+ENABLE_FLOAT128_FALSE
+ENABLE_FLOAT128_TRUE
thread_header
glibcxx_PCHFLAGS
GLIBCXX_BUILD_PCH_FALSE
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11609 "configure"
+#line 11611 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11715 "configure"
+#line 11717 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15401 "configure"
+#line 15403 "configure"
int main()
{
typedef bool atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15436 "configure"
+#line 15438 "configure"
int main()
{
typedef short atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15471 "configure"
+#line 15473 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15507 "configure"
+#line 15509 "configure"
int main()
{
typedef long long atomic_type;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15588 "configure"
+#line 15590 "configure"
int main()
{
_Decimal32 d1;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15630 "configure"
+#line 15632 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15664 "configure"
+#line 15666 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
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
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='#'
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
echo 0 > stamp-allocator-new
endif
+if ENABLE_FLOAT128
+stamp-float128:
+ echo 1 > stamp-float128
+else
+stamp-float128:
+ echo 0 > 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} \
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` ;\
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 \
-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 "$$ldbl_compat" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
@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 1 > stamp-float128
+@ENABLE_FLOAT128_FALSE@stamp-float128:
+@ENABLE_FLOAT128_FALSE@ echo 0 > 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} \
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` ;\
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 \
-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 "$$ldbl_compat" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
# endif
#endif
+/* Define if __float128 is supported on this host. */
+#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.