[openwrt/openwrt] treewide: opt-out of tree-wide LTO usage

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 21 10:28:40 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9fe7cc62a6ca49e81e5656ace144e35c31a9a408

commit 9fe7cc62a6ca49e81e5656ace144e35c31a9a408
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Sat Jan 28 16:04:10 2023 +0100

    treewide: opt-out of tree-wide LTO usage
    
    These fail to build with LTO enabled or packages depending on them do.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/grub2/Makefile           | 1 +
 package/libs/argp-standalone/Makefile | 2 ++
 package/libs/mbedtls/Makefile         | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 7d6cfd5395..249acf1487 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -25,6 +25,7 @@ ifneq ($(BUILD_VARIANT),none)
 endif
 
 PKG_FLAGS:=nonshared
+PKG_BUILD_FLAGS:=no-lto
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile
index 1a48dcb2cd..23e5169796 100644
--- a/package/libs/argp-standalone/Makefile
+++ b/package/libs/argp-standalone/Makefile
@@ -19,6 +19,8 @@ PKG_MAINTAINER:=Ted Hess <thess at kitschensync.net>
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE:=Makefile.am
 
+PKG_BUILD_FLAGS:=no-lto
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index f49bb24de6..f86d489190 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=mbedtls
 PKG_VERSION:=2.28.2
 PKG_RELEASE:=2
-PKG_BUILD_FLAGS:=no-mips16 gc-sections
+PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?




More information about the lede-commits mailing list