From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] correct order of linker options to avoid link errors with recent toolchains
Date: Fri, 23 Jul 2010 14:11:54 +0200 [thread overview]
Message-ID: <20100723121154.GA3540@aepfle.de> (raw)
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)
next reply other threads:[~2010-07-23 12:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 12:11 Olaf Hering [this message]
2010-07-23 16:44 ` [PATCH] correct order of linker options to avoid link errors with recent toolchains Ian Jackson
2010-07-23 16:53 ` Keir Fraser
2010-07-23 16:57 ` Ian Jackson
2010-07-23 19:55 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100723121154.GA3540@aepfle.de \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.