aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/link-whole-archive.diff
blob: 29d14d21e5c125ff4f1a64632a98735d17a59073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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