From: Alex Bennée Date: Fri, 17 Sep 2021 16:23:22 +0000 (+0100) Subject: configure: don't override the selected host test compiler if defined X-Git-Tag: v6.2.0-rc0~61^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9557af9ce94d434440d6397fb0d80748e4714e94;p=thirdparty%2Fqemu.git configure: don't override the selected host test compiler if defined 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> --- diff --git a/configure b/configure index 877bf3d76a6..e2750810e2b 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.