diff mbox series

[PULL,01/12] configure: don't override the selected host test compiler if defined

Message ID 20211008122556.757252-2-alex.bennee@linaro.org
State Accepted
Commit 9557af9ce94d434440d6397fb0d80748e4714e94
Headers show
Series some testing and plugin updates | expand

Commit Message

Alex Bennée Oct. 8, 2021, 12:25 p.m. UTC
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 <alex.bennee@linaro.org>

Cc: Warner Losh <imp@bsdimp.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>

Message-Id: <20210917162332.3511179-2-alex.bennee@linaro.org>

-- 
2.30.2
diff mbox series

Patch

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.