dnsmasq: respect target's LDFLAGS
[openwrt/staging/dedeckeh.git] / package / network / services / dnsmasq / Makefile
index c0d3dc4f48541675c43ff680d876c5e0edd49246..84736566dfed214531a30cf6b15161baa53b1733 100644 (file)
@@ -62,6 +62,7 @@ endef
 Package/dnsmasq-dhcpv6/conffiles = $(Package/dnsmasq/conffiles)
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 COPTS = $(if $(CONFIG_IPV6),,-DNO_IPV6) -DNO_IPSET -DNO_AUTH
 
@@ -72,7 +73,7 @@ endif
 MAKE_FLAGS := \
        $(TARGET_CONFIGURE_OPTS) \
        CFLAGS="$(TARGET_CFLAGS)" \
-       LDFLAGS="-Wl,--gc-sections" \
+       LDFLAGS="$(TARGET_LDFLAGS)" \
        COPTS="$(COPTS)" \
        PREFIX="/usr"