summaryrefslogtreecommitdiff
path: root/lang/python/python3
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2020-04-27 11:14:11 +0300
committerGitHub <noreply@github.com>2020-04-27 11:14:11 +0300
commit1f8c2af5daaa672bbf9b7cf2b56f16017809ad21 (patch)
treef2c83378c52e1368b58fdf0861fa786f2464f596 /lang/python/python3
parent3c9dbc1429532d9d370d0b976ac812845b43a897 (diff)
parent9f81ab895eca0709d1a7b4804b36a5cd00b4f368 (diff)
Merge pull request #11970 from jefferyto/python-target-build-tools
python3: Fix host build tool names recorded in target files
Diffstat (limited to 'lang/python/python3')
-rw-r--r--lang/python/python3/Makefile8
-rw-r--r--lang/python/python3/files/python3-package-dev.mk3
2 files changed, 10 insertions, 1 deletions
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index 627a1d3a6..9d5206f1b 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
include ../python3-version.mk
PKG_NAME:=python3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -125,6 +125,9 @@ define Package/python3/description
It's python3-light + all other packages.
endef
+TARGET_CONFIGURE_OPTS+= \
+ READELF="$(TARGET_CROSS)readelf"
+
MAKE_FLAGS+=\
CROSS_COMPILE=yes \
LD="$(TARGET_CC)"
@@ -282,6 +285,9 @@ define Py3Package/python3-base/install
$(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python3
$(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON3_VERSION).so* $(1)/usr/lib/
+ # This depends on being called before filespec is processed
+ $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py
endef
Py3Package/python3-light/install:=:
diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk
index 12ceceab7..b23654876 100644
--- a/lang/python/python3/files/python3-package-dev.mk
+++ b/lang/python/python3/files/python3-package-dev.mk
@@ -16,6 +16,9 @@ define Py3Package/python3-dev/install
$(CP) $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config $(1)/usr/bin
$(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config
$(LN) python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/
+ # This depends on being called before filespec is processed
+ $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile
endef
$(eval $(call Py3BasePackage,python3-dev, \