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/libfsimage/Rules.mk | 2 +- tools/libfsimage/common/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/libfsimage') diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk index 89bf195417..0e29c25bb3 100644 --- a/tools/libfsimage/Rules.mk +++ b/tools/libfsimage/Rules.mk @@ -24,7 +24,7 @@ fs-install: fs-all $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR) $(FSLIB): $(PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) clean distclean: rm -f $(PIC_OBJS) $(FSLIB) $(DEPS) diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile index 48851acfa6..4f72bb5eea 100644 --- a/tools/libfsimage/common/Makefile +++ b/tools/libfsimage/common/Makefile @@ -37,7 +37,7 @@ libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR) ln -sf $< $@ libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ -lpthread -include $(DEPS) -- cgit v1.2.3