python3: enable shared python3 lib; make this the norm
This will reduce the bloat when users will want to compile in their Python C extensions. There will be a initial bloat (several kb) if just Python is installed, but that will be compensated when users will add more C extensions. During the build we also have to add Python's PKG_BUILD_DIR so that the shared lib is found when compiling Python's built-in C extensions. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
parent
cc6423d57a
commit
1a0e9b3786
1 changed files with 4 additions and 3 deletions
|
@ -70,7 +70,7 @@ MAKE_FLAGS:=\
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
CROSS_COMPILE=yes \
|
CROSS_COMPILE=yes \
|
||||||
CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
|
CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
LDFLAGS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR)" \
|
||||||
LD="$(TARGET_CC)"
|
LD="$(TARGET_CC)"
|
||||||
|
|
||||||
ENABLE_IPV6:=
|
ENABLE_IPV6:=
|
||||||
|
@ -102,7 +102,7 @@ define Build/Configure
|
||||||
$(CP) ./files/config.site $(PKG_BUILD_DIR)
|
$(CP) ./files/config.site $(PKG_BUILD_DIR)
|
||||||
$(call Build/Configure/Default, \
|
$(call Build/Configure/Default, \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--disable-shared \
|
--enable-shared \
|
||||||
--without-cxx-main \
|
--without-cxx-main \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-system-ffi="$(STAGING_DIR)/usr" \
|
--with-system-ffi="$(STAGING_DIR)/usr" \
|
||||||
|
@ -123,7 +123,7 @@ define Build/InstallDev
|
||||||
$(1)/usr/include/
|
$(1)/usr/include/
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \
|
$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \
|
||||||
$(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \
|
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
|
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
|
||||||
|
@ -157,6 +157,7 @@ define Py3Package/python3/install
|
||||||
# Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python
|
# Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/lib-dynload/
|
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/lib-dynload/
|
||||||
$(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python3
|
$(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python3
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Configure
|
define Host/Configure
|
||||||
|
|
Loading…
Reference in a new issue