Blame SOURCES/binutils-do-not-link-with-static-libstdc++.patch

2e9b04
diff -rup binutils.orig/configure binutils-2.30/configure
2e9b04
--- binutils.orig/configure	2018-09-24 17:50:06.967172922 +0100
2e9b04
+++ binutils-2.30/configure	2018-09-24 17:51:16.648624865 +0100
2e9b04
@@ -4996,49 +4996,6 @@ if test -z "$LD"; then
2e9b04
   fi
2e9b04
 fi
2e9b04
 
2e9b04
-# Check whether -static-libstdc++ -static-libgcc is supported.
2e9b04
-have_static_libs=no
2e9b04
-if test "$GCC" = yes; then
2e9b04
-  saved_LDFLAGS="$LDFLAGS"
2e9b04
-
2e9b04
-  LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
2e9b04
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
2e9b04
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
2e9b04
-  ac_ext=cpp
2e9b04
-ac_cpp='$CXXCPP $CPPFLAGS'
2e9b04
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2e9b04
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2e9b04
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2e9b04
-
2e9b04
-
2e9b04
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2e9b04
-/* end confdefs.h.  */
2e9b04
-
2e9b04
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
2e9b04
-#error -static-libstdc++ not implemented
2e9b04
-#endif
2e9b04
-int main() {}
2e9b04
-_ACEOF
2e9b04
-if ac_fn_cxx_try_link "$LINENO"; then :
2e9b04
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2e9b04
-$as_echo "yes" >&6; }; have_static_libs=yes
2e9b04
-else
2e9b04
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2e9b04
-$as_echo "no" >&6; }
2e9b04
-fi
2e9b04
-rm -f core conftest.err conftest.$ac_objext \
2e9b04
-    conftest$ac_exeext conftest.$ac_ext
2e9b04
-  ac_ext=c
2e9b04
-ac_cpp='$CPP $CPPFLAGS'
2e9b04
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2e9b04
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2e9b04
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
2e9b04
-
2e9b04
-
2e9b04
-  LDFLAGS="$saved_LDFLAGS"
2e9b04
-fi
2e9b04
-
2e9b04
-
2e9b04
 
2e9b04
 
2e9b04
 if test -n "$ac_tool_prefix"; then
2e9b04
diff -rup binutils.orig/configure.ac binutils-2.30/configure.ac
2e9b04
--- binutils.orig/configure.ac	2018-09-24 17:50:07.241170767 +0100
2e9b04
+++ binutils-2.30/configure.ac	2018-09-24 17:50:29.908992486 +0100
2e9b04
@@ -1288,26 +1288,6 @@ if test -z "$LD"; then
2e9b04
   fi
2e9b04
 fi
2e9b04
 
2e9b04
-# Check whether -static-libstdc++ -static-libgcc is supported.
2e9b04
-have_static_libs=no
2e9b04
-if test "$GCC" = yes; then
2e9b04
-  saved_LDFLAGS="$LDFLAGS"
2e9b04
-
2e9b04
-  LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
2e9b04
-  AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
2e9b04
-  AC_LANG_PUSH(C++)
2e9b04
-  AC_LINK_IFELSE([AC_LANG_SOURCE([
2e9b04
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
2e9b04
-#error -static-libstdc++ not implemented
2e9b04
-#endif
2e9b04
-int main() {}])],
2e9b04
-    [AC_MSG_RESULT([yes]); have_static_libs=yes],
2e9b04
-    [AC_MSG_RESULT([no])])
2e9b04
-  AC_LANG_POP(C++)
2e9b04
-
2e9b04
-  LDFLAGS="$saved_LDFLAGS"
2e9b04
-fi
2e9b04
-
2e9b04
 ACX_PROG_GNAT
2e9b04
 ACX_PROG_CMP_IGNORE_INITIAL
2e9b04