treewide: add support for "gc-sections" in PKG_BUILD_FLAGS
[openwrt/staging/dedeckeh.git] / package / utils / mtd-utils / Makefile
index afbfbceff5480544ac360a02b484086e8d677bcb..bd53e071d5f6af44cf1955b6f534a28fcdeb8f79 100644 (file)
@@ -19,6 +19,7 @@ PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
 
 PKG_FLAGS:=nonshared
+PKG_BUILD_FLAGS:=gc-sections
 
 PKG_BUILD_DEPENDS:=util-linux
 
@@ -64,9 +65,6 @@ CONFIGURE_ARGS += \
        --without-zstd \
        --without-lzo
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
-TARGET_LDFLAGS += -Wl,--gc-sections
-
 define Package/ubi-utils/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) \