From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b87Xi-0007YC-QZ for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:54:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b87Xg-0007Xc-So for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:54:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b87Xg-0007XY-Mx for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:54:44 -0400 From: "Dr. David Alan Gilbert (git)" Date: Wed, 1 Jun 2016 15:54:38 +0100 Message-Id: <1464792879-30954-2-git-send-email-dgilbert@redhat.com> In-Reply-To: <1464792879-30954-1-git-send-email-dgilbert@redhat.com> References: <1464792879-30954-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 1/2] Make avx2 configure test work with -O2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, liang.z.li@intel.com, pbonzini@redhat.com, peter.maydell@linaro.org Cc: amit.shah@redhat.com From: "Dr. David Alan Gilbert" 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 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index b5aab72..5693c60 100755 --- a/configure +++ b/configure @@ -1783,7 +1783,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 -- 2.7.4