summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-02-08 15:00:40 -0800
committerJosh Gao <jmgao@google.com>2016-02-08 16:09:48 -0800
commit075a5954dd41e2e2cae953de4e27af92fcc38740 (patch)
tree788cdcbc1b6d8abb2801fbbc2248add8fbcd53d9
parent9f4ff9a4e37ba59cb1d3ba209e0498bf935e7c7a (diff)
downloadpython-075a5954dd41e2e2cae953de4e27af92fcc38740.tar.gz
Sprinkle more -static-libgcc on the python build system.
This should actually fix the windows python/gdb binaries. Bug: http://b/26875911 Change-Id: I392030eaead0fb1ec4c347c0863248780edb6cb5
-rw-r--r--Python-2.7.5/Lib/distutils/unixccompiler.py4
-rw-r--r--Python-2.7.5/Makefile.pre.in2
-rw-r--r--Python-2.7.5/configure.ac2
3 files changed, 6 insertions, 2 deletions
diff --git a/Python-2.7.5/Lib/distutils/unixccompiler.py b/Python-2.7.5/Lib/distutils/unixccompiler.py
index d30ab4f..23f0941 100644
--- a/Python-2.7.5/Lib/distutils/unixccompiler.py
+++ b/Python-2.7.5/Lib/distutils/unixccompiler.py
@@ -172,6 +172,10 @@ class UnixCCompiler(CCompiler):
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
+
+ # HACK: Avoid dependency on libgcc dll on mingw.
+ ld_args.extend(["-static-libgcc"])
+
self.mkpath(os.path.dirname(output_filename))
try:
if target_desc == CCompiler.EXECUTABLE:
diff --git a/Python-2.7.5/Makefile.pre.in b/Python-2.7.5/Makefile.pre.in
index 4c488d7..ec96d2f 100644
--- a/Python-2.7.5/Makefile.pre.in
+++ b/Python-2.7.5/Makefile.pre.in
@@ -524,7 +524,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
# for a shared core library; otherwise, this rule is a noop.
$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
if test -n "$(DLLLIBRARY)"; then \
- $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
+ $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) -static-libgcc $^ \
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
else true; \
fi
diff --git a/Python-2.7.5/configure.ac b/Python-2.7.5/configure.ac
index 18efdf1..fe6db13 100644
--- a/Python-2.7.5/configure.ac
+++ b/Python-2.7.5/configure.ac
@@ -2337,7 +2337,7 @@ then
case $host in
*-*-mingw*)
if test x$enable_shared = xyes; then
- LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
+ LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY) -static-libgcc'
fi;;
esac
fi