curl: add flags to allow gc-sections to strip out unused code
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Apr 2016 12:51:57 +0000 (12:51 +0000)
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Apr 2016 12:51:57 +0000 (12:51 +0000)
Signed-off-by: Dirk Feytons <dirk.feytons@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49184 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/network/utils/curl/Makefile

index 319c0b7..af38ed4 100644 (file)
@@ -99,8 +99,9 @@ define Package/libcurl/config
   source "$(SOURCE)/Config.in"
 endef
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
 TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM)
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 CONFIGURE_ARGS += \
        --disable-debug \