From 44e40404ed1223ba9ccb879373da38efd5ba403c Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 9 Aug 2018 15:52:19 +0200 Subject: build: add --enable-asan configure options Introduce a `./configure --enable-asan` to build with `-fsanitize=address -fno-omit-frame-pointer` options. This uses the libasan.so shared library, so that needs to be available. While running builds with the ASAN options, several linker issues surfaced and these have been addressed with this change as well. Building with --enable-asan has been tested on Fedora 28. Change-Id: I428a9da70dd8f7d0056cfbe5c398619a571469b2 Updates: #492 Signed-off-by: Niels de Vos --- api/src/Makefile.am | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'api/src') diff --git a/api/src/Makefile.am b/api/src/Makefile.am index 3d25823925b..6ed30bc99f6 100644 --- a/api/src/Makefile.am +++ b/api/src/Makefile.am @@ -9,10 +9,12 @@ libgfapi_la_SOURCES = glfs.c glfs-mgmt.c glfs-fops.c glfs-resolve.c \ glfs-handleops.c libgfapi_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - $(top_builddir)/rpc/xdr/src/libgfxdr.la \ - $(GF_LDADD) + $(top_builddir)/rpc/xdr/src/libgfxdr.la + +libgfapi_la_LDFLAGS = -version-info $(GFAPI_LT_VERSION) $(GF_LDFLAGS) \ + $(GFAPI_EXTRA_LDFLAGS) $(ACL_LIBS) -AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ +libgfapi_la_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ -I$(top_srcdir)/rpc/rpc-lib/src \ -I$(top_srcdir)/rpc/xdr/src \ -I$(top_builddir)/rpc/xdr/src \ @@ -21,9 +23,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ AM_CFLAGS = -Wall $(GF_CFLAGS) -libgfapi_la_LDFLAGS = -version-info $(GFAPI_LT_VERSION) $(GF_LDFLAGS) \ - $(GFAPI_EXTRA_LDFLAGS) $(ACL_LIBS) - xlator_LTLIBRARIES = api.la xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mount # workaround for broken parallel install support in automake with LTLIBRARIES @@ -33,9 +32,12 @@ $(install_xlatorLTLIBRARIES): install-libLTLIBRARIES api_la_SOURCES = glfs-master.c api_la_DEPENDENCIES = libgfapi.la +api_la_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ + -I$(top_srcdir)/rpc/xdr/src \ + -I$(top_builddir)/rpc/xdr/src api_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) +#api_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) $(GF_LDFLAGS) api_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ $(top_builddir)/api/src/libgfapi.la - -- cgit