From e2eb84791c7476d3c2a9a505b9baf41838520d0d Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 23 Mar 2023 09:53:12 +0100 Subject: [PATCH] treewide: refactor to use PKG_BUILD_FLAGS:=lto See commit 07730ff3 "treewide: add support for "lto" in PKG_BUILD_FLAGS" on the main repository. Signed-off-by: Andre Heider --- alfred/Makefile | 5 +---- batctl/Makefile | 9 +-------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/alfred/Makefile b/alfred/Makefile index 81ce841..c5fceab 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE:=GPL-2.0-only MIT PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=gc-sections +PKG_BUILD_FLAGS:=gc-sections lto PKG_CONFIG_DEPENDS += \ CONFIG_ALFRED_NEEDS_lua \ @@ -68,9 +68,6 @@ MAKE_FLAGS += \ LIBNL_GENL_NAME="libnl-tiny" \ REVISION="$(PKG_VERSION)-openwrt-$(PKG_RELEASE)" -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -fuse-linker-plugin - define Package/alfred/install $(INSTALL_DIR) $(1)/usr/sbin cp -fpR $(PKG_BUILD_DIR)/alfred $(1)/usr/sbin/ diff --git a/batctl/Makefile b/batctl/Makefile index 2adbf42..8a81cbb 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-2.0-only ISC MIT PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT LICENSES/deprecated/ISC PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=gc-sections +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -71,13 +71,6 @@ $(Package/batctl/description) Subcommands for configuration, online and offline debugging are enabled. endef -# Link-time optimization allows to move parts of the optimization from the single -# source file to the global source view. This is done by emitting the GIMPLE -# representation in each object file and analyzing it again during the link step. - -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -fuse-linker-plugin - MAKE_VARS += \ LIBNL_NAME="libnl-tiny" \ LIBNL_GENL_NAME="libnl-tiny"