This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Xen 4.1.0 RC2 released,

On Mon, 2011-01-31 at 18:14 +0000, Nathan March wrote: 
> On 1/29/2011 2:45 AM, Ian Campbell wrote:
> > I just built Xen with the following patch and it didn't break on a
> > Debian system (i.e. without as-needed enabled by default). Can you try
> > it in your environment?
> Initially failed with:
> ld -Wl,--no-as-needed   -melf_x86_64 -r -o built_in.o head.o
> ld: unrecognized option '-Wl,--no-as-needed'
> ld: use the --help option for usage information

The -Wl,<foo> syntax is for gcc and says "pass <foo> to the linker". If
you are just calling the linker directly then you just need the <foo>
bit (i.e. --as-needed)

However I didn't notice any direct calls to ld when I tested this patch.

Oh, I think I see, the LDFLAGS where patched it effects both the
hypervisor and the tools builds but I only tested the tools.

Can you try the one below instead.


diff -r c83acd6f343e tools/Rules.mk
--- a/tools/Rules.mk    Mon Jan 31 09:32:25 2011 +0000
+++ b/tools/Rules.mk    Mon Jan 31 19:29:10 2011 +0000
@@ -52,7 +52,7 @@ ifneq ($(XEN_OS),NetBSD)
 # Enable implicit LFS support *and* explicit LFS names.
 CFLAGS  += $(shell getconf LFS_CFLAGS)
-LDFLAGS += $(shell getconf LFS_LDFLAGS)
+LDFLAGS += $(shell getconf LFS_LDFLAGS) -Wl,--no-as-needed
 # 32-bit x86 does not perform well with -ve segment accesses on Xen.

Xen-devel mailing list