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

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