|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] tools: disable linker --as-needed option
On Tue, 2011-02-01 at 09:21 +0000, Jan Beulich wrote:
> >>> On 01.02.11 at 10:09, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> > # Date 1296550939 0
> > # Node ID a3fb60cc3be3dc6596ed8395e0eb70514bdfcc74
> > # Parent 5b6663ba2bb2c54e8fa6745afa16297ebe43328d
> > tools: disable linker --as-needed option.
> >
> > The Xen build system is not currently compatible with the --as-needed
> > linker option. The proper fix for this is turning out to be rather
> > invasive to the build system so simply disable for now with the
> > intention of revisiting for the 4.2 release.
> >
> > The $(COMMA) trick allows "," in macro arguments.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Reported/Tested-by: Nathan March <nathan@xxxxxx>
> >
> > diff -r 5b6663ba2bb2 -r a3fb60cc3be3 tools/Rules.mk
> > --- a/tools/Rules.mk Mon Jan 31 09:14:52 2011 +0000
> > +++ b/tools/Rules.mk Tue Feb 01 09:02:19 2011 +0000
> > @@ -55,6 +55,10 @@ LDFLAGS += $(shell getconf LFS_LDFLAGS)
> > LDFLAGS += $(shell getconf LFS_LDFLAGS)
> > endif
> >
> > +# Xen tools build is currently incompatible with ld --as-needed
> > +COMMA := ,
> > +LDFLAGS += $(call cc-option,$(CC),-Wl$(COMMA)--no-as-needed)
>
> I don't think this actually works (Did you try with a linker not
> supporting this option?), as cc-option is implemented passing
> -S to the compiler (i.e. the linker won't even get invoked).
Er, no. I think you are probably right, I only tested with a linker
which has the option defaulting to off and Nathan tested the default on
case but noone actually tested the not available option.
Any idea how we can sensibly do this test? I'm not even sure when
--{no-,}as-needed came along, perhaps we don't actually need to worry?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|