From 34dce6335a95aa706e51923370b0d61de1333946 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 19 Nov 2024 17:37:39 +0100 Subject: [PATCH] configure: Preserve original CFLAGS when adding LLVM flags. Ensure that the specified CROSSCFLAGS (or its default value) is applied consistently during toolchain checks. Also fixes debug format recognition. The regression was introduced in commit 471d7178ae01. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b85407c46a2..c2a2701a716 100755 --- a/configure +++ b/configure @@ -10483,7 +10483,7 @@ fi } eval "${wine_arch}_DELAYLOADFLAG=\"-Wl,-delayload,\"" as_fn_append ${wine_arch}_EXTRACFLAGS " $llvm_extra_cflags" as_fn_append ${wine_arch}_LDFLAGS " $llvm_extra_ldflags" - CFLAGS="$llvm_extra_cflags $llvm_cflags" + CFLAGS="$CFLAGS $llvm_extra_cflags $llvm_cflags" else as_wine_cv_crosscc=`printf "%s\n" "wine_cv_${wine_arch}_crosscc" | sed "$as_sed_sh"` diff --git a/configure.ac b/configure.ac index dd80e0c06d8..3f8be71bd21 100644 --- a/configure.ac +++ b/configure.ac @@ -879,7 +879,7 @@ do AS_VAR_SET([${wine_arch}_DELAYLOADFLAG],["-Wl,-delayload,"]) AS_VAR_APPEND([${wine_arch}_EXTRACFLAGS],[" $llvm_extra_cflags"]) AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" $llvm_extra_ldflags"]) - CFLAGS="$llvm_extra_cflags $llvm_cflags" + CFLAGS="$CFLAGS $llvm_extra_cflags $llvm_cflags" else AS_VAR_PUSHDEF([wine_cv_crosscc], [wine_cv_${wine_arch}_crosscc]) AC_CACHE_CHECK([whether $CC works], wine_cv_crosscc,