diff --git a/common.mk b/common.mk index d7c0c5ac..05b10611 100644 --- a/common.mk +++ b/common.mk @@ -71,6 +71,8 @@ LIBS += $(call ldflags_for_lib, x11, X11) LIBS += $(call ldflags_for_lib, yajl, yajl) LIBS += $(call ldflags_for_lib, libev, ev) +LDFLAGS += -Wl,--as-needed + ifeq ($(UNAME),NetBSD) # We need -idirafter instead of -I to prefer the system’s iconv over GNU libiconv CFLAGS += -idirafter /usr/pkg/include