openvpn: reduce binary size using --gc-sections on linking

Saves around 9kb gzipped on MIPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
lede-17.01
Felix Fietkau 2016-12-10 12:39:54 +01:00
parent e6871ab925
commit 2bc747aaea
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,9 @@ CONFIGURE_VARS += \
IPROUTE=/sbin/ip \ IPROUTE=/sbin/ip \
NETSTAT=/sbin/netstat NETSTAT=/sbin/netstat
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
define Build/Configure define Build/Configure
$(call Build/Configure/Default, \ $(call Build/Configure/Default, \
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SMALL),--enable-small) \ $(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SMALL),--enable-small) \