[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH] correct order of linker options to avoid link errors with recent toolchains
- To: xen-devel@xxxxxxxxxxxxxxxxxxx
- From: Olaf Hering <olaf@xxxxxxxxx>
- Date: Fri, 23 Jul 2010 14:11:54 +0200
- Delivery-date: Fri, 23 Jul 2010 05:12:46 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1279887115; l=1101; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=UscJ6VPm+7rbfYtZsTNgvMekzCg=; b=KpSuOCS3Q5MESZY7qE2HUH1Qi9wbPANicS5wGRHdtFePHngKA5EFbkniJ72FIqHhCQn +sUqsVyJznEH28PYlqG6jtdoPUBtHUVxi1IEh20jT1WoRozhyxX8hUDpviYftYFy20znJ vSKBF8nD9L+RwoKp3LbOeP7HWEOOgWGUtlU=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
The order of objects and linked libraries is important with recent toolchain
when --as-needed is used. Move LDFLAGS to the end of cc commandline options.
Without this change, symbols in libbzip2 are not found when building with
openSuSE 11.2 and newer.
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
There are more places like this.
I will find and fix them when required.
tools/libxc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- xen-unstable.hg-4.1.21836.orig/tools/libxc/Makefile
+++ xen-unstable.hg-4.1.21836/tools/libxc/Makefile
@@ -181,7 +181,7 @@ xc_dom_bzimageloader.opic: CFLAGS += $(c
libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)
libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG)
-Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz
-lxenctrl $(PTHREAD_LIBS)
+ $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR)
$(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) $(LDFLAGS) -lz -lxenctrl $(PTHREAD_LIBS)
-include $(DEPS)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel