python: add LD and LDSHARED env vars to Build/Compile/PyMod
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Sun, 19 Oct 2014 07:21:03 +0000 (10:21 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Sun, 19 Oct 2014 19:33:08 +0000 (22:33 +0300)
Tells the host Python to use the target's linker.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/files/python-package.mk

index 2730763872d9774c04efec98cce4df7a31ff7897..35f5ac8378088d81754a44b3f6fa03d763a63696 100644 (file)
@@ -74,9 +74,11 @@ define Build/Compile/PyMod
                cd $(PKG_BUILD_DIR)/$(strip $(1)); \
                CC="$(TARGET_CC)" \
                CCSHARED="$(TARGET_CC) $(FPIC)" \
+               LD="$(TARGET_CC)" \
+               LDSHARED="$(TARGET_CC) -shared" \
                CFLAGS="$(TARGET_CFLAGS)" \
                CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
                $(3) \
                , \
                ./setup.py $(2) \