Skip to content

Commit

Permalink
hot fix to support -march=native on recent gcc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mreineck committed Oct 15, 2018
1 parent 593d4eb commit cc4753f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ AC_ARG_ENABLE(pic,

case $CCTYPE in
gcc)
CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors"
CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors -march=native"
GCCVERSION="`$CC -dumpversion 2>&1`"
echo "Using gcc version $GCCVERSION"
AC_SUBST(GCCVERSION)
changequote(,)
gcc43=`echo $GCCVERSION | grep -c '^4\.[3456789]'`
gcc44=`echo $GCCVERSION | grep -c '^4\.4'`
changequote([,])
if test $gcc43 -gt 0; then
CCFLAGS="$CCFLAGS -march=native"
fi
if test $gcc44 -gt 0; then
CCFLAGS="$CCFLAGS -fno-tree-fre"
fi
Expand Down

0 comments on commit cc4753f

Please sign in to comment.