Skip to content

Commit

Permalink
config: compile test rather than run test
Browse files Browse the repository at this point in the history
When testing compiler flags, we only need to do compile test. Otherwise,
configure will fail with "configure: error: cannot run test program while
cross compiling" when cross compiling.

Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2191
  • Loading branch information
tuxoko authored and behlendorf committed Mar 20, 2014
1 parent 26b42f3 commit a15dac4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/always-no-aggressive-loop-optimizations.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_NO_AGGRESSIVE_LOOP_OPTIMIZATIONS], [
saved_flags="$CFLAGS"
CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations"
AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
NO_AGGRESSIVE_LOOP_OPTIMIZATIONS=-fno-aggressive-loop-optimizations
AC_MSG_RESULT([yes])
], [
Expand Down
2 changes: 1 addition & 1 deletion config/always-no-unused-but-set-variable.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE], [
saved_flags="$CFLAGS"
CFLAGS="$CFLAGS -Wunused-but-set-variable"
AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
[
NO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
AC_MSG_RESULT([yes])
Expand Down
2 changes: 1 addition & 1 deletion config/user-frame-larger-than.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_FRAME_LARGER_THAN], [
saved_flags="$CFLAGS"
CFLAGS="$CFLAGS -Wframe-larger-than=1024"
AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
[
FRAME_LARGER_THAN=-Wframe-larger-than=1024
AC_MSG_RESULT([yes])
Expand Down

0 comments on commit a15dac4

Please sign in to comment.