summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2012-02-14 09:32:30 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2012-02-14 09:32:30 (GMT)
commit40281284ad5ab41fea4058d57c130cbae0fb9d70 (patch)
treee0da97dc4eafd2a33d70be7808ab0c0364f1ea7b
parent6a180a9a1f97e6c71840211603017f1da6ab1adc (diff)
downloadbuildroot-40281284ad5ab41fea4058d57c130cbae0fb9d70.tar.gz
buildroot-40281284ad5ab41fea4058d57c130cbae0fb9d70.tar.bz2
python: workaround distutils issue with binary extensions
distutils adds -L$LIBDIR (/usr/lib), breaking build of binary extensions. Seen with netifaces, but other extensions may be affected as well. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/python/python.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/python/python.mk b/package/python/python.mk
index 78895d4..28e215c 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -131,6 +131,15 @@ PYTHON_MAKE_ENV = \
PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \
PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"
+# python distutils adds -L$LIBDIR when linking binary extensions, causing
+# trouble for cross compilation
+define PYTHON_FIXUP_LIBDIR
+ $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \
+ $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/Makefile
+endef
+
+PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_FIXUP_LIBDIR
+
#
# Development files removal
#