From: Dr. David Alan Gilbert Date: Fri, 10 Jun 2016 11:16:17 +0000 (+0100) Subject: Make avx2 configure test work with -O2 X-Git-Tag: qemu-xen-4.8.0-rc1~201^2~23 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fc6e1de9d885377e1e68e50e25ed5425540b9b81;p=qemu-xen.git Make avx2 configure test work with -O2 When configured with --extra-cflags=-O2 gcc optimised out the test and the readelf failed the check leaving avx2 disabled. Signed-off-by: Dr. David Alan Gilbert Message-Id: <1465557378-24105-2-git-send-email-dgilbert@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/configure b/configure index cbe013b6bd..3c0e279762 100755 --- a/configure +++ b/configure @@ -1781,7 +1781,7 @@ fi cat > $TMPC << EOF static void bar(void) {} static void *bar_ifunc(void) {return (void*) bar;} -static void foo(void) __attribute__((ifunc("bar_ifunc"))); +void foo(void) __attribute__((ifunc("bar_ifunc"))); int main(void) { foo(); return 0; } EOF if compile_prog "-mavx2" "" ; then