qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] tests/tcg: use EXTRA_CFLAGS everywhere


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/3] tests/tcg: use EXTRA_CFLAGS everywhere
Date: Wed, 7 Aug 2019 15:10:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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 via email to

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