Start mass upgrade
[dragora.git] / patches / binutils / 2.35 / binutils-do-not-link-with-static-libstdc++.patch
blob49d46c2e6f3381970a7d0880d77dac00b541caaf
1 diff -rup binutils.orig/configure binutils-2.30/configure
2 --- binutils.orig/configure 2018-09-24 17:50:06.967172922 +0100
3 +++ binutils-2.30/configure 2018-09-24 17:51:16.648624865 +0100
4 @@ -4996,49 +4996,6 @@ if test -z "$LD"; then
5 fi
6 fi
8 -# Check whether -static-libstdc++ -static-libgcc is supported.
9 -have_static_libs=no
10 -if test "$GCC" = yes; then
11 - saved_LDFLAGS="$LDFLAGS"
13 - LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
14 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
15 -$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
16 - ac_ext=cpp
17 -ac_cpp='$CXXCPP $CPPFLAGS'
18 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24 -/* end confdefs.h. */
26 -#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
27 -#error -static-libstdc++ not implemented
28 -#endif
29 -int main() {}
30 -_ACEOF
31 -if ac_fn_cxx_try_link "$LINENO"; then :
32 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33 -$as_echo "yes" >&6; }; have_static_libs=yes
34 -else
35 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36 -$as_echo "no" >&6; }
37 -fi
38 -rm -f core conftest.err conftest.$ac_objext \
39 - conftest$ac_exeext conftest.$ac_ext
40 - ac_ext=c
41 -ac_cpp='$CPP $CPPFLAGS'
42 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
47 - LDFLAGS="$saved_LDFLAGS"
48 -fi
53 if test -n "$ac_tool_prefix"; then
54 diff -rup binutils.orig/configure.ac binutils-2.30/configure.ac
55 --- binutils.orig/configure.ac 2018-09-24 17:50:07.241170767 +0100
56 +++ binutils-2.30/configure.ac 2018-09-24 17:50:29.908992486 +0100
57 @@ -1288,26 +1288,6 @@ if test -z "$LD"; then
61 -# Check whether -static-libstdc++ -static-libgcc is supported.
62 -have_static_libs=no
63 -if test "$GCC" = yes; then
64 - saved_LDFLAGS="$LDFLAGS"
66 - LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
67 - AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
68 - AC_LANG_PUSH(C++)
69 - AC_LINK_IFELSE([AC_LANG_SOURCE([
70 -#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
71 -#error -static-libstdc++ not implemented
72 -#endif
73 -int main() {}])],
74 - [AC_MSG_RESULT([yes]); have_static_libs=yes],
75 - [AC_MSG_RESULT([no])])
76 - AC_LANG_POP(C++)
78 - LDFLAGS="$saved_LDFLAGS"
79 -fi
81 ACX_PROG_GNAT
82 ACX_PROG_CMP_IGNORE_INITIAL