Skip to content

Commit

Permalink
Fix default args for cpu features.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Hosseini committed Sep 20, 2019
1 parent 86adbd5 commit cc90ec3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions acinclude/ax_check_cpu.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ AC_MSG_CHECKING([for cpu arch])
case $target in
amd64-* | x86_64-*)
ARCH_CPUFLAGS="-mpopcnt -msse4"
ARCH_CXXFLAGS="-m64";;
ARCH_CXXFLAGS="-m64"
;;
aarch64*-*)
dnl This is an arch for Nvidia Xavier a proper detection would be nice.
ARCH_CPUFLAGS="-march=armv8.2-a"
;;
*) ;;
esac
AC_MSG_RESULT([$target CPUFLAGS+="$ARCH_CPUFLAGS" CXXFLAGS+="$ARCH_CXXFLAGS"])
AC_MSG_RESULT([$target CPUFLAGS+=" $ARCH_CPUFLAGS" CXXFLAGS+=" $ARCH_CXXFLAGS"])
AC_SUBST(ARCH_CPUFLAGS)
AC_SUBST(ARCH_CXXFLAGS)
Expand Down
10 changes: 7 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6816,12 +6816,16 @@ $as_echo_n "checking for cpu arch... " >&6; }
case $target in
amd64-* | x86_64-*)
ARCH_CPUFLAGS="-mpopcnt -msse4"
ARCH_CXXFLAGS="-m64";;
ARCH_CXXFLAGS="-m64"
;;
aarch64*-*)
ARCH_CPUFLAGS="-march=armv8.2-a"
;;
*) ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target CPUFLAGS+=\"$ARCH_CPUFLAGS\" CXXFLAGS+=\"$ARCH_CXXFLAGS\"" >&5
$as_echo "$target CPUFLAGS+=\"$ARCH_CPUFLAGS\" CXXFLAGS+=\"$ARCH_CXXFLAGS\"" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target CPUFLAGS+=\" $ARCH_CPUFLAGS\" CXXFLAGS+=\" $ARCH_CXXFLAGS\"" >&5
$as_echo "$target CPUFLAGS+=\" $ARCH_CPUFLAGS\" CXXFLAGS+=\" $ARCH_CXXFLAGS\"" >&6; }



Expand Down

0 comments on commit cc90ec3

Please sign in to comment.