diff options
author | Omar Polo <op@omarpolo.com> | 2021-11-16 08:48:04 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-11-16 08:48:04 +0000 |
commit | eb77afa8d308a2f4f422df2ff19f023b5b2cc591 (patch) | |
tree | 2e2e75e2de093490820a2c4c22358201cd3c5468 /configure | |
parent | 193380eaa4b4fa001dd773b9ee94e2545eed5efa (diff) |
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
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -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 } |