Optimizations for the OS and Python

This commit is contained in:
j1nx 2021-02-17 12:07:33 +01:00
parent f9ab398d08
commit 4cf82004a6
2 changed files with 54 additions and 4 deletions

View File

@ -4,7 +4,7 @@ BR2_ARM_FPU_VFPV4=y
BR2_DL_DIR="../downloads" BR2_DL_DIR="../downloads"
BR2_CCACHE=y BR2_CCACHE=y
BR2_CCACHE_DIR="../ccache" BR2_CCACHE_DIR="../ccache"
BR2_OPTIMIZE_2=y BR2_OPTIMIZE_3=y
BR2_GLOBAL_PATCH_DIR="../buildroot-patches" BR2_GLOBAL_PATCH_DIR="../buildroot-patches"
# BR2_COMPILER_PARANOID_UNSAFE_PATH is not set # BR2_COMPILER_PARANOID_UNSAFE_PATH is not set
BR2_FORCE_HOST_BUILD=y BR2_FORCE_HOST_BUILD=y
@ -186,10 +186,8 @@ BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_DEJAVU=y BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_LIBERATION=y BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_GLMARK2=y BR2_PACKAGE_GLMARK2=y
BR2_PACKAGE_KMSCUBE=y
BR2_PACKAGE_FREERDP=y
# BR2_PACKAGE_FREERDP_CLIENT_WL is not set
BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y

View File

@ -0,0 +1,52 @@
From 974685cdd66de4ad7b84d58c8759544db8fc9df7 Mon Sep 17 00:00:00 2001
From: j1nx <p.steenbergen@j1nx.nl>
Date: Wed, 17 Feb 2021 11:47:20 +0100
Subject: [PATCH 1/1] Python optimizations
---
package/python3/python3.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index af1e5e50d9..7327bb91ba 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -26,6 +26,8 @@ HOST_PYTHON3_CONF_OPTS += \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
+ --with-lto \
+ --enable-optimizations \
--disable-ossaudiodev
# Make sure that LD_LIBRARY_PATH overrides -rpath.
@@ -37,6 +39,8 @@ HOST_PYTHON3_CONF_ENV += \
LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
ac_cv_prog_HAS_HG=/bin/false
+HOST_PYTHON3_CONF_ENV += CFLAGS="$(HOST_CFLAGS) -fno-semantic-interposition"
+
PYTHON3_DEPENDENCIES = host-python3 libffi
HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib host-libffi
@@ -150,6 +154,8 @@ ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
PYTHON3_DEPENDENCIES += gettext
endif
+PYTHON3_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fno-semantic-interposition"
+
PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
@@ -160,6 +166,8 @@ PYTHON3_CONF_OPTS += \
--disable-tk \
--disable-nis \
--disable-idle3 \
+ --enable-optimizations \
+ --with-lto \
--disable-pyc-build
#
--
2.20.1