Hi Anand,

Olivier's assessment is correct, though the error message could certainly do with some tuning. Your best bet is to install the aarch64-none-elf​ cross-compiler that Olivier linked and make sure it's on your PATH​, where it'll be picked up automatically. Alternatively, you can force the build system to use your system-packaged compiler by providing either CC=gcc​ or CROSS_COMPILE=aarch64-linux-gnu-​, but we don't test this configuration and we can't guarantee that it will work.

Chris

From: Anand Moon via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 04 July 2024 07:01
To: Olivier Deprez <Olivier.Deprez@arm.com>
Cc: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] Re: Native compilation failed on dev board not able to find the gcc
 
Hi Olivier,

On Thu, 4 Jul 2024 at 10:24, Olivier Deprez <Olivier.Deprez@arm.com> wrote:
>
> Hi,
>
> I don't have a completely good answer but per my observations it builds:
>
> Adding an external toolchain in $PATH e.g. arm-gnu-toolchain-13.2.rel1-aarch64-aarch64-none-elf from  https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
> if you don't have a toolchain in $PATH and provide it by CROSS_COMPILE e.g. make CROSS_COMPILE=<path>/arm-gnu-toolchain-12.2.rel1-aarch64-aarch64-none-elf/bin/aarch64-none-elf- PLAT=rpi5 DEBUG=1
> if you pass the native compiler path through CROSS_COMPILE e.g. make CROSS_COMPILE=/usr/bin/ PLAT=rpi5 DEBUG=1
>

Thanks for the input,

But some u-boot package managers like Archlinux (pacman) which are used to build
ATF along with u-boot on the native target board, which fails now with
CROSS_COMPILE is not set.

I have not given it a try for buildroot or yocto to verify if the latest ATF
build without CROSS_COMPILE set.

Will keep you posted on this.

>
> Regards,
> Olivier.
>

Thanks
-Anand
--
TF-A mailing list -- tf-a@lists.trustedfirmware.org
To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org