iw: compile with LTO enabled
[openwrt/openwrt.git] / package / network / utils / iw / Makefile
index 912fc3e..22f1106 100644 (file)
@@ -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" \