treewide: refactor to use PKG_BUILD_FLAGS:=lto
[feed/routing.git] / batctl / Makefile
index 2adbf422d0bc6881f0356fe967f44c2aa6ba4553..8a81cbb8093c63d1c149db4c855c31787432e7de 100644 (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"