treewide: add support for "gc-sections" in PKG_BUILD_FLAGS
[openwrt/staging/wigyori.git] / package / network / config / firewall / Makefile
index e4a3ad97f776fc5560e857487f9828628ffbaa1e..95e2ae4b674dd313d8368ac917c29e9bf6efd4ec 100644 (file)
@@ -21,6 +21,8 @@ PKG_LICENSE:=ISC
 
 PKG_CONFIG_DEPENDS := CONFIG_IPV6
 
+PKG_BUILD_FLAGS:=gc-sections
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
@@ -42,8 +44,8 @@ define Package/firewall/conffiles
 /etc/firewall.user
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto
 CMAKE_OPTIONS += $(if $(CONFIG_IPV6),,-DDISABLE_IPV6=1)
 
 define Package/firewall/install