aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-07-11 19:21:08 +0200
committerFelix Fietkau <nbd@nbd.name>2018-07-13 17:22:53 +0200
commitef16a394d2b24a363b50b5b4720cb23fe156c9da (patch)
treefe0d539568436ebe6b8374656af8ec5501898df8 /package
parente7397eef69a20fc630148d0e597523e139d21c0c (diff)
downloadupstream-ef16a394d2b24a363b50b5b4720cb23fe156c9da.tar.gz
upstream-ef16a394d2b24a363b50b5b4720cb23fe156c9da.tar.bz2
upstream-ef16a394d2b24a363b50b5b4720cb23fe156c9da.zip
iw: compile with LTO enabled
Reduces .ipk size on MIPS from 34k to 33k Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/network/utils/iw/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile
index 912fc3e28d..22f110651b 100644
--- a/package/network/utils/iw/Makefile
+++ b/package/network/utils/iw/Makefile
@@ -38,11 +38,12 @@ TARGET_CPPFLAGS:= \
-I$(STAGING_DIR)/usr/include/libnl-tiny \
$(TARGET_CPPFLAGS) \
-DCONFIG_LIBNL20 \
- -D_GNU_SOURCE
+ -D_GNU_SOURCE \
+ -flto
MAKE_FLAGS += \
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
- LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
+ LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections -flto" \
NL1FOUND="" NL2FOUND=Y \
NLLIBNAME="libnl-tiny" \
LIBS="-lm -lnl-tiny" \