From 5f72109e5bd84124bd6dd9877fae3fa9ae7ee348 Mon Sep 17 00:00:00 2001 From: Joao Carlos Mendes Luis Date: Tue, 14 Jul 2020 16:17:44 -0300 Subject: Disable -Wl,-z,defs for ASAN builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit af65916 added -Wl,-z,defs for the shared libraries. This apparently does not work in some cases with --enable-asan, so only add it for non-ASAN builds. Reviewed-by: Brian Behlendorf Reviewed-by: João Carlos Mendes Luis Signed-off-by: Arvind Sankar Closes #10557 Closes #10560 --- lib/libzpool/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libzpool/Makefile.am') diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 7924a425d..50658bc67 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -210,7 +210,11 @@ libzpool_la_LIBADD = \ libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -libzpool_la_LDFLAGS = -pthread -Wl,-z,defs +libzpool_la_LDFLAGS = -pthread + +if !ASAN_ENABLED +libzpool_la_LDFLAGS += -Wl,-z,defs +endif if BUILD_FREEBSD libzpool_la_LIBADD += -lgeom -- cgit v1.2.3