treewide: add support for "gc-sections" in PKG_BUILD_FLAGS
[openwrt/staging/dedeckeh.git] / package / network / utils / uqmi / Makefile
index 02265d400c1db33cc020f8150e1c9a37945097c6..989e7c11b6efeb688cfb3e0bc4522db07e74860b 100644 (file)
@@ -14,6 +14,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=
 
 PKG_FLAGS:=nonshared
+PKG_BUILD_FLAGS:=gc-sections
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -33,13 +34,9 @@ endef
 
 TARGET_CFLAGS += \
        -I$(STAGING_DIR)/usr/include \
-       -ffunction-sections \
-       -fdata-sections \
        -Wno-error=dangling-pointer \
        -Wno-error=maybe-uninitialized
 
-TARGET_LDFLAGS += -Wl,--gc-sections
-
 CMAKE_OPTIONS += \
        -DDEBUG=1