qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] tests/tcg: use EXTRA_CFLAGS everywhere
Date: Wed, 7 Aug 2019 15:10:12 +0200	[thread overview]
Message-ID: <47a7ff81-4362-ac1a-a95c-4105e4682f3f@redhat.com> (raw)
In-Reply-To: <87o911i1fg.fsf@linaro.org>

On 07/08/19 14:51, Alex Bennée wrote:
>> For i386 specifically, this allows using the host GCC
>> to compile the i386 tests.  But, it should really be
>> done for all targets, unless we want to pass $(EXTRA_CFLAGS)
>> directly as part of $(CC).
> Hmm well for softmmu the tests take the decision:
> 
>   # For softmmu targets we include a different Makefile fragement as the
>   # build options for bare programs are usually pretty different. They
>   # are expected to provide their own build recipes.
> 
> So we are not expecting to handle multi-classing the system compiler to
> generate different binaries with a common build string.

We almost do, since we have

case "$cpu" in
    i386)
           CPU_CFLAGS="-m32"
           LDFLAGS="-m32 $LDFLAGS"
           cross_cc_i386=$cc
           cross_cc_cflags_i386="$CPU_CFLAGS"

So you can compile with "./configure --cpu=i386" and have it use "gcc
-m32" as a cross compiler on x86_64, also for TCG tests.  So it seemed
half-baked to me.

> To be honest I
> wonder if we should just drop the EXTRA_CFLAGS shenanigans in favour of
> an explicit compiler per target?

I don't know.  I think supporting "gcc -m32" on x86_64 is a good idea
though.  Yet another possibility is to use "--cross-cc-i386='gcc -m32'"
directly, but that would be a separate patch.  For these I really wanted
to have no semantic change.

Paolo


  reply	other threads:[~2019-08-07 13:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 12:37 [Qemu-devel] [PATCH 0/3] tests/tcg: disentangle makefiles Paolo Bonzini
2019-07-30 12:37 ` [Qemu-devel] [PATCH 1/3] tests/tcg: use EXTRA_CFLAGS everywhere Paolo Bonzini
2019-08-07 12:51   ` Alex Bennée
2019-08-07 13:10     ` Paolo Bonzini [this message]
2019-07-30 12:37 ` [Qemu-devel] [PATCH 2/3] tests/tcg: cleanup Makefile inclusions Paolo Bonzini
2019-07-30 12:44   ` Philippe Mathieu-Daudé
2019-07-30 13:21     ` Paolo Bonzini
2019-08-07 13:05   ` Alex Bennée
2019-08-07 13:11     ` Paolo Bonzini
2019-07-30 12:37 ` [Qemu-devel] [PATCH 3/3] tests/tcg: move configuration to a sub-shell script Paolo Bonzini
2019-08-07 12:42   ` Alex Bennée
2019-08-07 13:10   ` Alex Bennée
2019-08-07 13:26     ` Paolo Bonzini
2019-07-30 12:53 ` [Qemu-devel] [PATCH 0/3] tests/tcg: disentangle makefiles no-reply
2019-08-07 12:40 ` Alex Bennée
2019-08-07 13:06   ` Paolo Bonzini
2019-08-07 13:33     ` Eric Blake
2019-08-07 14:30       ` Paolo Bonzini
2019-08-07 16:38         ` Alex Bennée
2019-08-07 16:58           ` Paolo Bonzini

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=47a7ff81-4362-ac1a-a95c-4105e4682f3f@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).