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 <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2023-03-23 09:53:12 +01:00 committed by Nick Hainke
parent 67ad3b9b96
commit e2eb84791c
2 changed files with 2 additions and 12 deletions

View File

@ -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/

View File

@ -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"