As reported by Ian and Peter in the audit trail, the check I added to detect 
whether -static-libstdc++ is supported by g++ doesn't work because the option 
is silently rejected by versions prior to 4.5.

The attached patch forces an error for these versions so as to make the check 
always fail.  Tested with GCC 4.3 and GCC 4.5, OK for mainline?


2012-10-23  Eric Botcazou  <ebotca...@adacore.com>

        PR bootstrap/54820
        * configure.ac (have_static_libs): Force 'no' for GCC version < 4.5.
        * configure: Regenerate.


-- 
Eric Botcazou
Index: configure.ac
===================================================================
--- configure.ac	(revision 192666)
+++ configure.ac	(working copy)
@@ -1190,7 +1190,11 @@ if test "$GCC" = yes; then
   LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
   AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
   AC_LANG_PUSH(C++)
-  AC_LINK_IFELSE([int main() {}],
+  AC_LINK_IFELSE([
+#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+#error -static-libstdc++ not implemented
+#endif
+int main() {}],
     [AC_MSG_RESULT([yes]); have_static_libs=yes],
     [AC_MSG_RESULT([no])])
   AC_LANG_POP(C++)

Reply via email to