From eb77afa8d308a2f4f422df2ff19f023b5b2cc591 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Tue, 16 Nov 2021 08:48:04 +0000 Subject: [PATCH] don't run the test binaries, compilation status is enough During a cross-compilation we can compile the test binaries but not run in the host machine. Furthermore, the exit status of the test isn't really important for the types of check we have, the compilation status is enough. Reported by Nikolay Korotkiy (@sikmir) on Github, fixes issue #8 --- configure | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 7264b3f..20cb846 100755 --- a/configure +++ b/configure @@ -167,18 +167,8 @@ __HEREDOC__ if ${COMP} -o "have/${1}" "have/${1}.c" ${3} ${LDFLAGS} 1>&3 2>&3 then - echo "partial result of ${n}: ${CC} succeeded" 1>&3 - else - echo "tested ${n}: no (compilation failed)" 1>&2 - echo "result of ${n}: ${CC} failed with exit status $?" 1>&3 - echo "result of compiling ${n}: no" 1>&3 - echo 1>&3 - return 1 - fi - - if ./have/${1} 1>&3 2>&3; then echo "tested ${n}: yes" 1>&2 - echo "result of running ${n}: yes" 1>&3 + echo "tested ${n}: yes" 1>&3 echo 1>&3 eval HAVE_${2}=1 [ "${3}" = "-D_GNU_SOURCE" ] && NEED_GNU_SOURCE=1 @@ -187,11 +177,10 @@ __HEREDOC__ rm "have/${1}" return 0 else - echo "tested ${n}: no (execution failed)" 1>&2 - echo "result of ${n}: execution failed with exit status $?" 1>&3 - echo "result of running ${n}: no" 1>&3 + echo "tested ${n}: no (compilation failed)" 1>&2 + echo "result of ${n}: ${CC} failed with exit status $?" 1>&3 + echo "result of compiling ${n}: no" 1>&3 echo 1>&3 - rm "have/${1}" return 1 fi }