mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
config: compile test rather than run test
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 <tuxoko@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2191
This commit is contained in:
parent
26b42f3f9d
commit
a15dac42df
@ -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])
|
||||
], [
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user