Browse Source

curl: add flags to allow gc-sections to strip out unused code

Signed-off-by: Dirk Feytons <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>

SVN-Revision: 49184
Hauke Mehrtens 10 years ago
parent
commit
ba97a03d7d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      package/network/utils/curl/Makefile

+ 2 - 1
package/network/utils/curl/Makefile

@@ -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 \