aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lander <george.lander@arm.com>2017-03-10 12:22:45 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-03-10 12:22:45 +0000
commit74106ead26b17f3e68b73c6704632cbbbf762a5c (patch)
tree136a2a10cf6b54b45778457a25cce75815658367
parentf1b0632aabe6473bf810b5e901d979a4570b7de5 (diff)
downloadgcc-74106ead26b17f3e68b73c6704632cbbbf762a5c.zip
gcc-74106ead26b17f3e68b73c6704632cbbbf762a5c.tar.gz
gcc-74106ead26b17f3e68b73c6704632cbbbf762a5c.tar.bz2
[libstdc++-v3] Fix detection of obsolete isnan
libstdc++-v3 configure checks whether old glibc inline definitions of isnan would conflict with the libstdc++-v3 definitions and works around them if so. But if g++ 6.x build A is used to build another g++ 6.x B, the configure step for B will pick up the math.h installed alongside A instead of the glibc version. configure will then assume that the workaround isn't necessary, leaving B with a broken cmath. isinf already worked around this. This patch extends the same fix to isnan. (Thanks to George for the fix.) libstdc++-v3/ 2017-03-10 George Lander <george.lander@arm.com> * acinclude.m4 (glibcxx_cv_obsolete_isnan): Define _GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h. * configure: Regenerate. From-SVN: r246025
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/acinclude.m43
-rwxr-xr-xlibstdc++-v3/configure1
3 files changed, 9 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9da31bc..d94f6d4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-10 George Lander <george.lander@arm.com>
+
+ * acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
+ _GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
+ * configure: Regenerate.
+
2017-03-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/functional (_Not_fn): Define macro to simplify
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index d9859aa..5998fe6 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2297,7 +2297,8 @@ AC_DEFUN([GLIBCXX_CHECK_MATH11_PROTO], [
AC_MSG_CHECKING([for obsolete isnan function in <math.h>])
AC_CACHE_VAL(glibcxx_cv_obsolete_isnan, [
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [#include <math.h>
+ [#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include <math.h>
#undef isnan
namespace std {
using ::isnan;
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 9bb9862..29456c4 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -18390,6 +18390,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include <math.h>
#undef isnan
namespace std {