]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/configure.ac
re PR bootstrap/49794 (Solaris 10/x86 bootstrap broken by C++ build)
[thirdparty/gcc.git] / gcc / configure.ac
index 54b6c9d88cd3a838cdf7e24bc5d221573f80eb81..fb243272c79a5b2cd0940957c0039c242cd7f41b 100644 (file)
@@ -1041,7 +1041,14 @@ case "${host}" in
 esac
 AC_FUNC_FORK
 
-AM_ICONV
+# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different
+# iconv() prototype.
+AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"],
+  [AC_LANG_PUSH([C++])
+   AM_ICONV
+   AC_LANG_POP([C++])],
+  [AM_ICONV])
+
 # Until we have in-tree GNU iconv:
 LIBICONV_DEP=
 AC_SUBST(LIBICONV_DEP)