summaryrefslogtreecommitdiff
path: root/python2.7/patches/link-whole-archive.diff
diff options
context:
space:
mode:
Diffstat (limited to 'python2.7/patches/link-whole-archive.diff')
-rw-r--r--python2.7/patches/link-whole-archive.diff13
1 files changed, 13 insertions, 0 deletions
diff --git a/python2.7/patches/link-whole-archive.diff b/python2.7/patches/link-whole-archive.diff
new file mode 100644
index 0000000..29d14d2
--- /dev/null
+++ b/python2.7/patches/link-whole-archive.diff
@@ -0,0 +1,13 @@
+# DP: Link libpython with --whole-archive.
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -406,7 +406,7 @@
+ $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ \
+ Modules/python.o \
+- $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
++ -Wl,--whole-archive $(BLDLIBRARY) -Wl,--no-whole-archive $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+ platform: $(BUILDPYTHON)
+ $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform