[Gluster-devel] [PATCH 12/15] build: move -L arguments out of CFLAGS

Jan Engelhardt jengelh at inai.de
Tue Sep 25 16:41:10 UTC 2012


"-L" is a linker flag, and as such should be in LDFLAGS, not CFLAGS, to
have guaranteed effect.

Signed-off-by: Jan Engelhardt <jengelh at inai.de>
---
 xlators/mgmt/glusterd/src/Makefile.am    |    3 ++-
 xlators/nfs/server/src/Makefile.am       |    4 +++-
 xlators/system/posix-acl/src/Makefile.am |    5 +++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 4ff1b59..f00d7a4 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -21,13 +21,14 @@ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \
 
 AM_CFLAGS = $(GF_CPPFLAGS) -Wall \
 	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS)\
-	-I$(rpclibdir) -L$(xlatordir)/ -I$(CONTRIBDIR)/rbtree \
+	-I$(rpclibdir) -I$(CONTRIBDIR)/rbtree \
 	-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
 	-I$(CONTRIBDIR)/uuid \
 	-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
 	-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
         -DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) $(LIBXML2_CFLAGS)
 
+AM_LDFLAGS = -L$(xlatordir)
 
 CLEANFILES =
 
diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
index 4814c0c..98fcc58 100644
--- a/xlators/nfs/server/src/Makefile.am
+++ b/xlators/nfs/server/src/Makefile.am
@@ -13,7 +13,9 @@ noinst_HEADERS = nfs.h nfs-common.h nfs-fops.h nfs-inodes.h nfs-generics.h \
 AM_CFLAGS = $(GF_CPPFLAGS) -Wall \
 	-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \
 	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS)\
-	-I$(nfsrpclibdir) -L$(xlatordir)/ -I$(CONTRIBDIR)/rbtree\
+	-I$(nfsrpclibdir) -I$(CONTRIBDIR)/rbtree\
 	-I$(top_srcdir)/rpc/xdr/src/
 
+AM_LDFLAGS = -L$(xlatordir)
+
 CLEANFILES =
diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
index 6659b9d..200717f 100644
--- a/xlators/system/posix-acl/src/Makefile.am
+++ b/xlators/system/posix-acl/src/Makefile.am
@@ -7,8 +7,9 @@ posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 noinst_HEADERS = posix-acl.h posix-acl-xattr.h
 
 AM_CFLAGS = $(GF_CPPFLAGS) -Wall \
-	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS)\
-	-L$(xlatordir)/
+	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS)
+
+AM_LDFLAGS = -L$(xlatordir)
 
 CLEANFILES =
 
-- 
1.7.10.4





More information about the Gluster-devel mailing list