On 23/12/2022 11:16 am, Oleksii Kurochko wrote: > diff --git a/automation/scripts/build b/automation/scripts/build > index a593419063..026f480e76 100755 > --- a/automation/scripts/build > +++ b/automation/scripts/build > @@ -2,12 +2,12 @@ > > test -f /etc/os-release && cat "$_" > > -$CC --version > +${CROSS_COMPILE}${CC} --version > > # Express the compiler version as an integer. e.g. GCC 4.9.2 => 0x040902 > cc-ver() > { > - $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }' > + ${CROSS_COMPILE}${CC} -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", > $1, $2, $3 }' > } > > # random config or default config > @@ -66,7 +66,7 @@ if ! type python3 || python3 -c "import sys; res = > sys.version_info < (3, 5); ex > fi > > # SeaBIOS requires GCC 4.6 or later > -if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then > +if [[ "${CROSS_COMPILE}${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
This change won't work, because it's no longer a plain "gcc". Also, prepreding CROSS_COMPILE isn't compatible with LLVM toolchains, but that's not something you've made any worse with your change (just more obvious). We probably want a stanza near the top which sets CC="${CROSS_COMPILE}${CC}" which can be adjusted to support LLVM in due course, and we'll need to detect GCC using --version | grep as its done elsewhere. But the other logic wants reworking too so we don't play around with bits of the tools build when we're doing a hypervisor-only build anyway... ~Andrew