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
This commit is contained in:
Omar Polo 2021-11-16 08:48:04 +00:00
parent 193380eaa4
commit eb77afa8d3
1 changed files with 4 additions and 15 deletions

19
configure vendored
View File

@ -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
}