qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: pierrick.bouvier@linaro.org, qemu-stable@nongnu.org,
	alex.bennee@linaro.org
Subject: Re: [PATCH 1/2] meson: define qemu_isa_flags
Date: Mon, 7 Oct 2024 07:46:09 -0700	[thread overview]
Message-ID: <86423148-2cbb-4263-a351-dac0ece198e7@linaro.org> (raw)
In-Reply-To: <20241007084342.1264048-2-pbonzini@redhat.com>

On 10/7/24 01:43, Paolo Bonzini wrote:
> Create a separate variable for compiler flags that enable
> specific instruction set extensions, so that they can be used with
> cc.compiles/cc.links.
> 
> Note that -mfpmath=sse is a code generation option but it does not
> enable new instructions, therefore I did not make it part of
> qemu_isa_flags.
> 
> Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   meson.build | 24 +++++++++++++++---------
>   1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 76335bb2a51..bbb0f6d9bcf 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -335,6 +335,10 @@ elif host_os == 'windows'
>     endif
>   endif
>   
> +# Choose instruction set (currently x86-only)
> +
> +qemu_isa_flags = []
> +
>   # __sync_fetch_and_and requires at least -march=i486. Many toolchains
>   # use i686 as default anyway, but for those that don't, an explicit
>   # specification is necessary
> @@ -351,7 +355,7 @@ if host_arch == 'i386' and not cc.links('''
>       sfaa(&val);
>       return val;
>     }''')
> -  qemu_common_flags = ['-march=i486'] + qemu_common_flags
> +  qemu_isa_flags = ['-march=i486']

Use += ?

> -      qemu_common_flags = ['-mcx16'] + qemu_common_flags
> +      qemu_isa_flags = ['-mcx16'] + qemu_isa_flags

Likewise, why verbosely prepend, rather than append with += ?
The same for all others, including

> +qemu_common_flags = qemu_isa_flags + qemu_common_flags


r~


  reply	other threads:[~2024-10-07 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07  8:43 [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Paolo Bonzini
2024-10-07  8:43 ` [PATCH 1/2] meson: define qemu_isa_flags Paolo Bonzini
2024-10-07 14:46   ` Richard Henderson [this message]
2024-10-07 14:48     ` Paolo Bonzini
2024-10-07 14:55       ` Richard Henderson
2024-10-07 14:57     ` Michael Tokarev
2024-10-07  8:43 ` [PATCH 2/2] meson: ensure -mcx16 is passed when detecting ATOMIC128 Paolo Bonzini
2024-10-07 14:46   ` Richard Henderson
2024-10-07  9:01 ` [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Michael Tokarev
2024-10-07  9:58 ` Alex Bennée
2024-10-07 16:40 ` Pierrick Bouvier
  -- strict thread matches above, loose matches on Subject: below --
2024-10-07 17:23 [PATCH v3 " Paolo Bonzini
2024-10-07 17:23 ` [PATCH 1/2] meson: define qemu_isa_flags 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=86423148-2cbb-4263-a351-dac0ece198e7@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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).