treewide: add support for "gc-sections" in PKG_BUILD_FLAGS
[openwrt/openwrt.git] / package / network / services / ppp / Makefile
index 8476204e14fcda827c14a45e167057d2424143f7..48f2091a1fce7fe1307b068fcc1174888b91da9c 100644 (file)
@@ -26,6 +26,7 @@ PKG_VERSION:=$(PKG_RELEASE_VERSION).git-$(PKG_SOURCE_DATE)
 PKG_BUILD_DEPENDS:=libpcap
 
 PKG_ASLR_PIE_REGULAR:=1
+PKG_BUILD_FLAGS:=gc-sections
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -192,8 +193,8 @@ $(call Build/Configure/Default,, \
                $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto -fuse-linker-plugin
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto -fuse-linker-plugin
 
 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
                PRECOMPILED_FILTER=1 \