treewide: refactor to use PKG_BUILD_FLAGS:=gc-sections
[feed/routing.git] / alfred / Makefile
index 1325d6e0e226ac42a3d0929cbcab5e0658b2f922..81ce841789a907773d34f94556341d97678611ef 100644 (file)
@@ -15,6 +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_CONFIG_DEPENDS += \
        CONFIG_ALFRED_NEEDS_lua \
@@ -67,8 +68,8 @@ MAKE_FLAGS += \
         LIBNL_GENL_NAME="libnl-tiny" \
         REVISION="$(PKG_VERSION)-openwrt-$(PKG_RELEASE)"
 
-TARGET_CFLAGS  += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin
+TARGET_CFLAGS  += -flto
+TARGET_LDFLAGS += -fuse-linker-plugin
 
 define Package/alfred/install
        $(INSTALL_DIR) $(1)/usr/sbin