Linux kernel versions newer than 5.3 require rsync in order to export
the UAPI headers. Commit f441a6bf ("linux: Add dependency on rsync for
Linux >= 5.3") attempted to address this with a check that runs when
crosstool-ng is built. That had the downside that if crosstool-ng was
built and packaged on a machine that had rsync then run on a machine
that didn't then the build would fail due to the missing rsync.
Conversely if the first machine didn't have rsync installed when
crosstool-ng was built then we would not offer newer kernel versions.
We can address this by checking for rsync when the toolchain
configuration is updated using some functionality in the newer Kconfig
that we've updated to previously.
Fixes#1940
Signed-off-by: Chris Packham <judge.packham@gmail.com>
There are a number of things that don't currently work notably uClibc,
C++ and GDB. Mark this architecture as experimental.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Note: The 64-bit target lacks a glibc port and doesn't build. Also,
there is no uclibc support.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
As of version 13.x GDB uses libtool for linking instead of g++ these
take different arguments for static linking. Commit 6146b5a6 ("use
-all-static when building a static gdb") attempted to deal with this but
had the effect of causing older GDB versions to fail to build
statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to
decide whether to pass `-static` or `-all-static`.
Fixes#2053
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Some m68k variants do have a MMU so the architecture can set
ARCH_USE_MMU. That means we can have a m68k-unknown-linux-gnu
configuration and that m68k-unknown-uclinux-uclibc needs to select
LIBC_UCLIBC_NG since it's no longer the default.
Fixes#2040
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This reverts commit 0841e2f820 from 2011,
which disabled plugin support in binutils for static toolchains, citing
build system problems. This problem seems to be resolved.
This also reverts part of 45512b003d from
2017, which disabled LTO in gcc for static toolchains, citing problems
on Arch Linux with loading the LTO plugin from a static binary.
Signed-off-by: Chris Copeland <chris@chrisnc.net>
As of glibc-2.38 libcrypt is not built by default. Add an option to
allow building libcrypt support into glibc.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Due to the small flash space on AVR devices the library containing the
standard types in C++ (ˋlibstdc++ˋ) does not get built normally when
enabling the C++ language support.
This option is an easy way to go back to the PC-way where ˋlibstdc++ˋ is
built.
Signed-off-by: Quentin Boswank <qubos@outlook.de>
This reverts commit 5427dac45c. The issues
that were causing this have been resolved with some updates so allow the
uclibc+gcc13 combination again.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.
Fixes#1946, #1932, #1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This reverts commit 658f5e574f, which
was made without any justification, and prevents using crosstool-ng
even in decently recent distributions like Ubuntu 20.04 (which has
autoconf 2.69).
We have tested that ./bootstrap && ./configure --enable-local works
fine on Ubuntu 18.04, which uses autoconf 2.69 and automake 1.15, so
the existing requirements were enough.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To build multilib RISC-V toolchain one should use --with-multilib-generator
option instead of --with-multilib-list.
Add corresponding example configuration file.
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
Add the 4.3.0.20230120 and update the required patches. As of this
release the newlib-global-atexit is mandatory so set this to default y.
Included is an upstream patch to support older GCC versions.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
It's necessary for building native GDB 13+. It depends
on MPFR but it hasn't presented in scripts yet for building
for target.
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
GCC13 picks up some new errors on older glibc versions. Disable -Werror
automatically when these combinations are selected.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Currently uclibc configurations fail to build with GCC13
src/gcc/libstdc++-v3/src/c++17/floating_from_chars.cc: In function 'std::from_chars_result std::from_chars(const char*, const char*, _Float128&, chars_format)':
src/gcc/libstdc++-v3/src/c++17/floating_from_chars.cc:1281:10: error: 'from_chars_strtod' was not declared in this scope
1281 | return from_chars_strtod(first, last, value, fmt);
| ^~~~~~~~~~~~~~~~~
make[6]: *** [Makefile:587: floating_from_chars.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
For now require GCC older than 13 when using uclibc.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
These values are used when constructing the default linker scripts
used with picolibc. Setting reasonable defaults allows simple test
applications to be compiled without additional configuration.
Signed-off-by: Keith Packard <keithp@keithp.com>
GCC's libsanitizer module does provide a subset of support for x86
targets (e.g. libasan). GCC's `libsanitizer/configure.tgt` file only
outlines flags for optional sanitizers.
Signed-off-by: James Knight <james.d.knight@live.com>
This adds 3 new options to patch order:
* bundled + bundled_exp
* bundled + bundled_exp + local
* local + bundled + bundled_exp
The path for bundled experimental patches is: ${CT_LIB_DIR}/packages/${pkg_dir}/experimental
and patches that are still being reviewed, but not yet applied upstream
may be toggled with ENABLE_EXPERIMENTAL_BUNDLED_PATCHES.
Also fix modelines for editors on bootstrap and scripts/functions, and
fix mix whitespace in scripts/functions.
Closes: #1916
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This moves the picolibc configuration values under C-library -> picolibc
so that they will be more easily discovered.
Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
Add zstd to the companion libs witch allows to use lto zstd compression
in a canadian or cross-native enviroment
Signed-off-by: QBos07 <62326551+QBos07@users.noreply.github.com>
Signed-off-by: Quentin Boswank <62326551+QBos07@users.noreply.github.com>
libgccjit is still under development and, despite its name, may also be used for
ahead-of-time compilation.
Documentation can be found on the gcc website:
https://gcc.gnu.org/onlinedocs/jit/internals/index.htmlhttps://gcc.gnu.org/wiki/JIT
With this change it's possible to enable the building of the libgccjit. It's
enabled as a language (with --enable-languages=jit) even if not a language
frontend at all.
The main changes are related to the requirement of having everything host side
built as Position Independent Code (PIC) with --enable-host-shared. GCC has the
needed logic for building its dependencies (mpc, gmp, mpfr, ...) correctly when
built "in-tree", which is not the case with crosstool-ng (see
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=05048fc29f0)
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
BPF is a virtual machine and associated ISA that resides in the Linux
kernel. Initially intended for user-level packet capture and filtering,
BPF is nowadays generalized to serve as a general-purpose infrastructure
also for non-networking purposes.
Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com>
PIE is not supported by PRU and AVR backends for GCC.
This fixes LD errors when trying to link user programs with a
crosstool-NG toolchain:
/home/dinux/x-tools/avr/lib/gcc/avr/12.2.0/../../../../avr/bin/ld: -pie not supported
collect2: error: ld returned 1 exit status
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
This commit adds architecture support for LoongArch.
The toolchain currently only supports the 64-bit target
loongarch64-unknown-linux-gnu.
It has been tested to build with GCC 12.1, GDB 12.1, Glibc 2.36, Linux
5.19 and Binutils 2.39 as of Aug 2022.
Signed-off-by: Jiajie Chen <c@jia.je>
https://sourceware.org/pipermail/binutils/2022-August/122246.html
Add binutils 2.39 and regenerate patches.
0008-binutils-2.38-vs.-ppc32-linux-kernel.patch is dropped as it has
been applied upstream. Add a milestone for 2.39 which will be handy for
Loongarch.
Binutils now requires bison >= 3.0.4 to build gprofng for x86/aarch64 so
we build our own bison when the host bison does not meet that
requirement (which appears to be the case on macOS).
Signed-off-by: Chris Packham <judge.packham@gmail.com>
libsanitizer is only supported on selected architectures. Add
ARCH_SUPPORTS_LIBSANITIZER and have architectures select this option
based on the list of supported configurations from GCC's
libsanitizer/configure.tgt. Support for mips64 was added in GCC12 so
this is an additional condition for the mips architecture.
Fixes#1733
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Configuring the newlib with "--enable-newlib-nano-formatted-io" and
"--enable-newlib-io-pos-args" would cause built GCC cannot compile some
IO functions like "std::cout".
And I added additional notes at Nano Formatted I/O config.
Signed-off-by: Chen Tao <t.clydechen@gmail.com>
fix conflict options when compiling multilibs on ARM based architecture.
"--with-arch", "--with-cpu", "--with-fpu", "--with-float", and
"--with-mode" should not be configured with "--with-multilib-list=list"
when configuring multilibs.
Signed-off-by: Chen Tao <t.clydechen@gmail.com>
After building the cross toolchain and compile a simple C program,
objdump reports debug information even though -g modifier was not
used. These debug segments are in glibc library and CRT files. So
a new config entry: CT_GLIBC_ENABLE_DEBUG was added to control when
we want to add debug information to glibc, by default is enabled.
Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
Add TARBALL_RESULT option that will produce a tarball of the final
toolchain to make it easier to deploy the toolchain to other machines.
The implementation uses `find | sort` instead of `tar --sort` because
this was introduced in GNU Tar v1.28, which is not available in some LTS
Linux distributions. This is a variation of the command recommended
here: https://wiki.debian.org/ReproducibleBuilds/FileOrderInTarballsCloses#1262
Signed-off-by: Chris Packham <judge.packham@gmail.com>
We don't currently bundle zstd so when performing a canadian build we
need to tell GCC not to enable zstd support for lto otherwise it might
decide to enable it based on the package being installed on the build
machine.
Fixes#1718
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Use `depends on` conditions to enable/disable building glibc with
-Werror. Using `depends on` instead of `default if` means that when the
GCC/GLIBC selection changes GLIBC_ENABLE_WERROR will automatically
become n.
Fixes#1729, fixes#1712
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Extend the fix from commit 6b465e15 ("Remove m1 from multilibs for GCC11
on SH arch.") to cover GCC 12 and future releases.
Remove the patch that was added to solve the same problem.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Commit 6d5227b6 ("Remove obsolete glibc 2.12.1") removed supports for
the separate glibc-ports but also removed GLIBC_USE_PORTS_ADDON. Glibc
versions up to 2.20 bundled support from some architectures in the ports
directory so GLIBC_USE_PORTS_ADDON is required to support these older
glibc versions.
Fixes#1736
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Add 5.17.5
Bump 5.16.9 -> 5.16.20
Bump 5.15.23 -> 5.15.37
Bump 5.10.100 -> 5.10.113
Bump 4.19.229 -> 4.19.241
Bump 4.14.266 -> 4.14.277
Bump 4.9.301 -> 4.9.312
Linux 5.5 made `make headers_check` a no-op and as of 5.17 it has been
removed so add a milestone and use it as a dependency for
KERNEL_LINUX_INSTALL_CHECK.
Signed-off-by: Chris Packham <judge.packham@gmail.com>