aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2025-07-22 00:09:28 +0200
committerKacper Michajłow <kasper93@gmail.com>2025-08-05 18:31:04 +0200
commit5b3d6c046002fe51a5f20059b7d529e4fbc6caa4 (patch)
tree823a9f0314bf9694c17b4a3c9665d585cce9b595
parente0440eb3929d2ebcc33188f4b7c551a910852985 (diff)
downloadffmpeg-5b3d6c046002fe51a5f20059b7d529e4fbc6caa4.tar.gz
configure: don't use dangling temp file state
There was implicit assumption that the $TMPC file is empty when doing --cpu=host checks. This breaks if any check is done before that. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
-rwxr-xr-xconfigure2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure b/configure
index c0a4c3c87c..d87f264b46 100755
--- a/configure
+++ b/configure
@@ -5298,6 +5298,7 @@ if test "$cpu" = host; then
case "$cc_type" in
gcc|llvm_gcc)
check_native(){
+ : > $TMPC
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
sed -n "/cc1.*$1=/{
s/.*$1=\\([^ ]*\\).*/\\1/
@@ -5309,6 +5310,7 @@ if test "$cpu" = host; then
;;
clang)
check_native(){
+ : > $TMPC
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
sed -n "/cc1.*-target-cpu /{
s/.*-target-cpu \\([^ ]*\\).*/\\1/