Просмотр исходного кода

dnsmasq: Activate LTO

This decreases the binary size when PIE ASLR is activated by 8% on MIPS BE.

old:
202,020 /usr/sbin/dnsmasq

new:
185,676 /usr/sbin/dnsmasq

Signed-off-by: Hauke Mehrtens <[email protected]>
Hauke Mehrtens 6 лет назад
Родитель
Сommit
6596c95eca
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      package/network/services/dnsmasq/Makefile

+ 2 - 2
package/network/services/dnsmasq/Makefile

@@ -126,8 +126,8 @@ endef
 Package/dnsmasq-dhcpv6/conffiles = $(Package/dnsmasq/conffiles)
 Package/dnsmasq-full/conffiles = $(Package/dnsmasq/conffiles)
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
-TARGET_LDFLAGS += -Wl,--gc-sections
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto=jobserver
 
 COPTS = -DHAVE_UBUS \
 	$(if $(CONFIG_IPV6),,-DNO_IPV6)