python: add rpath for host Python extension modules 2489/head
authorJeffery To <jeffery.to@gmail.com>
Sat, 12 Mar 2016 16:50:12 +0000 (00:50 +0800)
committerJeffery To <jeffery.to@gmail.com>
Sat, 12 Mar 2016 16:50:12 +0000 (00:50 +0800)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/files/python-host.mk

index 0327f3ad23ff6281fc0a9d9b21f28e1964d44846..8736d29ad27123b795ac65379e735122a574d189 100644 (file)
@@ -44,7 +44,7 @@ define Build/Compile/HostPyMod
                LDSHARED="$(HOSTCC) -shared" \
                CFLAGS="$(HOST_CFLAGS)" \
                CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
-               LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION)" \
+               LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
                _PYTHON_HOST_PLATFORM=linux2 \
                $(3) \
                , \