2812 Commits

Author SHA1 Message Date
Bernd Kuhls
9530d74ddb {toolchain, linux-headers}: add support for 7.1 headers
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-06-15 23:17:55 +02:00
Bernd Kuhls
11344cb3fc toolchain/toolchain-external/toolchain-external-custom: add gcc 16 version selection
This patch allows to use an external toolchain based on gcc 16.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-05-30 15:48:42 +02:00
Bernd Kuhls
b3329ed3e0 toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_16 blind option
In order to add gcc 16 support in follow-up commits, introduce
BR2_TOOLCHAIN_GCC_AT_LEAST_16 symbol.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-05-30 15:48:42 +02:00
Bernd Kuhls
9af85c8f01 {toolchain, linux-headers}: add support for 7.0 headers
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-04-13 21:23:31 +02:00
Dowan Gullient
86d453a7dc toolchain/toolchain-external/toolchain-external-arm-arm: bump to 15.2.rel1
Update the ARM external toolchain to the latest 15.2.rel1
release from ARM.

This involves:
- Updating the version, site URL, and source filename in .mk
- Updating the SHA256 hash in .hash
- Updating the display name and GCC version dependency in Config.in

Verified by booting on a default Qemu configuration.

Signed-off-by: Dowan Gullient <dowan.gullient@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-03-15 14:22:08 +01:00
Dowan Gullient
8cb765faa6 toolchain/toolchain-external/toolchain-external-arm-aarch64-be: bump to 15.2.rel1
Update the ARM aarch64-be external toolchains to the latest 15.2.rel1
release from ARM.

This involves:
- Updating the version, site URL, and source filename in .mk
- Updating the SHA256 hash in .hash
- Updating the display name and GCC version dependency in Config.in

Signed-off-by: Dowan Gullient <dowan.gullient@smile.fr>
[Julien: add newline at end of file to fix check-package error]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-03-15 14:21:59 +01:00
Dowan Gullient
8d413d6179 toolchain/toolchain-external/toolchain-external-arm-aarch64: bump to 15.2.rel1
Update the ARM aarch64 external toolchain to the latest 15.2.rel1
release from ARM.

This involves:
- Updating the version, site URL, and source filename in .mk
- Updating the SHA256 hash in .hash
- Updating the display name and GCC version dependency in Config.in

Verified by booting on a default Qemu configuration.

Signed-off-by: Dowan Gullient <dowan.gullient@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-03-15 14:17:00 +01:00
Bernd Kuhls
566150745b {toolchain, linux-headers}: add support for 6.19 headers
And add (and default to) 6.19 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-02-09 23:14:24 +01:00
Thomas Petazzoni
2667cab664 toolchain/Config.in: drop BR2_TOOLCHAIN_HAS_GCC_BUG_121567
GCC bug 121567 is actually a duplicate of GCC bug 81426, which already
existed upstream, and for which we already had
BR2_TOOLCHAIN_HAS_GCC_BUG_81246.

In addition, BR2_TOOLCHAIN_HAS_GCC_BUG_81246 is correctly defined as
affecting SuperH regardless of the optimization level. Indeed, when
BR2_TOOLCHAIN_HAS_GCC_BUG_121567 was introduced, it was thought that
only -O2 and -O3 levels are affected, but -Og, -O1 and -Ofast are also
affected, causing the python3 build to fail.

Fixes:

  https://autobuild.buildroot.net/results/aca1812415ee84eef223b0fdff88f31a39775294/ (-O1 build)

  https://autobuild.buildroot.net/results/3fd91ce3ff8727d2f9c12f6721df922c60282d70/ (-Ofast build)

  https://autobuild.buildroot.net/results/e5536dcf598a51f5006343513a76f4e223e80a55/ (-Og build)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-12-27 16:26:15 +01:00
