diff options
| author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-09-14 17:23:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-14 17:23:48 +0300 |
| commit | 9330c6c39cea1545ade1e314f237bf1f2db28c79 (patch) | |
| tree | b96f55e8ce0b6d8c89489a4cc6ff9e8ae04df9dc /lang/python/python3/files/python3-host.mk | |
| parent | fd0f3aa9302b905362bf9a2e625cebf2f1f1f677 (diff) | |
| parent | 2eb3979d28504260ab0d93069f947425b392c302 (diff) | |
Merge pull request #4830 from commodo/python-updates1
python,python3: build updates
Diffstat (limited to 'lang/python/python3/files/python3-host.mk')
| -rw-r--r-- | lang/python/python3/files/python3-host.mk | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lang/python/python3/files/python3-host.mk b/lang/python/python3/files/python3-host.mk index 96bbc19cc..4990d33a0 100644 --- a/lang/python/python3/files/python3-host.mk +++ b/lang/python/python3/files/python3-host.mk @@ -37,21 +37,26 @@ define HostPython3 $(HOST_PYTHON3_BIN) $(2); endef +define host_python3_settings + ARCH="$(HOST_ARCH)" \ + CC="$(HOSTCC)" \ + CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ + CXX="$(HOSTCXX)" \ + LD="$(HOSTCC)" \ + LDSHARED="$(HOSTCC) -shared" \ + CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ + LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ + _PYTHON_HOST_PLATFORM=linux2 +endef + # $(1) => commands to execute before running pythons script # $(2) => python script and its arguments # $(3) => additional variables define Build/Compile/HostPy3RunHost $(call HostPython3, \ $(if $(1),$(1);) \ - CC="$(HOSTCC)" \ - CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ - CXX="$(HOSTCXX)" \ - LD="$(HOSTCC)" \ - LDSHARED="$(HOSTCC) -shared" \ - CFLAGS="$(HOST_CFLAGS)" \ - CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ - LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ - _PYTHON_HOST_PLATFORM=linux2 \ + $(call host_python3_settings) \ $(3) \ , \ $(2) \ @@ -63,6 +68,7 @@ endef # Note: I shamelessly copied this from Yousong's logic (from python-packages); HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION) define host_python3_pip_install + $(call host_python3_settings) \ $(HOST_PYTHON3_PIP) install \ --root=$(1) \ --prefix=$(2) \ |
