From 57c61d70ec1920f731f9509510e6913aa1d62aa3 Mon Sep 17 00:00:00 2001 From: Tiziano Müller Date: Fri, 18 Jul 2014 09:24:38 +0200 Subject: build: add libraries to LIBADD instead of LDFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For a number of linker flags the order of the object files and the libs to link against matter (for example -Wl,--as-needed). Make sure that libraries are added via the LIBADD variable instead of LDFLAGS and therefore always come after the object files. Change-Id: I59d114752a0c7664b8678a72082ba5e445497fe5 Signed-off-by: Tiziano Müller Reviewed-on: http://review.gluster.org/8331 Reviewed-by: Harshavardhana Reviewed-by: Prashanth Pai Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- doc/hacker-guide/en-US/markdown/translator-development.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/hacker-guide') diff --git a/doc/hacker-guide/en-US/markdown/translator-development.md b/doc/hacker-guide/en-US/markdown/translator-development.md index 77d1b606ae0..edadd5150dc 100644 --- a/doc/hacker-guide/en-US/markdown/translator-development.md +++ b/doc/hacker-guide/en-US/markdown/translator-development.md @@ -347,11 +347,11 @@ CFLAGS = -fPIC -Wall -O0 -g \ -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \ -D$(HOST_OS) -I$(GLFS_SRC) -I$(GLFS_SRC)/contrib/uuid \ -I$(GLFS_SRC)/libglusterfs/src -LDFLAGS = -shared -nostartfiles -L$(GLFS_LIB) -lglusterfs \ - -lpthread +LDFLAGS = -shared -nostartfiles -L$(GLFS_LIB) +LIBS = -lglusterfs -lpthread $(TARGET): $(OBJECTS) - $(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET) + $(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) ``` Yes, it's still Linux-specific. Mea culpa. As you can see, we're sticking with -- cgit