Kaydet (Commit) b865ff3d authored tarafından Michael Stahl's avatar Michael Stahl

python3: put an RPATH into python binary ...

... and get rid of LD_LIBRARY_PATH hack in wrapper shell script.

Change-Id: I7d91c6086460504d656de7b018087264165f396b
üst 9dd52eb8
......@@ -40,4 +40,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
))
endif
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
python3/python-3.3.0-elf-rpath.patch.1 \
))
endif
# vim: set noet sw=4 ts=4:
set RPATH (only to be used on ELF platforms)
--- python3/Makefile.pre.in 2013-04-19 15:08:43.637715422 +0200
+++ python3/Makefile.pre.in 2013-04-19 15:07:32.685711138 +0200
@@ -464,7 +464,7 @@
# Build the interpreter
$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) $(SYSCONFIGDATA)
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
......@@ -47,7 +47,6 @@ $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/os.sh : \
$(SRCDIR)/pyuno/zipcore/$(if $(filter MACOSX,$(OS)),mac,nonmac).sh
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" \
-e "s/%%OOO_LIBRARY_PATH_VAR%%/$(gb_Helper_LIBRARY_PATH_VAR)/g" \
$< > $@
# vim: set noet sw=4 ts=4:
# Set %%OOO_LIBRARY_PATH_VAR%% so that python.bin finds libpython2.6.so (this
# can go once python.bin contains a proper RPATH):
%%OOO_LIBRARY_PATH_VAR%%=$sd_prog${%%OOO_LIBRARY_PATH_VAR%%:+:$%%OOO_LIBRARY_PATH_VAR%%}
export %%OOO_LIBRARY_PATH_VAR%%
PYTHONPATH=$sd_prog:$sd_prog/python-core-%%PYVERSION%%/lib:$sd_prog/python-core-%%PYVERSION%%/lib/lib-dynload:$sd_prog/python-core-%%PYVERSION%%/lib/lib-tk:$sd_prog/python-core-%%PYVERSION%%/lib/site-packages${PYTHONPATH+:$PYTHONPATH}
export PYTHONPATH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment