-include include/autoconf.h \
-D_GNU_SOURCE -DNDEBUG \
$(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
- -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
+ -D"BB_VER=KBUILD_STR($(BB_VER))"
CFLAGS += $(call cc-option,-Wall,)
CFLAGS += $(call cc-option,-Wshadow,)
CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,))
endif
endif
+ifeq ($(CONFIG_DEBUG_SANITIZE),y)
+CFLAGS += $(call cc-option,-fsanitize=address,)
+CFLAGS += $(call cc-option,-fsanitize=leak,)
+CFLAGS += $(call cc-option,-fsanitize=undefined,)
+endif
# If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)...
ARCH_FPIC ?= -fpic
LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
endif
+ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
+LDLIBS += resolv
+endif
+
ifeq ($(CONFIG_EFENCE),y)
LDLIBS += efence
endif