Commit Graph

2780 Commits

Author SHA1 Message Date
Thomas Petazzoni
e02167acf5 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>
(cherry picked from commit edac3dba3b)
[Titouan: Fix merge conflicts for 2025.02.x]
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-09-04 13:57:24 +02:00
Markus Mayer
b1c9922b2e 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>
(cherry picked from commit 5e4cb7607b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-07 11:06:36 +02:00
Peter Korsgaard
f8e603bcec 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>
(cherry picked from commit 00b30f887a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-07 11:06:28 +02:00
Peter Korsgaard
5c6a99f242 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>
(cherry picked from commit 6b8ffbf97b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-07 11:06:26 +02:00
Peter Korsgaard
ad6de69d62 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>
(cherry picked from commit f66e4c2568)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-07-11 14:12:13 +02:00
Yann E. MORIN
7d36300aad 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>
(cherry picked from commit 53e1772682)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-27 18:28:48 +02:00
Gaël PORTAY
c0691e4354 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>
(cherry picked from commit 8fd537ae05)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-05-02 12:11:48 +02: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
Romain Naour
7ffc6ae7d9 toolchain/toolchain-external/toolchain-external-arm-aarch64-be: fix BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard
BR2_ARCH_NEEDS_GCC_AT_LEAST_X guards has been introduced by [1] to
prevent selecting an external toolchain that did not support the GCC
arch tuning the user had selected.

But it was not changed while updating to version 13.2-rel1.

Fixes: 50ae5ea963

[1] eed1670d8a

Cc: Antoine Coutant <antoine.coutant@smile.fr>
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
2999677233 toolchain/toolchain-external/toolchain-external-arm-aarch64: fix BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard
BR2_ARCH_NEEDS_GCC_AT_LEAST_X guards has been introduced by [1] to
prevent selecting an external toolchain that did not support the GCC
arch tuning the user had selected.

But it was not changed while updating to version 13.2-rel1.

Fixes: 7b4b3c2c78

[1] eed1670d8a

Cc: Antoine Coutant <antoine.coutant@smile.fr>
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
203abefcf6 toolchain/toolchain-external/toolchain-external-arm-arm: fix BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard
BR2_ARCH_NEEDS_GCC_AT_LEAST_X guards has been introduced by [1] to
prevent selecting an external toolchain that did not support the GCC
arch tuning the user had selected.

But it was not updated while updating to version 13.2-rel1.

Fixes: 0dd599d171

[1] eed1670d8a

Cc: Antoine Coutant <antoine.coutant@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-14 22:16:48 +01:00
Thomas Petazzoni
11a8cdd2bb toolchain/toolchain-external/toolchain-external-synopsys-arc: mark as broken
The ARC toolchains from Synopsys unfortunately are not "pure"
toolchains: their sysroot no only contains the C library, but also
additional libraries, most notably libncurses and libexpat.

This confuses Buildroot, and causes build issues, and is anyway not a
supported situation. Until the toolchains get fixed, let's mark them
as broken.

Fixes:

  http://autobuild.buildroot.net/results/38766332c391ce97a566c6e2255a947e6074152b/
  (and possibly a number of others)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-13 21:23:53 +01:00
Thomas Petazzoni
e7f14af27d toolchain/toolchain-external/toolchain-external-synopsys-arc: fix condition
The option BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC just depends on
BR2_arc, but the choice of toolchains that appears once
BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC=y only has choices for:

	depends on BR2_arc750d || BR2_arc770d

and

	depends on BR2_archs38_64mpy || BR2_archs38_full || \
		BR2_archs4x_rel31 || BR2_archs4x

which means that if you have a BR2_archs38=y configuration, you end up
with no choice of toolchain, and the build fails with "No C library
selected". Fix this by making sure BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
can only be selected when an actual toolchain is available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-01-13 21:23:50 +01:00
Sergey Matyukevich
8ad137d762 {toolchain, linux-headers}: add support for 6.12 headers
And add (and default to) 6.12 to linux-headers.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-12-11 14:35:13 +01:00
Bernd Kuhls
8142ae5c2a {toolchain, linux-headers}: add support for 6.11 headers
And add (and default to) 6.11 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-22 23:03:26 +02:00
Thomas Petazzoni
a6b364c2e3 support/scripts/gen-bootlin-toolchains: handle BR2_BINFMT_FLAT
With the introduction of ARM FDPIC support, we need to make sure that
the existing ARM FLAT external toolchains are not made
visible/available when ARM FDPIC is selected. This commit updates the
gen-bootlin-toolchains script to take this into account.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-02 22:30:52 +02:00
Peter Korsgaard
ea4179f3ae toolchain/toolchain-wrapper.c: fix 'potentially' typo
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 20:39:13 +02:00
Peter Korsgaard
edd87c7652 toolchain/helpers.mk: fix 'unsupported' typo
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-21 20:39:12 +02:00
Thomas Petazzoni
d3ad58dce9 toolchain/toolchain-external/toolchain-external-bootlin: bump to 2024.05
This commit updates the Bootlin external toolchain package to use the
recently released 2024.05 toolchains.

Notable changes:

- Tarballs are now xz-compressed instead of bz2-compressed

- We have new toolchains: RISC-V 32-bit glibc stable, RISC-V 32-bit
  uClibc, S390 uClibc, and the Sparc V8 is finally updated

All unit tests are passing, except 2 (see below):

  https://gitlab.com/tpetazzoni/buildroot/-/pipelines/1417551794/builds

The two tests that are not passing are the RISC-V 32-bit musl:

  https://gitlab.com/tpetazzoni/buildroot/-/jobs/7607519955
  https://gitlab.com/tpetazzoni/buildroot/-/jobs/7607519954

This is due to a bug in Busybox, and already existed prior to this
toolchain update.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-03 22:40:21 +02:00
Thomas Petazzoni
4baaf07305 toolchain/toolchain-external/toolchain-external-synopsys-arc: bump to 2024.06
Until now only one option was shown, and we were automatically
selecting the ARC700/ARChs and LE/BE toolchains based on the
architecture selection. However now, Synopsys offers glibc/uClibc
toolchains, and we can't decide that automatically, so let's add an
explicit choice for the user to chose between the different variants
of Synopsys toolchains available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: fix glibc toolchain prompt to mention ARC HS]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-03 22:14:02 +02:00
Thomas Petazzoni
e1c316bc40 toolchain/toolchain-external/toolchain-external-arm-aarch64-be: bump to 13.3.rel1
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-03 22:02:00 +02:00
Thomas Petazzoni
6fbb04b366 toolchain/toolchain-external/toolchain-external-arm-aarch64: bump to 13.3.rel1
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-03 22:01:56 +02:00
Thomas Petazzoni
05f39e5afd toolchain/toolchain-external/toolchain-external-arm-arm: bump to 13.3.rel1
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-09-03 22:01:52 +02:00
Bernd Kuhls
92a1e80ba4 {toolchain, linux-headers}: add support for 6.10 headers
And add (and default to) 6.10 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-26 08:37:57 +02:00
Michael Nosthoff
ad71b415c1 package/boost: Boost.Atomic needs atomic intrinsics
similar to previous problems with nios2 and not-available atomic ints
the build for Boost.Atomics also fails for ARC Targets which don't
have the ATOMICS_EXT flag set.

according to [0] "Boost.Atomic has a hard requirement of the native
atomic operations on bytes". The same tests mentioned there fail for
ARC without the atomic extension.

Disable BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS for BR2_arc
without BR2_ARC_ATOMIC_EXT.

Fixes:
  http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493

[0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
[Arnout: add to BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
         instead of updating all packages]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-13 11:33:59 +02:00
Sagi Mor
9954315fc5 toolchain/toolchain-wrapper: make gcc --help -v work correctly
make "gcc --help -v" display all the options, some packages depend on this
https://bugs.busybox.net/show_bug.cgi?id=15231

Signed-off-by: Sagi Mor <sagimor6@gmail.com>
[Arnout: move the handling to the beginning and directly call execv]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-13 11:07:49 +02:00
Bernd Kuhls
125d9f1b4d {toolchain, linux-headers}: add support for 6.9 headers
And add (and default to) 6.9 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-15 18:42:08 +02:00
Edgar Bonet
7fa12e4f9e toolchain/toolchain-external/toolchain-external-custom: add gcc 14 version selection
This patch allows to use an external toolchain based on gcc 14.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Tested-by: Vincent Stehlé <vincent.stehle@arm.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-05-17 22:00:35 +02:00
Fabrice Fontaine
8cb0f6e011 toolchain/Config.in: update BR2_TOOLCHAIN_HAS_LIBATOMIC dependencies
Update BR2_TOOLCHAIN_HAS_LIBATOMIC dependencies to avoid the following
build failure with libopenssl and
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE:

/home/buildroot/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: ./libcrypto.a(libcrypto-lib-threads_pthread.o): in function `CRYPTO_atomic_or':
threads_pthread.c:(.text+0xfa): undefined reference to `__atomic_is_lock_free'

libatomic is available since gcc 4.8, when thread support is enabled.
However, the gcc logic in libatomic/configure.tgt does not recognize
"uclinux" as a valid OS part of the target tuple, and therefore it
does not build libatomic. The "uclinux" part of the tuple is used by
Buildroot when BR2_BINFMT_FLAT=y [1]. This broken logic has only been
fixed for arm since gcc 10.1.0 [2].

Indeed, bootlin armv7m is an uclibc toolchain compiled with atomic
support through libatomic.

[1] https://git.buildroot.net/buildroot/commit/?id=b3d1fb26dcadd8c570e2c415ce05398ecc810b32
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b1e21e5a5d19b436f948710e09157c5b3244f541

Fixes:
 - http://autobuild.buildroot.org/results/d25e898f9715bf6a21284807361a57735a7a2e1d
 - http://autobuild.buildroot.org/results/e37ed5ad6ba41d610bffe9c234f699e203ef5069

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-05-12 12:13:07 +02:00
Thomas Petazzoni
1c7f6a4457 toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_14 blind option
In order to add gcc 14 support in follow-up commits, introduce
BR2_TOOLCHAIN_GCC_AT_LEAST_13 symbol.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-05-11 22:49:58 +02:00
Giulio Benetti
13602787bc toolchain: remove binutils bug 27597
Binutils bug 27597 is not present anymore in Buildroot so let's remove it.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-05-01 21:57:33 +02:00
Giulio Benetti
7fa0159a50 toolchain/toolchain-external: drop external codesourcery niosII toolchain
This toolchain is pretty old and unlikely used. It's also affected by
binutils bug 27597, so let's remove it.

Remove BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII from pixman package.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Romain: remove BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-05-01 21:56:13 +02:00
Yann E. MORIN
df2540adea toolchain/external: remove libcrypt from glibc
Note: this commit only deals with glibc and its internal libcrypt (or
lack thereof); other C libraries, musl and uClibc-NG, are not considered.

libcrypt from glibc has been deprecated for a long time, and it has now
been entirely dropped with glibc 2.39. Now, packages that need crypt(3)
features need to explicitly depend on the libxcrypt pacakge.

However, the set of files installed both by glibc and libxcrypt is not
empty:

    glibc                           libxcrypt
    /usr/include/crypt.h            /usr/include/crypt.h
    /usr/lib/libcrypt.a             /usr/lib/libcrypt.a
    /usr/lib/libcrypt.so            /usr/lib/libcrypt.so
    /lib/libcrypt.so.1
    /lib/libcrypt-2.23.so
                                    /usr/lib/libcrypt.so.2

The two libraries have different SO_NAME, so they do not conflict on the
library filename. However, the .so synlink is present in both, and thus
conflicts. The header and the static library also conflict.

So, the situation is that, with a glibc 2.39 or later, packages have to
use libxcrypt, which is a drop-in replacement. With glibc 2.38 or
earlier, they can use either.

Since we already bumped to glibc 2.39 for the internal toolchain, we
have already converted quite a few packages to use libxcrypt. That works
well with an internl toolchain, because glibc does not install the
conflicting files.

However, for external toolchains, we may very well end up in three
situations:

  - a glibc 2.39 or later, without libcrypt
  - a glibc 2.39 or later, without libcrypt, but with libxcrypt [0]
  - a glibc 2.38 or earlier with libcrypt

In the first case, all is OK and we are in a situation similar to the
internal toolchain, but in the latter two cases, we end up with a
conflict.

We could introduce BR2_TOOLCHAIN_EXTERNAL_HAS_LIBCRYPT os something
along those lines, but this is going to be a bit complex on packages,
which would have to select LIBXCRYPT if GLIBC && !_HAS_LIBCRYPT.

So, to simplify things, we want to get the external toolchains into a
situation similar to the internal one, where libcrypt is not provided by
the toolchain; packages have to select libxcrypt for glibc toolchains,
without having to care whether this is an internal or external toolchain
or some more complex conditions.

So, we remove from staging whatever could be used to compile and link
with libcrypt. We however keep the SO_NAME file, if it exists, and we
also install it in target/, for those pre-built binaries that may be
linked with it [1]. The glibc SO_NAME has always been libcrypt.so.1, so
this is what we copy exactly, to avoid copying the libxcrypt one, which
is libcrypt.so.2.

[0] that could happen if a toolchain provider tried to be helpful and
suplies a toolchain with libxcrypt to be trasnparent to users, in which
case that would conflict with ours...

[1] if such a prebuilt binary (executable or library) is used with a
glibc 2.39 or later toolchain, it will obviously not work at all.
libxcrypt is supposed to be a drop-in replacement for glibc's libcrypt,
so we could look into symlinking libcrypt.so.1 to libcrypt.so.2. In a
later patch, maybe...

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-04-09 23:54:03 +02:00
Petr Vorel
3c9d067590 toolchain/helpers.mk: use int as main() return type in checks
Although -Wmain-return-type is not considered as error (unlike
-Wimplicit-int), but just a warning, let's fix it for the future.

<stdin>:1:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-04-08 22:36:57 +02:00
Thomas Petazzoni
345ccb523e toolchain/toolchain-external/toolchain-external-bootlin: bump to 2024.02
2024.02 Bootlin toolchains have been released, so let's update the
support in Buildroot. Notable changes:

- Bleeding edge toolchains now use binutils 2.42, and stable
  toolchains use binutils 2.41. This fixes binutils bug 27597
  for both.

- glibc has been updated to 2.39

- musl has been updated to 1.2.5, which brings 32-bit RISC-V
  support. Due to this, 2 new toolchain variants are added: 32-bit
  RISC-V stable, 32-bit RISC-V bleeding edge.

- Bleeding edge toolchains now use 5.15 kernel headers, and stable
  toolchains now use 4.19 kernel headers

- Fortran support has been disabled on Microblaze, as the libgfortran
  build at -O2 causes an internal compiler error.

All runtime tests are passing, except the ones for the new RISC-V
32-bit musl toolchain, for which Busybox fails to build due to an
interaction between musl-specific code in Busybox and musl. This issue
has been reported:

  https://www.openwall.com/lists/musl/2024/03/03/2

The runtime tests are nevertheless included, with the hope that this
issue will reasonably quickly be resolved.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-04-07 17:28:56 +02:00
Bernd Kuhls
807a449256 {toolchain, linux-headers}: add support for 6.8 headers
And add (and default to) 6.8 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-03-24 19:18:15 +01:00
Bernd Kuhls
c21a0556db {toolchain, linux-headers}: add support for 6.7 headers
And add (and default to) 6.7 to linux-headers.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-03-24 16:55:40 +01:00
Fabrice Fontaine
33605ea6d9 toolchain: drop codescape mips toolchains
Codescape mips toolchains are old (2018) and use glibc 2.20 which is not
compatible with 64-bit time_t raising the following build failure with
libselinux since commit 1c2dbcdcf0:

In file included from selinux_restorecon.c:17:0:
/home/buildroot/autobuild/instance-1/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
 # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
   ^~~~~

Fixes: 1c2dbcdcf0
 - http://autobuild.buildroot.org/results/a4d38af627a42a2c55d60129787c51353d5883bf

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-03-17 22:32:25 +01:00
Fabrice Fontaine
53a8c5150e toolchain: drop codesourcery arm/aarch64 toolchains
codesourcery arm/aarch64 toolchains are old (2014) and use glibc
2.18/2.20 which are not compatible with 64-bit time_t raising the
following build failure with libcgroup since commit
1c2dbcdcf0:

In file included from ./libcgroup-internal.h:25:0,
                 from parse.y:21:
/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
 # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
   ^

Fixes: 1c2dbcdcf0
 - http://autobuild.buildroot.org/results/e28f955f2b360f6e7bb231a5a3800cfbd17a23d7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Peter: add Config.in.legacy entries]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-03-14 19:47:51 +01:00
Fabrice Fontaine
eaeba56aa2 toolchain/Config.in: update ucontext handling
As suggested by Thomas Petazzoni in [1], add a comment on
BR2_TOOLCHAIN_HAS_UCONTEXT to specify that this boolean will be set to
true only when a toolchain provides a full featured ucontext
implementation with ucontext_t and {get,make,set}context. As a result,
drop its selection from BR2_TOOLCHAIN_USES_MUSL to fix the following
musl build failure on php:

/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/m68k-buildroot-linux-musl/12.3.0/../../../../m68k-buildroot-linux-musl/bin/ld: Zend/zend_fibers.o: in function `zend_fiber_init_context':
zend_fibers.c:(.text+0x946): undefined reference to `getcontext'

[1]: https://patchwork.ozlabs.org/project/buildroot/patch/20230516193307.1543455-1-bernd.kuhls@t-online.de/

Fixes:
 - http://autobuild.buildroot.org/results/271f9fb8bfa5ba2f74feef81e6b375b54e21cece

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-03-03 17:18:21 +01:00