openvpn: reduce binary size using --gc-sections on linking
[openwrt/staging/blogic.git] / package / network / services / openvpn / Makefile
index 11b6aabe25a9ff838670750da535019c944b5cee..24fb897a0131c9173e020beff016f90f9c7aac10 100644 (file)
@@ -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) \