Thomas Petazzoni
2d570f8369 arch: drop support for ARC big-endian
Alexey Brodkin from Synopsys says in [1]:

  I think indeed, we may remove all the big-endian support for ARC.
  Reasons are since introduction of ARC HS4x processors we no longer
  support big-endian in any new processor IP, and even for older IP
  which used to support big-endian it was rarely used... so basically
  there's no good justification to spend any cycles on big-endian
  support looking forward in this project.  I.e. BE support in uClibc
  could also be removed if it makes any difference.

Therefore, let's removed support for ARC big-endian.

[1] https://lore.kernel.org/buildroot/SJ2PR12MB818487232470DA4456967C73A1A3A@SJ2PR12MB8184.namprd12.prod.outlook.com/

Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: ARC Maintainers <arc-buildroot@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>
[Julien:
 - move legacy option to 2026.02 section
 - add link to mailing list
 - remove BR2_arceb from pkg-meson.mk to fix check-symbols error
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-12-13 17:39:02 +01:00
Bernd Kuhls
6f311de2de {toolchain, linux-headers}: add support for 6.18 headers
And add (and default to) 6.18 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-12-07 12:41:14 +01:00
Yann E. MORIN
28694dcec7 toolchain/external: support merged-bin
When an external toolchain does not have a merged-bin, we can end up
with a situation where the toolchain installs an staging/usr/sbin/
directory, overriding the sbin symlink with an actual directory. When
not using PPD, this does not cause any harm.

However, with PPD, the build fails when preparing the staging (the
host/) for packages when the skeleton is eventually rsynced, e.g.:

    $ cat defconfig
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
    BR2_PER_PACKAGE_DIRECTORIES=y
    BR2_INIT_NONE=y
    BR2_ROOTFS_MERGED_USR=y
    BR2_ROOTFS_MERGED_SBIN=y
    # BR2_PACKAGE_BUSYBOX is not set
    BR2_PACKAGE_ZLIB=y
    # BR2_TARGET_ROOTFS_TAR is not set

    $ make zlib
    [...]
    >>> zlib  Configuring
    mkdir -p [...]/per-package/zlib/host
    rsync -a --hard-links --link-dest=[...]/per-package/host-skeleton/host/ [...]/per-package/host-skeleton/host/ [...]/per-package/zlib/host
    rsync -a --hard-links --link-dest=[...]/per-package/libzlib/host/ [...]/per-package/libzlib/host/ [...]/per-package/zlib/host
    rsync -a --hard-links --link-dest=[...]/per-package/skeleton/host/ [...]/per-package/skeleton/host/ [...]/per-package/zlib/host
    could not make way for new symlink: aarch64-buildroot-linux-gnu/sysroot/usr/sbin
    cannot delete non-empty directory: aarch64-buildroot-linux-gnu/sysroot/usr/sbin
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.3.0]
    make[1]: *** [package/pkg-generic.mk:256: [...]/build/zlib/.stamp_configured] Error 23
    make: *** [Makefile:23: _all] Error 2

The root cause is that, in the skeleton, we end up with
[staging]/usr/sbin as a synlink to bin, but when the external toolchain
gets installed, the symlinbk is replaced by a directory. Later, when we
aggregate the PPD before configuring a package, it often happens that a
dependant package be rsynced before the toolchain and the skeleton, as
seen above, in which case the sbin directory from the toolchain, by way
of the dependency to a package, is already present when rsync wants to
create a symlink as rsynced from the skeleton.

In the example above, this plays in this order:

 1. skeleton gets installed, provides a symlink
 2. toolchain-external-bootlin rsyncs from skeleton, gets a symlink
 3. toolchain-external-bootlin gets installed, replaces symlink with a
    directory
 4. libzlib rsyncs from skeleton, gets a symlink, then rsyncs from
    toolchain-e-b, gets a directory
 5. zlib rsyncs from libzlib first (because alphabetical ordering), gets
    a directory, then rsyncs from skeleton, which rsyncs from a symlink,
    but the destination is a non-empty directory, so rsync fails.

