Skip to content

Commit be91192

Browse files
committed
configure option --enable-native to use all the capability of the CPU
1 parent 1876f3a commit be91192

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ work
116116
*.nativecodeanalysis.xml
117117
vc.nativecodeanalysis.all.xml
118118
*.lastcodeanalysissucceeded
119+
perf.data*
119120

120121
# OS generated files
121122
.DS_Store

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ if test x$enable_robots != xno; then
171171
AC_DEFINE(ROBOT, 1, [Enabling Robots])
172172
fi
173173

174+
AC_ARG_ENABLE(native, [ --enable-native optimized for the CPU used to build])
175+
174176
# debugging and profiling
175177
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging])
176178
AC_ARG_ENABLE(profiling, [ --enable-profiling turn on profiling])
@@ -690,6 +692,9 @@ case $host_os in
690692
case $host_vendor in
691693
pc)
692694
FLAGS=-mtune=native
695+
if test x$enable_native = xyes ; then
696+
FLAGS="$FLAGS -march=native"
697+
fi
693698
CONF_CFLAGS="$CONF_CFLAGS $FLAGS";
694699
CONF_CXXFLAGS="$CONF_CXXFLAGS $FLAGS";
695700
CONF_CXXFLAGS="$CONF_CXXFLAGS -fsigned-char";;

0 commit comments

Comments
 (0)