Revert "iw: compile with LTO enabled"
authorMantas Pucka <mantas@8devices.com>
Mon, 25 Feb 2019 16:29:13 +0000 (18:29 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 26 Feb 2019 22:20:04 +0000 (23:20 +0100)
After update to 5.0.1 iw-full package failed to display command list on
ipq40xx arch. Root cause was found to be LTO reordering causing
incorrect detection of command struct size in:

iw.c:552
cmd_size = labs((long)&__section_set - (long)&__section_get);

This reverts commit ef16a394d2b24a363b50b5b4720cb23fe156c9da.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
package/network/utils/iw/Makefile

index 4b1542e967cdd3b81f96fa2eba1f7dbe85eec22c..58cf8319f52a3d21560a44a455d64da7f30b20de 100644 (file)
@@ -47,8 +47,7 @@ TARGET_CPPFLAGS:= \
        -I$(STAGING_DIR)/usr/include/libnl-tiny \
        $(TARGET_CPPFLAGS) \
        -DCONFIG_LIBNL20 \
-       -D_GNU_SOURCE \
-       -flto
+       -D_GNU_SOURCE
 
 ifeq ($(BUILD_VARIANT),full)
   TARGET_CPPFLAGS += -DIW_FULL
@@ -57,7 +56,7 @@ endif
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
-       LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections -flto" \
+       LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
        NL1FOUND="" NL2FOUND=Y \
        NLLIBNAME="libnl-tiny" \
        LIBS="-lm -lnl-tiny" \