All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jones <drjones@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>, Wei Huang <wei@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <20180305135232.GR17368@redhat.com> (raw)
In-Reply-To: <CAFEAcA8jse2AdCO8JgA7m99h8pwTRBCQ9aOi=-0QOG+pA9tk2w@mail.gmail.com>

On Mon, Mar 05, 2018 at 01:40:06PM +0000, Peter Maydell wrote:
> On 5 March 2018 at 13:36, Andrew Jones <drjones@redhat.com> 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	other threads:[~2018-03-05 13:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 18:02 [Qemu-devel] [PATCH V7 0/4] tests: Add migration test for aarch64 Wei Huang
2018-02-28 18:02 ` [Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detection functions to rules.mak Wei Huang
2018-03-02 14:51   ` Laurent Vivier
2018-03-02 16:27   ` Laurent Vivier
2018-03-05 11:01     ` Dr. David Alan Gilbert
2018-03-05 13:36       ` Andrew Jones
2018-03-05 13:40         ` Peter Maydell
2018-03-05 13:52           ` Daniel P. Berrangé [this message]
2018-03-05 13:52         ` Dr. David Alan Gilbert
2018-03-05 17:59           ` Wei Huang
2018-03-05 18:35             ` Laurent Vivier
2018-04-04 12:38               ` Alex Bennée
2018-02-28 18:02 ` [Qemu-devel] [PATCH V7 2/4] tests/migration: Convert the boot block compilation script into Makefile Wei Huang
2018-03-02 15:25   ` Laurent Vivier
2018-03-02 15:54     ` Wei Huang
2018-02-28 18:02 ` [Qemu-devel] [PATCH V7 3/4] tests/migration: Add migration-test header file Wei Huang
2018-03-01  9:48   ` Andrew Jones
2018-03-01 15:26     ` Dr. David Alan Gilbert
2018-02-28 18:02 ` [Qemu-devel] [PATCH V7 4/4] tests: Add migration test for aarch64 Wei Huang
2018-03-01  9:45   ` Andrew Jones
2018-03-12 15:41   ` Andrew Jones
2018-03-01 15:28 ` [Qemu-devel] [PATCH V7 0/4] " Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180305135232.GR17368@redhat.com \
    --to=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=wei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.