All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] correct order of linker options to avoid link errors with recent toolchains
@ 2010-07-23 12:11 Olaf Hering
  2010-07-23 16:44 ` Ian Jackson
  2010-07-23 19:55 ` Olaf Hering
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2010-07-23 12:11 UTC (permalink / raw)
  To: xen-devel


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@aepfle.de>

---

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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-23 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 12:11 [PATCH] correct order of linker options to avoid link errors with recent toolchains Olaf Hering
2010-07-23 16:44 ` Ian Jackson
2010-07-23 16:53   ` Keir Fraser
2010-07-23 16:57     ` Ian Jackson
2010-07-23 19:55 ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.