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

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