qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rebecca Cran <rebecca@bsdio.com>
To: qemu-devel@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	Laurent Vivier <laurent@vivier.eu>,
	qemu-trivial@nongnu.org
Cc: Rebecca Cran <rebecca@bsdio.com>
Subject: [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang
Date: Thu,  8 Aug 2019 22:19:52 -0600	[thread overview]
Message-ID: <20190809041952.57302-1-rebecca@bsdio.com> (raw)

clang doesn't support the GCC pragma to enable AVX2, but instead
requires the command line option -mavx2. Since GCC also supports that,
remove the pragma lines and add the -mavx2 option when building the
test.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 configure | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/configure b/configure
index 714e7fb6a1..30d6c02ab4 100755
--- a/configure
+++ b/configure
@@ -5392,8 +5392,6 @@ fi
 
 if test "$cpuid_h" = "yes" && test "$avx2_opt" != "no"; then
   cat > $TMPC << EOF
-#pragma GCC push_options
-#pragma GCC target("avx2")
 #include <cpuid.h>
 #include <immintrin.h>
 static int bar(void *a) {
@@ -5402,7 +5400,7 @@ static int bar(void *a) {
 }
 int main(int argc, char *argv[]) { return bar(argv[0]); }
 EOF
-  if compile_object "" ; then
+  if compile_object "-mavx2" ; then
     avx2_opt="yes"
   else
     avx2_opt="no"
-- 
2.22.0



             reply	other threads:[~2019-08-09  4:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  4:19 Rebecca Cran [this message]
2019-08-09  4:52 ` [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang no-reply
2019-08-09  5:22 ` Richard Henderson
2019-08-09 15:17   ` Rebecca Cran

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=20190809041952.57302-1-rebecca@bsdio.com \
    --to=rebecca@bsdio.com \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).