diff options
author | Niels de Vos <ndevos@redhat.com> | 2018-08-09 15:52:19 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-30 05:41:26 +0000 |
commit | 44e40404ed1223ba9ccb879373da38efd5ba403c (patch) | |
tree | dcf7abb412ee5ad2280ede11872ce96ea36f1ac9 /api | |
parent | d27e8870c1882b1abfffefaf7b40bc7f2a1ec05f (diff) |
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 <ndevos@redhat.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/Makefile.am | 16 |
1 files changed, 9 insertions, 7 deletions
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 - |