It is perfectly legit that an external toolchain does not use a
merged-bin setup, so we must accept that as input. We do so by treating
the /usr/sbin entry specially, like we already do for a few others, of
which /sbin itself for example.

Note that the merged-usr setup has no issue, because we already handle
the lib*/ directories specially too.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-11-05 23:10:29 +01:00
Bernd Kuhls
76d25d365b {toolchain, linux-headers}: add support for 6.17 headers
And add (and default to) 6.17 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-10-01 18:43:07 +02:00
Neal Frager
f2c9457819 toolchain/toolchain-bare-metal-buildroot: add multilib option
Sometimes the default GCC and newlib libraries built for a given
architecture tuple are not based on the desired ABI. Since ABI definitions are
different between architectures, the simplest solution is to allow users to
build bare-metal toolchains with --enable-multilib. This way, the libraries
for every available ABI will be built and users will be able to select the
desired library for their user applications.

This patch adds the option BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_MULTILIB to give
users the choice to enable multilib, if desired.

Please note that when using a string of architecture tuples, this option will
apply to all architectures in the string, so it can significantly increase
build time.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Jesse Taube <Mr.Bossman075@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-09-24 21:45:03 +02:00
Titouan Christophe
03a10e4a39 toolchain/external: remove Linaro armeb toolchain
This toolchain is more than 7 years old now, and not maintained anymore.
Let's therefore remove it from Buildroot. There are still some
alternatives in-tree, such as Bootlin toolchains

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-09-10 23:27:28 +02:00
Titouan Christophe
6b20ffb4cb toolchain/external: remove Linaro arm toolchain
This toolchain is more than 7 years old now, and not maintained anymore.
Let's therefore remove it from Buildroot. There are still some
alternatives in-tree, such as ARM and Bootlin toolchains

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
[Romain:
  - rename TestExternalToolchainLinaroArm to TestExternalToolchainArmGnu
  - update toolchain prefix arm-linux-gnueabihf to arm-none-linux-gnueabihf
  - replace BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM by BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE
    since the ARM toolchain can't be enabled due to missing NEON support
]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-09-10 23:25:08 +02:00
Titouan Christophe
27ea54c976 toolchain/external: remove Linaro aarch64 BE toolchain
This toolchain is more than 7 years old now, and not maintained anymore.
Let's therefore remove it from Buildroot. There are still some
alternatives in-tree, such as ARM and Bootlin toolchains

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-09-10 23:02:32 +02:00
Titouan Christophe
8cc71fafc3 toolchain/external: remove Linaro aarch64 toolchain
This toolchain is more than 7 years old now, and not maintained anymore.
Let's therefore remove it from Buildroot. There are still some
alternatives in-tree, such as ARM and Bootlin toolchains

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-09-10 23:02:31 +02:00
Titouan Christophe
4daac8b973 toolchain/external: remove Sourcery Codebench MIPS toolchain
This toollchain is almost 10 years old now, and not maintained anymore.
Let's therefore remove it from Buildroot. Newer maintained external
toolchains for MIPS are still available from Bootlin

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
[Romain: remove leftover link to binutils 2.27 bug 19908]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-09-10 23:02:29 +02:00
Thomas Petazzoni
edac3dba3b support/scripts/gen-bootin-toolchains: arcle-750d toolchain has no gdbserver
Since the build of gdbserver for ARC 750D is broken, Bootlin
toolchains since 2024.05 no longer provide gdbserver for ARC, causing
build failures when the autobuilders try to use it. Let's fix this by
telling gen-bootlin-toolchains that the arcle-750d toolchains don't
have gdbserver.

Fixes:

  https://autobuild.buildroot.net/results/77c865f941612e99d8b6a7f66b5bc06f90d6b7db/

Cc: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
2025-08-28 22:40:29 +02:00
Thomas Petazzoni
1838d8e5ea toolchain/Config.in: add BR2_TOOLCHAIN_HAS_GCC_BUG_121567
This will be needed to work around a GCC bug affecting python3. The
bug is reported at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121567.

