treewide: add support for "lto" in PKG_BUILD_FLAGS
This reduces open coding and allows to easily add a knob to enable it treewide, where chosen packages can still opt-out via "no-lto". Some packages used LTO, but not the linker plugin. This unifies 'em all to attempt to produce better code. Quoting man gcc(1): "This improves the quality of optimization by exposing more code to the link-time optimizer." Also use -flto=auto instead of -flto=jobserver, as it's not guaranteed that every buildsystem uses +$(MAKE) correctly. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
committed by
Christian Marangi
parent
da3700988d
commit
07730ff346
@@ -10,7 +10,7 @@ PKG_SOURCE_VERSION:=f1f65026a94137c91b5466b149ef3ea3f20091e9
|
||||
PKG_MIRROR_HASH:=3f6569a5e63fdfd032976ac0f79d736d3935101ac1b97fb370514b013c5e6bb6
|
||||
CMAKE_INSTALL:=1
|
||||
PKG_CHECK_FORMAT_SECURITY:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_BUILD_FLAGS:=no-mips16 lto
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
@@ -30,9 +30,6 @@ define Package/usign
|
||||
TITLE:=OpenWrt signature verification utility
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -flto
|
||||
TARGET_LDFLAGS += -flto=jobserver
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DUSE_LIBUBOX=on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user