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

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