qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] configure: don't optimize away avx2 test functions


From: Mohammed Gamal
Subject: [Qemu-devel] [PATCH] configure: don't optimize away avx2 test functions
Date: Tue, 21 Jun 2016 11:10:25 +0200

The configure script contains an embedded test C function
to test for avx2 support. It gets optimized away with
gcc 4.7 on wheezy.
Add __attribute__((optimize("O0"))) to it in order
to prevent optimizing it away

Signed-off-by: Mohammed Gamal <address@hidden>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 8ecf29d..ba31d3a 100755
--- a/configure
+++ b/configure
@@ -1782,7 +1782,7 @@ fi
 
 cat > $TMPC << EOF
 static void bar(void) {}
-static void *bar_ifunc(void) {return (void*) bar;}
+static void __attribute__((optimize("O0"))) *bar_ifunc(void) {return (void*) 
bar;}
 static void foo(void) __attribute__((ifunc("bar_ifunc")));
 int main(void) { foo(); return 0; }
 EOF
-- 
1.9.1




reply via email to

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