[source] openvpn: reduce binary size using --gc-sections on linking
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 22 07:46:21 PST 2016
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/2bc747aaead96d3eebc97a9d6c638b8eb44de180
commit 2bc747aaead96d3eebc97a9d6c638b8eb44de180
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Dec 10 12:39:54 2016 +0100
openvpn: reduce binary size using --gc-sections on linking
Saves around 9kb gzipped on MIPS
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/openvpn/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index 11b6aab..24fb897 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) \
More information about the lede-commits
mailing list