]> git.proxmox.com Git - mirror_zfs.git/commitdiff
config: compile test rather than run test
authorChunwei Chen <tuxoko@gmail.com>
Sat, 15 Mar 2014 06:24:40 +0000 (14:24 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 Mar 2014 19:11:57 +0000 (12:11 -0700)
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

config/always-no-aggressive-loop-optimizations.m4
config/always-no-unused-but-set-variable.m4
config/user-frame-larger-than.m4

index 8f2115ae686bcd3269d57189e1c14eb9b3c83d0e..0a5576de179d95f5735fbf86ddfef41802bdfcd1 100644 (file)
@@ -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])
        ], [
index 4a3ceb614af8a688c9c3c69b615bb6f04828ea17..863c90a16a57ced3c52649110a294d429888d267 100644 (file)
@@ -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])
index 7ad86220d7aa2aff31522ace911769a458f3381e..e0828eca079c3dc65ad3f0cc6870214f95b97f3f 100644 (file)
@@ -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])