qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detec


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detection functions to rules.mak
Date: Mon, 5 Mar 2018 13:52:32 +0000
User-agent: Mutt/1.9.2 (2017-12-15)

On Mon, Mar 05, 2018 at 01:40:06PM +0000, Peter Maydell wrote:
> On 5 March 2018 at 13:36, Andrew Jones <address@hidden> wrote:
> > IMO, the makefile is the right approach. I wouldn't like to see AArch64
> > added with a script and then converted, along with x86, to a makefile at
> > some later time (probably never).
> 
> I'm not really enthusiastic about this approach of picking a cross
> compiler in the makefile rather than configure, though. The stuff
> we have at the moment that tries to build the x86 ROMs with whatever
> random host compiler we happen to be using is already a source
> of occasional brokenness. If we're going to try to build target
> code on a wider basis than just the x86 roms I'd like to see it
> done in a cleaner manner...

Seems like for each arch that we need a cross compiler for, we
ought to have configure args & a corresponding config.mak variable

eg

   configure \
        --cross-cc-aarch64=aarch64-redhat-linux-gcc \
        --cross-cc-x86_64=x86_64-redhat-linux-gcc \

If the --cross-cc-$ARCH arg isn't given we can just autodetect
one, if present.

This would end up setting in config.mak

 CROSS_CC_X86_64=x86_64-redhat-linux-c++
 CROSS_CC_AARCH64=aarch64-redhat-linux-c++


If the --cross-cc-$ARCH  arg is not given, and we can't automatically
find a suitable compiler for that arch, then CC_$ARCH make variable
should be left undefined. Any rules using these cross-compilers should
automatically disable themselves, to ensure we don't suddenly force
all people building QEMU to install many cross compilers.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]