diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2016-10-16 20:12:52 +0200 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2016-10-16 20:12:52 +0200 |
commit | 493a6a7da66b065821b3a22446968b272b5c45bc (patch) | |
tree | 3984391651c53c8a35beebf2446111c0dfb5d72a /libstdc++-v3/acinclude.m4 | |
parent | fe89a30c89f79a4ddbb0c22c4ceaf6a1b2e34197 (diff) |
Merge branches/gcc-6-branch rev 241214.
Change-Id: I2fc7e5fc01a9015199e9be293b8a7b503fd5a829
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 650a26cd7c2..e5f1e4c2cee 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2153,6 +2153,10 @@ AC_DEFUN([GLIBCXX_CHECK_STDIO_PROTO], [ AC_LANG_SAVE AC_LANG_CPLUSPLUS + # Use C++11 because a conforming <stdio.h> won't define gets for C++14, + # and we don't need a declaration for C++14 anyway. + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=gnu++11" AC_MSG_CHECKING([for gets declaration]) AC_CACHE_VAL(glibcxx_cv_gets, [ @@ -2168,10 +2172,11 @@ AC_DEFUN([GLIBCXX_CHECK_STDIO_PROTO], [ )]) if test $glibcxx_cv_gets = yes; then - AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in <stdio.h>.]) + AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in <stdio.h> before C++14.]) fi AC_MSG_RESULT($glibcxx_cv_gets) + CXXFLAGS="$ac_save_CXXFLAGS" AC_LANG_RESTORE ]) @@ -3489,10 +3494,12 @@ EOF CXXFLAGS="$old_CXXFLAGS" AC_LANG_RESTORE - # Set atomicity_dir to builtins if all but the long long test above passes. - if test "$glibcxx_cv_atomic_bool" = yes \ + # Set atomicity_dir to builtins if all but the long long test above passes, + # or if the builtins were already chosen (e.g. by configure.host). + if { test "$glibcxx_cv_atomic_bool" = yes \ && test "$glibcxx_cv_atomic_short" = yes \ - && test "$glibcxx_cv_atomic_int" = yes; then + && test "$glibcxx_cv_atomic_int" = yes; } \ + || test "$atomicity_dir" = "cpu/generic/atomicity_builtins"; then AC_DEFINE(_GLIBCXX_ATOMIC_BUILTINS, 1, [Define if the compiler supports C++11 atomics.]) atomicity_dir=cpu/generic/atomicity_builtins |