iw: compile with LTO enabled
Reduces .ipk size on MIPS from 34k to 33k Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
e7397eef69
commit
ef16a394d2
1 changed files with 3 additions and 2 deletions
|
@ -38,11 +38,12 @@ TARGET_CPPFLAGS:= \
|
||||||
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
||||||
$(TARGET_CPPFLAGS) \
|
$(TARGET_CPPFLAGS) \
|
||||||
-DCONFIG_LIBNL20 \
|
-DCONFIG_LIBNL20 \
|
||||||
-D_GNU_SOURCE
|
-D_GNU_SOURCE \
|
||||||
|
-flto
|
||||||
|
|
||||||
MAKE_FLAGS += \
|
MAKE_FLAGS += \
|
||||||
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
|
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 \
|
NL1FOUND="" NL2FOUND=Y \
|
||||||
NLLIBNAME="libnl-tiny" \
|
NLLIBNAME="libnl-tiny" \
|
||||||
LIBS="-lm -lnl-tiny" \
|
LIBS="-lm -lnl-tiny" \
|
||||||
|
|
Loading…
Reference in a new issue