Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Help] Using an external toolchain
@ 2025-01-11 13:32 Kilian Zinnecker via buildroot
  2025-01-11 22:41 ` Mattia Narducci
  0 siblings, 1 reply; 3+ messages in thread
From: Kilian Zinnecker via buildroot @ 2025-01-11 13:32 UTC (permalink / raw)
  To: buildroot

Hello,

I'd like to use an external toolchain, to speedup building my images.
Buildroot supports this and also has a subsection (6.1.2) about this in the
manual [1]. However, I was not able to straight forward set up using an
external bootlin toolchain from the manual. I.e., I wanted to set up the
easiest way, i.e., to use a predefined external toolchain profile. Hence, I
set:

BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y

However, with only these settings, I get errors, e.g., that the headers are
not correct (2.6 in opposite to 5.4). Therefore, step by step, I add more
options:

BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_4=y
BR2_TOOLCHAIN_EXTERNAL_GCC_13=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_OPENMP=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/
toolchains/riscv64-lp64d/tarballs/riscv64-lp64d--glibc--
stable-2024.05-1.tar.xz"

With all these options, I can then use the bootlin toolchain. However, I am
not so sure, whether this is correct this way?  In
toolchain-external-bootlin/Config.in.options there are a lot of options
already set, e.g., BR2_TOOLCHAIN_HAS_OPENMP, so I think that maybe I should
not have to manually set this? So maybe I am doing something wrong here? Any
help appreciated!

I also believe to remember, that in the past I saw some protocol/log from last
year's buildroot developer meeting, and I believe to remember that it
encouraged using external toolchains for board supports - but I can be wrong
about this. I also don't find that protocol anymore, does it still exist
somewhere? And what is the current best practise for external toolchains and
board supports? I.e., when contributing a new board support, may that board
support use an external toolchain?

Thanks and best regards,
Kilian


[1] https://buildroot.org/downloads/manual/
manual.html#_cross_compilation_toolchain


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-11 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11 13:32 [Buildroot] [Help] Using an external toolchain Kilian Zinnecker via buildroot
2025-01-11 22:41 ` Mattia Narducci
2025-01-11 22:49   ` Kilian Zinnecker via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox