WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] build fixes for cross-compiling

To: "Keir Fraser" <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] build fixes for cross-compiling
From: "Jan Beulich" <JBeulich@xxxxxxxx>
Date: Thu, 29 Sep 2011 15:51:09 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Adin Scannell <adin@xxxxxxxxxxxxxxx>
Delivery-date: Thu, 29 Sep 2011 07:52:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAA9CF69.21DEB%keir.xen@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4E844703020000780005868E@xxxxxxxxxxxxxxxxxxxx> <CAA9CF69.21DEB%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 29.09.11 at 16:31, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 29/09/2011 01:22, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
> 
>>>>> On 29.09.11 at 10:00, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
>>> We have LDFLAGS_DIRECT, adding LDFLAGS_INDIRECT seems a bit gross
>>> though... I wonder if perhaps LDFLAGS and LDFLAGS_DIRECT should be
>>> mut8lly exclusive, i.e. direct calls to the linker use only the latter
>>> and not both?
>> 
>> Actually I always found it wrong to read commands like "$(CC) $(LDFLAGS)"
>> - imo xxxFLAGS should be passed exclusively to tool xxx. So rather than
>> having LDFLAGS_DIRECT, I'd suggest cleaning this up and having e.g.
>> CCLDFLAGS or CC_LINK_FLAGS or some such.
> 
> Or perhaps we could arrange to only link via direct invocation of ld? Apart
> from the hassle of changing all our Makefiles, is there a good reason to use
> gcc as a linker wrapper?

I'm afraid that would require manually specifying the crt*.o files as
well as libgcc (if required) the compiler automatically tells the linker to
include, which would be ugly (namely when it comes to supporting
multiple host OSes). Imo, invoking the naked linker should generally be
avoided when linking with any kind of system provided runtime library.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel