Skip to content

Commit

Permalink
dnsmasq: Activate LTO
Browse files Browse the repository at this point in the history
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 <hauke@hauke-m.de>
  • Loading branch information
hauke committed Nov 8, 2019
1 parent a43a40c commit 6596c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/network/services/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6596c95

Please sign in to comment.