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: Adin Scannell <adin@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] build fixes for cross-compiling
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 29 Sep 2011 08:55:00 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 29 Sep 2011 00:55:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAAJKtqre0Q3qbngZi01NfmSQSh0YXtSyS4LZc=cOQt98Xqzcyw@xxxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <CAAJKtqre0Q3qbngZi01NfmSQSh0YXtSyS4LZc=cOQt98Xqzcyw@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-09-28 at 22:31 +0100, Adin Scannell wrote:
> I always have problems cross-compiling tools (I build everything on a
> 64-bit machine and generally target a 32-bit host), because all the
> link steps are missing targets.  I've use this tiny patch on the base
> of my workspaces.
> 
> To my knowledge, this doesn't break anything -- but who knows with
> builds, particularly cross-compiling. I just thought I'd throw this
> there in case others have the same issue and it doesn't affect
> standard build environments.

FWIW Linux does approximately the same thing. It uses it's cc-option
construct in the m32 case (presumably once upon a time non-biarch 32 bit
compilers were common) but given that we already use -m32
unconditionally in CFLAGS I guess we don't care now.

I don't actually do cross compiles myself (only because it doesn't
work... so maybe now I will) but this didn't break my native 32 bit
tools or native 64 bit Xen build so:

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> 

(I suppose this change is small enough not to require 
> 
> 
> diff -r a422e2a4451e config/x86_32.mk
> --- a/config/x86_32.mk
> +++ b/config/x86_32.mk
> @@ -8,6 +8,7 @@ CONFIG_XCUTILS := y
>  CONFIG_IOEMU := y
> 
>  CFLAGS += -m32 -march=i686
> +LDFLAGS += -m32 -march=i686
> 
>  # Use only if calling $(LD) directly.
>  LDFLAGS_DIRECT_OpenBSD = _obsd
> diff -r a422e2a4451e config/x86_64.mk
> --- a/config/x86_64.mk
> +++ b/config/x86_64.mk
> @@ -9,6 +9,7 @@ CONFIG_XCUTILS := y
>  CONFIG_IOEMU := y
> 
>  CFLAGS += -m64
> +LDFLAGS += -m64
> 
>  LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
>  LIBDIR = $(LIBDIR_x86_64)



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