Received: from eggs.gnu.org ([2001:4830:134:3::10]:60039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFHhh-0004RL-Sm for qemu-devel@nongnu.org; Tue, 21 Jun 2016 05:10:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFHhb-0006CJ-Q7 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 05:10:40 -0400 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:36851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFHhb-0006C8-G9 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 05:10:35 -0400 Received: by mail-lf0-x232.google.com with SMTP id q132so13595662lfe.3 for ; Tue, 21 Jun 2016 02:10:35 -0700 (PDT) From: Mohammed Gamal Date: Tue, 21 Jun 2016 11:10:25 +0200 Message-Id: <1466500225-19326-1-git-send-email-mohammed.gamal@profitbricks.com> Subject: [Qemu-devel] [PATCH] configure: don't optimize away avx2 test functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: Mohammed Gamal 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 --- 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