From 40511c47d4ccb1ce92cb22812f101aeb3dc8f813 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 10 Mar 2017 20:49:36 +0100 Subject: [PATCH] Compilation with -march=native fails on Raspbian/Raspberry Pi 3 --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2dc6cb2e..c624b52e 100644 --- a/configure.ac +++ b/configure.ac @@ -159,8 +159,9 @@ AC_ARG_ENABLE(opt, [AS_HELP_STRING(--enable-opt,Optimize for the native CPU - The resulting library will be faster but not portable)], [ AS_IF([test "x$enableval" = "xyes"], [ - CFLAGS="$CFLAGS -O3 -march=native" - LDFLAGS="$LDFLAGS -O3 -march=native"]) + AX_CHECK_COMPILE_FLAG([-Ofast], [CFLAGS="$CFLAGS -Ofast"]) + AX_CHECK_COMPILE_FLAG([-march=native], [CFLAGS="$CFLAGS -march=native"]) + ]) ]) AC_SUBST([MAINT])