|
| 1 | +diff --git a/Makefile.in b/Makefile.in |
| 2 | +index f12c251f9c8..eed512b2d18 100644 |
| 3 | +--- a/Makefile.in |
| 4 | ++++ b/Makefile.in |
| 5 | +@@ -31593,7 +31593,7 @@ configure-readline: |
| 6 | + $$s/$$module_srcdir/configure \ |
| 7 | + --srcdir=$${topdir}/$$module_srcdir \ |
| 8 | + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ |
| 9 | +- --target=${target_alias} \ |
| 10 | ++ --target=${target_alias} --enable-static \ |
| 11 | + || exit 1 |
| 12 | + @endif readline |
| 13 | + |
| 14 | +@@ -40793,7 +40793,7 @@ configure-libcc1: |
| 15 | + $$s/$$module_srcdir/configure \ |
| 16 | + --srcdir=$${topdir}/$$module_srcdir \ |
| 17 | + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ |
| 18 | +- --target=${target_alias} --enable-shared \ |
| 19 | ++ --target=${target_alias} --enable-static --disable-shared \ |
| 20 | + || exit 1 |
| 21 | + @endif libcc1 |
| 22 | + |
| 23 | +diff --git a/configure b/configure |
| 24 | +index 6466b97f3ec..2ab23dcb81e 100755 |
| 25 | +--- a/configure |
| 26 | ++++ b/configure |
| 27 | +@@ -9398,7 +9398,7 @@ case " $configdirs " in |
| 28 | + *" lto-plugin "* | *" libcc1 "* | *" gdbserver "*) |
| 29 | + # When these are to be built as shared libraries, the same applies to |
| 30 | + # libiberty. |
| 31 | +- extra_host_libiberty_configure_flags=--enable-shared |
| 32 | ++ extra_host_libiberty_configure_flags="--enable-static --disable-shared" |
| 33 | + ;; |
| 34 | + esac |
| 35 | + |
| 36 | +diff --git a/gdb/Makefile.in b/gdb/Makefile.in |
| 37 | +index 84bc54b303e..c81269ced78 100644 |
| 38 | +--- a/gdb/Makefile.in |
| 39 | ++++ b/gdb/Makefile.in |
| 40 | +@@ -148,7 +148,7 @@ LIBTOOL = @LIBTOOL@ |
| 41 | + # Set this up with gcc if you have gnu ld and the loader will print out |
| 42 | + # line numbers for undefined references. |
| 43 | + #CC_LD = g++ -static |
| 44 | +-CC_LD = $(LIBTOOL) $(SILENT_FLAG) --mode=link $(CXX) $(CXX_DIALECT) |
| 45 | ++CC_LD = $(LIBTOOL) $(SILENT_FLAG) --mode=link $(CXX) -all-static $(CXX_DIALECT) |
| 46 | + |
| 47 | + # Where is our "include" directory? Typically $(srcdir)/../include. |
| 48 | + # This is essentially the header file directory for the library |
| 49 | +diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in |
| 50 | +index 6148ccf9121..2a9c9720d1a 100644 |
| 51 | +--- a/gdbserver/Makefile.in |
| 52 | ++++ b/gdbserver/Makefile.in |
| 53 | +@@ -83,7 +83,7 @@ COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(INCLUDE_SERVER_H) \ |
| 54 | + # Set this up with gcc if you have gnu ld and the loader will print out |
| 55 | + # line numbers for undefinded refs. |
| 56 | + #CC_LD = g++ -static |
| 57 | +-CC_LD = $(CXX) $(CXX_DIALECT) |
| 58 | ++CC_LD = $(CXX) -static $(CXX_DIALECT) |
| 59 | + |
| 60 | + # Where is the "include" directory? Traditionally ../include or ./include |
| 61 | + INCLUDE_DIR = ${srcdir}/../include |
| 62 | +@@ -405,7 +405,7 @@ IPA_LIB = libinproctrace.so |
| 63 | + |
| 64 | + $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS} |
| 65 | + $(SILENCE) rm -f $(IPA_LIB) |
| 66 | +- $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \ |
| 67 | ++ $(ECHO_CXXLD) $(CC_LD) -static -fPIC -Wl,--soname=$(IPA_LIB) \ |
| 68 | + -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \ |
| 69 | + $(CXXFLAGS) \ |
| 70 | + -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread |
0 commit comments