From: Felix Fietkau Date: Wed, 11 Jul 2018 17:21:08 +0000 (+0200) Subject: iw: compile with LTO enabled X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3b329525369e4f30664fcaedd944c672af87c285;p=openwrt%2Fstaging%2Fjow.git iw: compile with LTO enabled Reduces .ipk size on MIPS from 34k to 33k Signed-off-by: Felix Fietkau (backported from ef16a394d2b24a363b50b5b4720cb23fe156c9da) --- diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index a11768268c..ef39ee6724 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -47,7 +47,8 @@ TARGET_CPPFLAGS:= \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ $(TARGET_CPPFLAGS) \ -DCONFIG_LIBNL20 \ - -D_GNU_SOURCE + -D_GNU_SOURCE \ + -flto ifeq ($(BUILD_VARIANT),full) TARGET_CPPFLAGS += -DIW_FULL @@ -56,7 +57,7 @@ endif 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" \