treewide: add support for "lto" in PKG_BUILD_FLAGS
[openwrt/openwrt.git] / package / libs / libnftnl / Makefile
index f92fb91eea1211676c0a89d71c3abf08f00f6014..8d8c8c25e37f6901433234912b5766a5375c7df4 100644 (file)
@@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_FLAGS:=lto
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,8 +42,7 @@ define Package/libnftnl/description
  programming interface (API) to the in-kernel nf_tables subsystem.
 endef
 
-TARGET_CFLAGS += $(FPIC) -flto
-TARGET_LDFLAGS += -flto
+TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
        --enable-static \