diff --git a/Make.inc b/Make.inc index 84a497b220c70..609f698059a13 100644 --- a/Make.inc +++ b/Make.inc @@ -691,7 +691,10 @@ SANITIZE_LDFLAGS := ifeq ($(SANITIZE_MEMORY),1) SANITIZE_OPTS += -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer SANITIZE_LDFLAGS += $(SANITIZE_OPTS) -endif +ifneq ($(findstring $(OS),Linux FreeBSD),) +SANITIZE_LDFLAGS += -Wl,--warn-unresolved-symbols +endif # OS Linux or FreeBSD +endif # SANITIZE_MEMORY=1 ifeq ($(SANITIZE_ADDRESS),1) SANITIZE_OPTS += -fsanitize=address SANITIZE_LDFLAGS += -fsanitize=address diff --git a/deps/libsuitesparse.mk b/deps/libsuitesparse.mk index 8900390d24c24..7d79e03ee8d0e 100644 --- a/deps/libsuitesparse.mk +++ b/deps/libsuitesparse.mk @@ -26,7 +26,7 @@ LIBSUITESPARSE_MFLAGS := CC="$(CC) $(SANITIZE_OPTS)" CXX="$(CXX) $(SANITIZE_OPTS AR="$(AR)" RANLIB="$(RANLIB)" \ BLAS="-L$(build_shlibdir) -lblastrampoline" \ LAPACK="-L$(build_shlibdir) -lblastrampoline" \ - LDFLAGS="$(SUITESPARSE_LIB) $(SANITIZE_LDFLAGS) -Wl,--warn-unresolved-symbols" CFOPENMP="" CUDA=no CUDA_PATH="" \ + LDFLAGS="$(SUITESPARSE_LIB) $(SANITIZE_LDFLAGS)" CFOPENMP="" CUDA=no CUDA_PATH="" \ UMFPACK_CONFIG="$(UMFPACK_CONFIG)" \ CHOLMOD_CONFIG="$(CHOLMOD_CONFIG)" \ SPQR_CONFIG="$(SPQR_CONFIG)"