This bug affects GCC at least since 6.x, but we couldn't test earlier
versions, so we simply assume all GCC versions are affected. Even GCC
15.x is still affected, as reported to upstream GCC.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-08-24 12:29:27 +02:00
Thomas Petazzoni
947dbc92a2 toolchain/toolchain-external/toolchain-external-bootlin: update to Bootlin toolchains 2025.08-1
The toolchains have been rebuilt with a recent Buildroot, and are
based on:

- Stable toolchains:
  GCC 14.3
  Binutils 2.43.1
  GDB 15.2
  Linux headers 5.4
  glibc 2.41
  musl 1.2.5
  uclibc-ng 1.0.45

- Bleeding edge toolchains
  GCC 15.1
  Binutils 2.44
  GDB 16.3
  Linux headers 5.15
  glibc 2.41
  musl 1.2.5
  uclibc-ng 1.0.45

The microblaze bleeding-edge toolchains are back, since we integrated
the "atomic issue" fix.

All tests are successful:

  https://gitlab.com/tpetazzoni/buildroot/-/pipelines/1976388296

(note: the test branch had one more commit doing tweaks on the wget
option and re-enabling the backup site for unit tests, which are
needed to avoid intermittent failures of Gitlab CI jobs)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-08-10 21:58:33 +02:00
Bernd Kuhls
d9a1352e7d {toolchain, linux-headers}: add support for 6.16 headers
And add (and default to) 6.16 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-29 01:20:38 +02:00
Markus Mayer
5e4cb7607b toolchain/toolchain-wrapper.c: fix indentation
A recent commit introduced a few lines that were indented with spaces
rather than a tab. Rectify this.

Fixes: 00b30f887a ("toolchain-wrapper.c: get rid of EXCLUSIVE_ARGS")
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-22 19:09:18 +02:00
Peter Korsgaard
00b30f887a toolchain/toolchain-wrapper.c: get rid of EXCLUSIVE_ARGS
Rather than having a hard coded amount of exclusive args (with the risk of
overflow when new logic is added), simplify the argument buffer allocation
logic to always allocate room for DEFAULT_MAX_ARGS (1024) arguments and just
realloc to grow for the rare situation where that is not enough.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-20 18:32:25 +02:00
Peter Korsgaard
6b8ffbf97b toolchain/toolchain-wrapper.c: slightly simplify cmdline copying
C99 section 5.1.2.2.1p2 mandates that:

- argv[argc] shall be a null pointer.

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

So we might as well copy the null pointer along in the memcpy() rather than
copy everything up to the null pointer and then add one afterwards for
simplicity.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-20 18:32:21 +02:00
Peter Korsgaard
f66e4c2568 toolchain/toolchain-wrapper.c: correct CCACHE_BASEDIR comment
Commit 1e97b27873 ("ccache: support changing the output directory") added
the CCACHE_BASEDIR logic, but added a comment (presumably from cut'n'paste)
about compilercheck instead, fix that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-07 22:31:42 +02:00
Jiaxun Yang
5495bdd430 package/glibc: Enable LoongArch64 support
Glibc introduced LoongArch64 support in 2.36, it requires kernel
5.19 to build.

Unselect BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT to reflect we can
build the toolchain.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-05 19:45:38 +02:00
Jiaxun Yang
286f5bacd7 package/gcc: Introduce BR2_GCC_TARGET_SIMD option
Introduce BR2_GCC_TARGET_SIMD for gcc to handle --with-simd/-msimd
present at loongarch's gcc options.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-07-05 19:45:38 +02:00
Julien Olivain
8e48dd8f21 toolchain/toolchain-external/toolchain-external-custom: hide gcc versions for unsupported CPUs
The BR2_ARCH_NEEDS_GCC_AT_LEAST_X guards were added in commit [1]
for toolchain-external-custom gcc versions from 4.8 to 12. No guard
was added for gcc 13 because is was the latest version at that time
(and the symbol BR2_ARCH_NEEDS_GCC_AT_LEAST_14 was not available
at that time).

