sanity/utils: Directly use gcc, not BUILD_CC

The test/helper is written assuming gcc, so just call that and stop
accessing BUILD_CC which may be set to clang.

(From OE-Core rev: 0a165a93693a293f08cb0d7e2dfa1016803a917a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2025-07-01 22:28:21 +01:00
parent 204653a519
commit 8624474277
2 changed files with 9 additions and 17 deletions

View File

@@ -514,12 +514,9 @@ def check_userns():
# built buildtools-extended-tarball)
#
def check_gcc_version(sanity_data):
import subprocess
build_cc, version = oe.utils.get_host_compiler_version(sanity_data)
if build_cc.strip() == "gcc":
if bb.utils.vercmp_string_op(version, "8.0", "<"):
return "Your version of gcc is older than 8.0 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"
version = oe.utils.get_host_gcc_version(sanity_data)
if bb.utils.vercmp_string_op(version, "8.0", "<"):
return "Your version of gcc is older than 8.0 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"
return None
# Tar version 1.24 and onwards handle overwriting symlinks correctly