From: Felix Fietkau Date: Sat, 10 Dec 2016 11:39:54 +0000 (+0100) Subject: openvpn: reduce binary size using --gc-sections on linking X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2bc747aaead96d3eebc97a9d6c638b8eb44de180;p=openwrt%2Fstaging%2Flynxis%2Fomap.git openvpn: reduce binary size using --gc-sections on linking Saves around 9kb gzipped on MIPS Signed-off-by: Felix Fietkau --- diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile index 11b6aabe25..24fb897a01 100644 --- a/package/network/services/openvpn/Makefile +++ b/package/network/services/openvpn/Makefile @@ -65,6 +65,9 @@ CONFIGURE_VARS += \ IPROUTE=/sbin/ip \ NETSTAT=/sbin/netstat +TARGET_CFLAGS += -ffunction-sections -fdata-sections +TARGET_LDFLAGS += -Wl,--gc-sections + define Build/Configure $(call Build/Configure/Default, \ $(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SMALL),--enable-small) \