Then, commit [2] and [3] added gcc 14 and 15 without adding
guards.

In order to prevent a Buildroot user selecting an external custom
toolchain that does not support a selected CPU, this commit adds all
the missing guards.

[1] eed1670d8a
[2] 7fa12e4f9e
[3] 5f1a38a41f

Reported-by: Arnout Vandecappelle <arnout@rnout.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2025-07-02 15:14:49 +02:00
Edgar Bonet
5f1a38a41f toolchain/toolchain-external/toolchain-external-custom: add gcc 15 version selection
This patch allows to use an external toolchain based on gcc 15.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
[Julien: change spaces to tabs to fix check-package errors]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-06-25 20:55:21 +02:00
Bernd Kuhls
a4450546dd {toolchain, linux-headers}: add support for 6.15 headers
And add (and default to) 6.15 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-06-12 22:54:12 +02:00
Neal Frager
147ec434eb toolchain/toolchain-bare-metal-buildroot: rename example vendor to buildroot
Now that xilinx-embeddedsw is compatible with the toolchain vendor buildroot,
this patch modifies the toolchain-bare-metal-buildroot help example to use
the microblazeel-buildroot-elf tuple.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-06-09 19:23:57 +02:00
El Mehdi YOUNES
e29dae109a package/llvm-project: bump to version 20.1.5
Release:
https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.5

Major Changes and Fixes:

-- CMake 3.20 minimum required

-- Issue encountered during standalone LLVM build:
    CMake Error at CMakeLists.txt:8 (include):
      include could not find requested file:

  This error is due to the line:
    include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake)

  Upstream commit [1] harmonized policy handling by introducing this shared include
  for all LLVM sub-projects. However, in the LLVM CMakeLists, LLVM_COMMON_CMAKE_UTILS
  is set unconditionally, preventing external override — which is required in
  Buildroot when building from separated archives.

  To solve this:
    We apply a patch to wrap the assignment of LLVM_COMMON_CMAKE_UTILS in an
    `if(NOT DEFINED ...)` block, allowing Buildroot to set the path externally.
    In the `llvm-cmake` package, we also **adjust the installation path** of the
    CMake modules: instead of installing directly into `lib/cmake/llvm`, we now
    install them under `lib/cmake/llvm/Modules` to match the expected layout.

  This ensures that:
    LLVM can include `${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake`
    without errors.

-- Also the Clang build system has removed support for
   the GCC_INSTALL_PREFIX option, raising a fatal error when attempting to use it:

   CMake Error at CMakeLists.txt:211 (message):
      GCC_INSTALL_PREFIX is deprecated and will be removed.
      Use configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)
      to specify the default --gcc-install-dir= or --gcc-triple=.
      --gcc-toolchain= is discouraged.
      See https://github.com/llvm/llvm-project/pull/77537
      for details.

   Remove the use of GCC_INSTALL_PREFIX and replace it with a
   Clang configuration file as recommended by upstream.

   A configuration file is now automatically generated at:
   $(HOST_DIR)/lib/clang/$(CLANG_VERSION_MAJOR)/$(GNU_TARGET_NAME).cfg

   It contains:
   --gcc-install-dir=<path to external toolchain's lib/gcc/...>
   --target=<GNU target triplet>

   We dynamically detect the GCC install path by scanning
   $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/lib/gcc/<target>/<version>/

   The Clang toolchain wrapper was also updated to add --config=<file> when
   BR_CLANG_CONFIG_FILE is defined.

-- Fix LLVM_MAIN_SRC_DIR path:
   set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH ...)
   This path isn't correct when using standalone archive builds. We explicitly pass
   LLVM_MAIN_SRC_DIR=$(BUILD_DIR)/llvm-$(LLVM_PROJECT_VERSION) to fix the path. [2]

-- Add LLVM_ENABLE_RUNTIMES:
   Upstream added LLVM_ENABLE_RUNTIMES for runtimes [3]

