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/libxen/Makefile | 2 +- tools/libxen/Makefile.dist | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/libxen') diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile index 0d1ec7727b..d051667588 100644 --- a/tools/libxen/Makefile +++ b/tools/libxen/Makefile @@ -44,7 +44,7 @@ libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ libxenapi.a: $(LIBXENAPI_OBJS) $(AR) rcs libxenapi.a $^ diff --git a/tools/libxen/Makefile.dist b/tools/libxen/Makefile.dist index 23a4b13490..33ca44848c 100644 --- a/tools/libxen/Makefile.dist +++ b/tools/libxen/Makefile.dist @@ -30,7 +30,7 @@ LDFLAGS = $(shell xml2-config --libs) \ # -h for Solaris SONAME_LDFLAG ?= -soname # -R /usr/sfw/$(LIBDIR) -shared for Solaris -SHLIB_CFLAGS ?= -shared +SHLIB_LDFLAGS ?= -shared # ginstall for Solaris INSTALL = install @@ -54,7 +54,7 @@ libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ libxenapi.a: $(LIBXENAPI_OBJS) $(AR) rcs libxenapi.a $^ -- cgit v1.2.3