On 15/08/23 00:55, Denys Dmytriyenko wrote:
On Fri, Aug 11, 2023 at 05:00:30PM +0530, Aniket Limaye wrote:
Hi Denys,
This is probably not about this new patch series for the r5f
toolchain. I am facing issues with the internal toolchain for A72
I was trying out u-boot and linux builds with these new internal
toolchains and everything works fine EXCEPT for u-boot-a72 build:
I get this error : "aarch64-oe-linux-ld.bfd: cannot find -lgcc: No
such file or directory"
I narrowed down the error to incorrect Ldir being parsed in the
u-boot Makefile here [1] which expects absolute path for the
print-libgcc-file-name.
The build with the external toolchain works coz that prints the
absolute path while the yocto internal toolchain is returning just
the filename: ./bin/aarch64-none-linux-gnu-gcc
-print-libgcc-file-name #Prints full path to libgcc.a file
./linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-gcc
-print-libgcc-file-name #Prints just "libgcc.a". The dirname for
this returns "."
[1]:
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2023.04#n895
As it stands, I am unable to build u-boot with the internal
toolchain. Either something needs to be fixed in the toolchain
itself or I am missing some flag / Env variable?
Aniket,
You need to pass the correct --sysroot to gcc.
And the environment-setup-aarch64-oe-linux script properly sets CC variable
already with the correct --sysroot of the installed linux-devkit:
$ echo $CC
aarch64-oe-linux-gcc -mbranch-protection=standard
--sysroot=/tmp/sdk/sysroots/aarch64-oe-linux
$ $CC -print-libgcc-file-name
/tmp/sdk/sysroots/aarch64-oe-linux/usr/lib/aarch64-oe-linux/11.4.0/libgcc.a
You can pass this to the U-boot Makefile:
$ make CC="$CC" <any other vars> <target>
As a reference, u-boot recipe passes at least CROSS_COMPILE, CC and HOSTCC.
Explicitly setting CC, with the correct sysroot, when calling make u-boot-a72
worked for me. Thanks for the clarification!
Ryan, we can merge this series now
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14855):
https://lists.yoctoproject.org/g/meta-arago/message/14855
Mute This Topic: https://lists.yoctoproject.org/mt/99994847/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-