openssl: add --gc-sections
[openwrt/openwrt.git] / package / libs / openssl / Makefile
index 8e439e1c31b69a76ba9963294ebbb4d9f5628e1e..393976598b992a49ea9aac8f9f58144fffd25d85 100644 (file)
@@ -184,7 +184,8 @@ define Build/Configure
                depend
 endef
 
-TARGET_CFLAGS += $(FPIC) -I$(CURDIR)/include
+TARGET_CFLAGS += $(FPIC) -I$(CURDIR)/include -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \