Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kilian Zinnecker via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [Help] Using an external toolchain
Date: Sat, 11 Jan 2025 14:32:05 +0100	[thread overview]
Message-ID: <6118780.lOV4Wx5bFT@kilian-laptop> (raw)

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

             reply	other threads:[~2025-01-11 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11 13:32 Kilian Zinnecker via buildroot [this message]
2025-01-11 22:41 ` [Buildroot] [Help] Using an external toolchain Mattia Narducci
2025-01-11 22:49   ` Kilian Zinnecker via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6118780.lOV4Wx5bFT@kilian-laptop \
    --to=buildroot@buildroot.org \
    --cc=kilian.zinnecker@mail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox