From 9557af9ce94d434440d6397fb0d80748e4714e94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Fri, 17 Sep 2021 17:23:22 +0100 Subject: [PATCH] configure: don't override the selected host test compiler if defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are not many cases you would want to do this but one is if you want to use a test friendly compiler like gcc instead of a system compiler like clang. Either way we should honour the users choice if they have made it. Signed-off-by: Alex Bennée Cc: Warner Losh Reviewed-by: Warner Losh Message-Id: <20210917162332.3511179-2-alex.bennee@linaro.org> --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 877bf3d76a..e2750810e2 100755 --- a/configure +++ b/configure @@ -1686,8 +1686,10 @@ case "$cpu" in # No special flags required for other host CPUs esac -eval "cross_cc_${cpu}=\$cc" -cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" +if eval test -z "\${cross_cc_$cpu}"; then + eval "cross_cc_${cpu}=\$cc" + cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" +fi # For user-mode emulation the host arch has to be one we explicitly # support, even if we're using TCI. -- 2.11.0