1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

configure: Fix a regression when probing link.exe

The version ident is printed on stdout for link.exe and redirecting
stdout to /dev/null will cause the output of link.exe to be paged.

This caused configure to hang for some configurations and by
extension some FATE clients. You might want to check if you run
affected configurations automated in FATE clients or similar setups.

Fixes: 45a30e0361
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Alexander Strasser
2025-06-21 11:13:22 +02:00
committed by Martin Storsjö
parent 32153fac84
commit 204d03c803

7
configure vendored
View File

@ -5130,10 +5130,9 @@ probe_cc(){
elif $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then elif $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
_type=msvc _type=msvc
if $_cc -nologo- 2>&1 | grep -q ^Microsoft; then if $_cc -nologo- 2>&1 | grep -q ^Microsoft; then
# The version number is printed on the first line on stderr, stdout # Depending on the tool (cl.exe or link.exe), the version number
# gets the usage instructions. Only include stderr, to avoid # is printed on the first line of stderr or stdout
# potential ordering race conditions. _ident=$($_cc 2>&1 | grep ^Microsoft | head -n1 | tr -d '\r')
_ident=$($_cc 2>&1 >/dev/null | head -n1 | tr -d '\r')
else else
_ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r') _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
fi fi