-- Removed LLVM_INCLUDE_GO_TESTS:
   Upstream dropped this option; we remove it too [4]

-- Disable TensorFlow Lite integration:
   LLVM_HAVE_TFLITE is added to the CMakelist
   We now explicitly disable it to avoid unexpected
   TensorFlow Lite dependency.

-- Clang introduced CLANG_ENABLE_LIBXML2 [5]
   We now explicitly disable it by setting CLANG_ENABLE_LIBXLM2=OFF
   since we set LLVM_ENABLE_LIBXML2 to OFF in LLVM

-- Host-python3, which is now always needed by Clang’s resource bundling
   script. [6]

-- Clang explicitly request to disable llvm tests when llvm_gtest is missing.[7]
   CMake Error at CMakeLists.txt:126 (message):
    llvm-gtest not found. Please install llvm-gtest or disable tests with
    -DLLVM_INCLUDE_TESTS=OFF

-- Also update the installation path in COMPILER_RT_SETUP_RUNTIME_LIBS
   to use CLANG_VERSION_MAJOR instead of HOST_CLANG_VERSION,
   ensuring that the runtime files are placed correctly
   in the /lib/clang/<major>/ folder. [8]

-- Add llvm-runtimes dependency
   libunwind needs runtimes [9]

-- Fix for libclc out of tree patch
   Due to upstream changes in libclc, the old patch no longer
   applies. Only the fix related to invoking './prepare_builtins'
   directly is still relevant and preserved, as it is required to avoid
   a build failure when the binary is not in PATH.

-- Upstream commit [10] removed the use of llvm-config in libclc and
   replaced it with proper use of LLVM_CMAKE_DIR. We now pass
   -DLLVM_CMAKE_DIR instead of DLLVM_CONFIG

-- Libclc expects to invoke some LLVM tools. We explicitly set
   LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR to ensure it finds these tools. [11]

-- Remove LLAsm_COMPILER and CLC_COMPILER [12]

-- LIBUNWIND_INSTALL_HEADERS is On by default [13]

-- Update spirv-llvm-translator to align with LLVM 20.1.5
   Release:
   https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/tag/v20.1.2

[1]  9dd01a5241
[2]  d2b158e29e
[3]  176db3b3ab
[4]  6ce8727248
[5]  df239a6c17
[6]  96962d5512
[7]  8216910395
[8]  e1b88c8a09
[9]  0af67d167d
[10] b264787453
[11] 0aeeff3059
[12] 72f9881c3f
[13] f8409af354

Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Bernd: rebased, removed gcc-15 patches for llvm 15, bumped to 20.1.5]
        used 'git describe' to set the version number for spirv-llvm-translator]
[Mehdi: changed llvm-runtimes version to $(LLVM_PROJECT_VERSION)]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-05-25 16:15:41 +02:00
Thomas Petazzoni
ccf1714502 toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_15 blind option
In order to add gcc 15 support in follow-up commits, introduce
BR2_TOOLCHAIN_GCC_AT_LEAST_15 symbol.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-05-19 18:46:13 +02:00
Yann E. MORIN
53e1772682 toolchain/wrapper: check unsafe paths earlier
We currently check for unsafe paths right between adding our arguments,
and adding the one passed from the command line. This not very
consistent.

Unsafe paths can only come from the command line, as we are not adding
any of our own (hopefully, we know better!), so we can run the check as
early as possible.

Move the check very early, but not before we handle --help.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-05-18 14:51:58 +02:00
Bernd Kuhls
9aec878a0d {toolchain, linux-headers}: add support for 6.14 headers
And add (and default to) 6.14 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-05-10 21:56:26 +02:00
Gaël PORTAY
8fd537ae05 support/scripts/gen-bootlin-toolchains: allows armv8-a CPU to use armv7-a toolchains
The ARMV7-A toolchains are capable to compile binaries for ARMv8-A CPU
in AArch32 execution state.

