Browse Source

add support for missing c++11 functions to newlib

Due to a few missing double long complex functions, newlib fail's configure's c99 tests. With _GLIBCXX_USE_C99 unset, a variety of C++11 functions are lost, including to_string and snprintf. This modifies configure to not depend on the results of the complex test. This change is safe since code that attempts to use these missing complex functions will still fail to compile.
pull/70/head
Scott Beamer 11 years ago
parent
commit
c6c83c0884
  1. 25
      patches/gcc

25
patches/gcc

@ -308,3 +308,28 @@ diff -ru gcc-5.1.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_
const unsigned struct___old_kernel_stat_sz = 0;
#elif !defined(__sparc__)
const unsigned struct___old_kernel_stat_sz = 32;
--- original-gcc/libstdc++-v3/configure
+++ gcc/libstdc++-v3/configure
@@ -16641,7 +16641,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Long term, -std=c++0x could be even better, could manage to explicitly
# request C99 facilities to the underlying C headers.
ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++98"
+ CXXFLAGS="$CXXFLAGS -std=gnu++98"
ac_save_LIBS="$LIBS"
ac_save_gcc_no_link="$gcc_no_link"
@@ -17263,9 +17263,11 @@ rm -f core conftest.err conftest.$ac_obj
$as_echo "$glibcxx_cv_c99_wchar" >&6; }
fi
+ # For newlib, don't check complex since missing c99 functions, but
+ # rest of c99 stuff is there so don't loose it
# Option parsed, now set things appropriately.
if test x"$glibcxx_cv_c99_math" = x"no" ||
- test x"$glibcxx_cv_c99_complex" = x"no" ||
+ # test x"$glibcxx_cv_c99_complex" = x"no" ||
test x"$glibcxx_cv_c99_stdio" = x"no" ||
test x"$glibcxx_cv_c99_stdlib" = x"no" ||
test x"$glibcxx_cv_c99_wchar" = x"no"; then

Loading…
Cancel
Save