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