This adds the BR2_ARM_CPU_ARMV8A option in the 'conditions' to allow
ARMV8-A CPU such as Cortex-A53 or Cortex-A72 to use ARMV7-A toolchains.

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-19 16:01:53 +02:00
Bernd Kuhls
66adee919d {toolchain, linux-headers}: add support for 6.13 headers
And add (and default to) 6.13 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-03-06 22:01:04 +01:00
Neal Frager
02b9d987c4 toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Now that binutils-bare-metal, gcc-bare-metal and newlib-bare-metal packages
have been upgraded to support a list of architecture tuples, this patch
updates the toolchain-bare-metal-buildroot help text to describe the new
capability.

BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH is still backwards compatible with
its prior definition as defining a single tuple with this new definition
works exactly the same as before.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-17 23:22:19 +01:00
Thomas Petazzoni
edb4d9724b toolchain/toolchain-external/toolchain-external-bootlin: drop Microblaze/bleeding-edge
GCC 14.x has a significant bug where libatomic lacks some important
functions, causing the toolchain to be pretty much
unusable. Therefore, let's drop this toolchain entirely from our
listing for now.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118280 for more
details.

Fixes:

  http://autobuild.buildroot.net/results/dd081ca3c5746b980b0bcdf1f12b1a26c6b7ef86/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-08 21:38:47 +01:00
Gabriele Besta
917495a2ac toolchain/toolchain-external/toolchain-external-arm-aarch64: add toolchain for AArch64 host architecture
Enabling AArch64 as a host architecture for AArch64 build.

Signed-off-by: Gabriele Besta <buildroot@bgdev.it>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-04 16:45:54 +01:00
Peter Korsgaard
ab0aac8179 toolchain/toolchain-wrapper.c: do not pass linker flags if not linking
Fixes: https://gitlab.com/buildroot.org/buildroot/-/issues/55

When gcc sees a linker option (-Wl,..) it executes the linker, leading to
confusing error messages if no source files are provided, E.G.:

% gcc
gcc: fatal error: no input files
compilation terminated.

% gcc -Wl,-z,now
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status

It is not really trivial to detect in the wrapper if linking will be done,
but we can at least check if any non-option arguments (E.G.  source/object
files) are passed and skip the -Wl,.. options if not.

% ./host/bin/aarch64-linux-gcc
aarch64-linux-gcc.br_real: fatal error: no input files
compilation terminated.

With this fixed we no longer need the special case for --help -v from commit
9954315fc5 ("toolchain/toolchain-wrapper: make gcc --help -v work
correctly"), so drop that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-03 12:42:10 +01:00
Romain Naour
a24bb5f703 toolchain: remove remaining BR2_nios2 from toolchain bugs
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-15 21:30:49 +01:00
Romain Naour
237bd32f0b toolchain: remove BR2_TOOLCHAIN_HAS_GCC_BUG_99410 (nios2 only)
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-15 21:30:46 +01:00
Romain Naour
febe8a888c toolchain: remove BR2_TOOLCHAIN_HAS_GCC_BUG_93847 (nios2 only)
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-15 21:30:43 +01:00
Romain Naour
49cc81057b toolchain/toolchain-external: remove Bootlin nios2 external toolchain
We are going to remove nios2 support, so remove the Bootlin nios2
external toolchain.

Remove this toolchain from the Buildroot testsuite.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-15 21:30:18 +01:00
Romain Naour
012f03bd27 toolchain/toolchain-external/toolchain-external-arm-aarch64-be: bump to 14.2.rel1
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-14 22:16:56 +01:00
Romain Naour
e5a965a648 toolchain/toolchain-external/toolchain-external-arm-aarch64: bump to 14.2.rel1
Tested with qemu_aarch64_virt_defconfig.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-14 22:16:56 +01:00
Romain Naour
cfe69076bb toolchain/toolchain-external/toolchain-external-arm-arm: bump to 14.2.rel1
Tested with qemu_arm_vexpress_defconfig.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-14 22:16:56 +01:00