ppp: compile with LTO enabled
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jul 2018 17:17:34 +0000 (19:17 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 13 Jul 2018 15:22:53 +0000 (17:22 +0200)
Reduces .ipk size on MIPS from 98.5k to 98k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/ppp/Makefile

index beeaa53..60c0756 100644 (file)
@@ -189,8 +189,8 @@ $(call Build/Configure/Default,, \
                $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections -flto -fuse-linker-plugin
 
 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
                PRECOMPILED_FILTER=1 \