]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Check for compiler for -march=native support 653/head 703/head
authorKen Steele <ken@tilera.com>
Fri, 22 Nov 2013 17:54:32 +0000 (12:54 -0500)
committerKen Steele <ken@tilera.com>
Tue, 10 Dec 2013 17:30:33 +0000 (12:30 -0500)
Check all compilers to see if they support the -march=native flags, rather
than assuming gcc 4.2 or later does. Tile GCC doesn't currently support it,
so not checking break Tile compiles.

configure.ac

index 4b394c6907ca110a60be1736cf2eb43f33a33cfc..3556641573568b134c39b13dcf2e7a3fcb81aaca 100644 (file)
     AC_ARG_ENABLE(gccmarch_native,
            AS_HELP_STRING([--enable-gccmarch-native], [Enable gcc march=native gcc 4.2 and later only]),,[enable_gccmarch_native=yes])
     AS_IF([test "x$enable_gccmarch_native" = "xyes"], [
-        if test `basename $CC` = "clang"; then
             OFLAGS="$CFLAGS"
             CFLAGS="$CFLAGS -march=native"
             AC_MSG_CHECKING([checking if $CC supports -march=native])
                           enable_gccmarch_native=no
                         ]
                      )
-        fi
-        if test `basename $CC` = "gcc"; then
-            case $host in
-            *darwin*|*Darwin*)
-            if test "$gccvernum" -ge "403"; then
-                        dnl gcc 4.3 or later
-                        CFLAGS="$CFLAGS -march=native"
-            else
-                enable_gccmarch_native=no
-            fi
-            ;;
-            *)
-            if test "$gccvernum" -ge "402"; then
-                        dnl gcc 4.2 or later
-                        CFLAGS="$CFLAGS -march=native"
-            fi
-            ;;
-            esac
-        fi
     ])
 
 # options