qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang
@ 2019-08-09  4:19 Rebecca Cran
  2019-08-09  4:52 ` no-reply
  2019-08-09  5:22 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Rebecca Cran @ 2019-08-09  4:19 UTC (permalink / raw)
  To: qemu-devel, Michael Tokarev, Laurent Vivier, qemu-trivial; +Cc: Rebecca Cran

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-09 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09  4:19 [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang Rebecca Cran
2019-08-09  4:52 ` no-reply
2019-08-09  5:22 ` Richard Henderson
2019-08-09 15:17   ` Rebecca Cran

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).