From ba26a1e19798311b6b6f4add5daac46cf2d8746f Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Wed, 11 Aug 2010 18:02:32 +0100 Subject: split LDLIBS from LDFLAGS to fix link errors in recent toolchains Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson --- tools/xenstore/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/xenstore') diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 743be20a2b..c4b33cb8f8 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -47,7 +47,7 @@ CFLAGS += -DHAVE_DTRACE=1 endif xenstored: $(XENSTORED_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(CLIENTS): xenstore ln -f xenstore $@ @@ -69,7 +69,7 @@ libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR) xs.opic: CFLAGS += -DUSE_PTHREAD libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread libxenstore.a: xs.o xs_lib.o $(AR) rcs $@ $^ -- cgit v1.2.3