Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/78215?usp=email )
Change subject: util/crossgcc/buildgcc: Fix detection of GNAT on recent versions ......................................................................
util/crossgcc/buildgcc: Fix detection of GNAT on recent versions
gnatgcc is deprecated and in recent GCC releases its purpose is fulfilled by the gcc binary. In case of a deprecated gnatgcc version is installed, it doesn't provide the expected output and hostcc_has_gnat1() fails. In this case, just set the value of CC to gcc.
It's still required to install GNAT in addition to GCC.
Change-Id: I730bdfda81268d10bd2a41ef5cb4e3810b76a42c Signed-off-by: Felix Singer felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/78215 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin L Roth gaumless@gmail.com --- M util/crossgcc/buildgcc 1 file changed, 10 insertions(+), 0 deletions(-)
Approvals: Martin L Roth: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index ebc9fcb..d336556 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -1080,7 +1080,17 @@ fi else if searchtool gnatgcc "Free Software Foundation" nofail > /dev/null; then + # gnatgcc is deprecated and in recent GCC releases its purpose is + # fulfilled by the gcc binary. In case of a deprecated gnatgcc + # version is installed, it doesn't provide the expected output and + # hostcc_has_gnat1() fails. In this case, just set the value of CC + # to gcc. + # TODO: Remove this whole branch when time is appropriate as the + # second branch fulfills our needs. CC=gnatgcc + if ! hostcc_has_gnat1; then + CC=gcc + fi elif searchtool gcc "Free Software Foundation" nofail > /dev/null; then CC=gcc else