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>
Drop gdb 7.11.1, 7.12.1, 8.0.1, 8.1.1 and 8.2.1. Cleanup milestones
related to these older versions.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
glibc 2.12.1 was marked as obsolete. Now that the 1.25.0 release is out
this version can be removed completely. As glibc 2.12.1 was the last
remaining version supported by glibc-ports support for glibc-ports is
also removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
The bionic libc support was out of date and relied on downloading
binaries from the internet. It was already marked as obsolete. Now that
the 1.25.0 release is out it can be completely removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Newer GCC versions trigger warnings on older GLIBC versions. GLIBC 2.29
is warning free with GCC9. GLIBC 2.31 is warning free with GCC10. GLIBC
2.34 is warning free with GCC11.
Add milestones for 2.31 and 2.34 and use those to set the default value
for GLIBC_ENABLE_WERROR based on the GCC version.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Rather important option for arm cortex toolchains supporting c++,
avoids pulling in all printf/iostream code by default.
Signed-off-by: Norbert Lange <nolange79@gmail.com>
Support for bionic was dropped by GCC some time ago. There are patches
for older GCC versions but those are difficult to maintain and the
version of the android-ndk they support is of little use. Mark all of
the existing bionic support as obsolete so it can be removed after the
next release.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Support for the SPE ABI was removed in GCC 9. Update the select to
GCC_REQUIRE_older_than_9 so that GCC 8.5 can be selected.
Fixes#1349, fixes#1666
Signed-off-by: Chris Packham <judge.packham@gmail.com>
With libc_headers step before pass-1, there is no need to distinguish
pass-1 and pass-2; they are configured identically (note that with the
current configuration, core pass-2 is only used for win32 - hence, uses
build_libgcc=yes and mode=static).
Signed-off-by: Alexey Neyman <stilor@att.net>
Starting with GDB9, the release number is only two numbers (with the
last being patchlevel). Therefore, keep two numbers for releases 8 and
below, but just a single number for 9 and up.
Signed-off-by: Alexey Neyman <stilor@att.net>
Starting with GDB10, it requires support for std::future<> in the
compiler. Such support has not been available on some architectures
until GCC9 (see PR 64735). I haven't determined the exact list of
affected architectures, so decided to make it a broad dependency: for
GDB10+, you need GCC9+.
Signed-off-by: Alexey Neyman <stilor@att.net>
Restrict kernel to 5.11 and below (support for this arch has been
dropped in 5.12); rename the sample to match its name as printed by
`ct-ng show-tuple` (otherwise, `make saveconfig` does not update the
sample's configuration).
Signed-off-by: Alexey Neyman <stilor@att.net>
... and the code dependent on them, after the latest wave of obsolete
package removals. This concludes the glorious history of the original
uClibc (non-NG) with lots of kludges removed.
There was a choice here, whether to call the resulting libc "uClibc" or
"uClibc-ng". I opted in favor of giving uClibc-ng the recognition it
deserves, although it had some ripple effect in the ct-ng code.
Signed-off-by: Alexey Neyman <stilor@att.net>
Versions before 2.26 got removed in fa992b41, together with
CT_BINUTILS_2_23_or_later.
Remove reference to this variable
Signed-off-by: Norbert Lange <nolange79@gmail.com>
Now that we have a 2-pass build it is no longer necessary to disable
-Werror in glibc.
This partially reverts commits 6ca5f91f ("Disable -Werror for GLIBC for
all ARCH for GCC11."), 215432d3 ("config/libc: Extend glibc 2.32
workaround to include sparc") and 645ee124 ("glibc: Don't build with
-Werror for powerpc64+glibc-2.32").
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Per https://github.com/crosstool-ng/crosstool-ng/issues/808 build static
libgcc in the first pass which lets us skip the second one. Building
mingw-w64 requires header files in order to build C++ support so mingw
builds core pass 2. This could probably be cleaned up by splitting
libc_start_files into a separate libc_header step. But for now having
core 2 for mingw-w64 and core 1 for the other libcs will have to do.
Anything that previously selected CC_CORE_PASSES_NEEDED now selects
CC_CORE_PASS_1_NEEDED. The same goes for CC_CORE_PASS_2_NEEDED with the
exception of mingw-w64.
Fixes#808Fixes#217
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Add a comment that is visible when the python3.4 prerequisite is not met
so that users can tell why they can't select a newer glibc version.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
As of Linux v5.3 rsync is used as part of the build process. Add Linux
5.3 as a milestone, configure detection of rsync and a dependency on
rsync for Linux 5.3 and newer. Add a comment in so that users can tell
why they can't select a newer version.
Fixes#1628
Signed-off-by: Chris Packham <judge.packham@gmail.com>
These days old v5 ABI is not that relevant as it used to be back in
2015 when ncurses 6.x was added to CT-NG.
And now we see say target "gdb" relying on "libncurses.so.5",
while up-to-date Buildroot provides "libncurses.so" & "libncurses.so.6":
--------------------------->8-------------------------
$ ldd /bin/gdb
libncurses.so.5 => not found
libstdc++.so.6 => /lib/libstdc++.so.6 (0x20022000)
libm.so.6 => /lib/libm.so.6 (0x2017c000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x201ba000)
libc.so.6 => /lib/libc.so.6 (0x201c8000)
/lib/ld-linux-arc.so.2 (0x20000000)
--------------------------->8-------------------------
Switching to a default (v6 ABI) by default. And...
--------------------------->8-------------------------
$ ldd /bin/gdb
libncurses.so.6 => /usr/lib/libncurses.so.6 (0x20022000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0x20054000)
libm.so.6 => /lib/libm.so.6 (0x201ae000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x201ec000)
libc.so.6 => /lib/libc.so.6 (0x201fa000)
/lib/ld-linux-arc.so.2 (0x20000000)
--------------------------->8-------------------------
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
The following versions were marked obsolete in crosstool-ng-1.24.0,
remove them.
- binutils-linaro-2.23.2-2013.10-4
- binutils-linaro-2.24.0-2014.11-2
- binutils-linaro-2.25.0-2015.01-2
- binutils-2.23.2
- binutils-2.24
- binutils-2.25.1
Adjust the milestones now that the old versions have been removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Now that the oldest supported version of gdb is 7.11.1 we can make some
parts of the build unconditional and remove the associated config vars.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Drop the uclibc-no-gettimeofday-clobber patch as it no longer applies.
The arc patches are all upstream.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
GCC can support using zstd compression for LTO object files. By default
GCC's configure will enable this if libzstd is installed on the machine
building the toolchain. This may be undesirable if the toolchain is to
be used on a different machine. Add an option to control zstd usage and
set the default to the same as the current behaviour (i.e. auto).
Fixes#1579
Signed-off-by: Chris Packham <judge.packham@gmail.com>
In GDB 10.x gdbserver was promoted to the top-level folder,
see https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=919adfe8409211c726c1d05b47ca59890ee648f1
Which means it is no longer a subfolder in "gdb" and so we have to
build gdbserver now exactly in the same way as normal native GDB.
One interesting detail is gdbserver doesn't need to deal with target
description in .xml so it doesn't depend on libexpat on target,
thus we need to move libexpat explicit selection from do_gdb_backend()
to its callers when building native [full] gdb as well as cross-gdb
for the host.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
[cp: support old/new layout, regenerate patches]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Issue #1535
GCC 10 changed the default to -fno-common, which leads to a linking error in GLibc older than 2.30.
This change adds -fcommon cflag for the target GLibc versions <=2.29 and GCC >=10.
This change also adds additional cflags for the target GLibc to disable
new GCC11 checks that lead to compilation errors.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
Explicitly passing --disable-tm-clone-registry causes gcc to create a
crtbegin.o with a zero-sized .init_array/.fini_array. This in turn
causes ld to complain.
Make CC_GCC_TM_CLONE_REGISTRY a tristate so if it's not explicitly
enabled we can let ./configure decide.
Fixes#1531
Fixes: 1e21a302 ("gcc: Add CT_CC_GCC_TM_CLONE_REGISTRY config")
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit adds a new gcc config `CT_CC_GCC_TM_CLONE_REGISTRY` that
enables the GCC transactional memory clone registry feature for libgcc.
Note that the gcc option to control this feature is only available in
gcc 10 and above.
(see gcc commit 5a4602805eb3ebddbc935b102481e63bffc7c5e6)
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a new config that can be used to specify the target
CXXFLAGS specific to the libstdc++ newlib-nano variant.
By default, this config is set to specify the `-fno-exceptions` option,
which disables C++ exception handling support and greatly reduces the
compiled binary size.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Make --enable-obsolete-rpc conditional on !GLIBC_2_32_or_later as
it's been removed from that version on.
Fixes: #1505
Fixes: commit 1ee44ab5 ("glibc: --enable-obsolete-rpc has been removed as of 2.32")
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Alpha is a 64-bit only arch. The menu options only allowed 32 bitness to
be selected. This was harmless but confusing, update the config to
specify 64-bit only.
Fixes: #1506
Signed-off-by: Chris Packham <judge.packham@gmail.com>
GCC11 somehow has different set of multilibs on SH arch than what GCC10 had.
In particular:
$ gcc10 -print-multi-lib | sed -r -e 's/@/ -/g;'
.;
mb; -mb
m2; -m2
m2e; -m2e
m4; -m4
m4-single; -m4-single
m4-single-only; -m4-single-only
mb/m2; -mb -m2
mb/m2e; -mb -m2e
mb/m4; -mb -m4
mb/m4-single; -mb -m4-single
mb/m4-single-only; -mb -m4-single-only
mb/m2a; -mb -m2a
mb/m2a-single; -mb -m2a-single
$ gcc11 -print-multi-lib | sed -r -e 's/@/ -/g;'
.;
mb; -mb
m2; -m2
m2e; -m2e
m4; -m4
m4-single; -m4-single
m4-single-only; -m4-single-only
mb/m1; -mb -m1
mb/m2; -mb -m2
mb/m2e; -mb -m2e
mb/m4; -mb -m4
mb/m4-single; -mb -m4-single
mb/m4-single-only; -mb -m4-single-only
mb/m2a; -mb -m2a
mb/m2a-single; -mb -m2a-single
mb/m1 fails to build libgcc as libgcc uses opcodes that were not
available in SH-1: libgcc/config/sh/lib1funcs.S uses 'bt/s' and 'dt'
instructions that, according to https://antime.kapsi.fi/sega/files/h12p0.pdf become available in the SH-2 only.
So I removed mb/m1 from the multilibs fog GCC11 and SH arch.
Another option would be to try not to build libgcc for this combination
of the gcc version and archichecture, but I thought this fix would be
more robust.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
This change replicates what GLIBC 2.23 has in the string/rawmemchr.c:
// #if __GNUC_PREREQ (11, 0)
// /* Likewise GCC 11, with a different warning option. */
// DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
// #endif
With -Werror multiple platforms failing on the string/rawmemchr.c:40 line.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
Add an option that will install a copy of newlib-nano lib*.a file in
the target dir but renamed with a nano.a suffix (eg: libc_nano.a) as
some default nano.spec files from newlib expect this setup.
Additionally the newlib-nano version of newlib.h will get copied to
include/newlib-nano/newlib.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Upstream changes in the way kconfig handles environment variables means
we need to update our usage of them.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This has gone unnoticed for a while, it looks like all configurations
have probably been using the default floats behaviour. Newer kconfig
tells us the default value is not in the choice so lets fix this in
preparation.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Include the gnuprumcu package in PRU cross toolchain.
Toolchain is somewhat useless without device specs and
linker scripts for the various SoCs.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
Add sample configuration for building cross toolchain for the TI PRU.
PRU cores are present in many of the BeagleBone single board computers.
More information about the PRU can be found in https://bbb.io/pru
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
This allows building newlib-nano in addition to newlib and picolibc,
allowing users to select between C libraries within the same toolchain.
Signed-off-by: Keith Packard <keithp@keithp.com>
This adds another mode to do_gcc_core_backend that builds libstdc++
against an alternate libc implementation.
Signed-off-by: Keith Packard <keithp@keithp.com>
Use LIBC_PICOLIBC_CXA_ATEXIT to keep this name in the same 'namespace'
as the other picolibc config names.
Enable retargetable locking by default. This allows the few locks in
picolibc to be implemented by the execution environment, rather than
disabling the locking code.
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit adds support for the following Oracle products, in order
to target Oracle Linux 7.9:
Binutils 2.27-44.base.0.400
GCC 4.8.5-44.0.5
glibc 2.17-317.0.3
UEK5/u4 4.14.35-2025.400.8
Sample configuration files are provides for the following triplets:
arm-ol7u9-linux-gnueabi
arm-ol7u9-linux-gnueabihf
Signed-off-by: Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Currently the help for LOCAL_PATCH_DIR did not specify the tree layout
of custom patches directory. This commit adds such explanation.
For example, the bundled patches for GCC are placed under
packages/gcc/<gcc-version>, thus custom (local) GCC patches should be
placed under $LOCAL_PATCH_DIR/gcc/<gcc-version>.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Make --enable-obsolete-rpc conditional on !CT_GLIBC_2_32_or_later as
it's been removed from that version on.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
When building powerpc64+glibc-2.32 we see the following error:
[ALL ] In file included from ../sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c:26,
[ALL ] from ../sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c:18:
[ALL ] ../string/wordcopy.c: In function '_wordcopy_fwd_aligned':
[ERROR] ../string/wordcopy.c:98:26: error: 'a1' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ALL ] 98 | ((op_t *) dstp)[0] = a1;
[ALL ] | ~~~~~~~~~~~~~~~~~~~^~~~
[ALL ] In file included from ../sysdeps/powerpc/powerpc64/power4/../../powerpc32/power4/memcopy.h:38,
[ALL ] from ../sysdeps/powerpc/powerpc64/power4/memcopy.h:1,
[ALL ] from ../string/wordcopy.c:23,
[ALL ] from ../sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c:26,
[ALL ] from ../sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c:18:
[ALL ] ../string/wordcopy.c: In function '_wordcopy_fwd_dest_aligned':
[ERROR] ../sysdeps/generic/memcopy.h:72:61: error: 'a3' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ALL ] 72 | #define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2)))
[ALL ] | ^~
This seems to only trigger for powerpc64. Other architectures build
cleanly. For now avoid specifying -Werror for powerpc64+glibc-2.32.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This adds support for using picolibc instead of newlib on embedded
systems.
Signed-off-by: Keith Packard <keithp@keithp.com>
v2:
Add check for meson and ninja
Sync option default values with current picolibc defaults
Remove xtensa sys header file install as those aren't in picolibc
-- c6x: Add support for c6x product families to pass on to uClibC-ng
-- c6x: Fix multilib support
-- c6x: Add patch fix internal instruction error (GCC 57295)
Signed-off-by: Dan Tejada <dan.tejada@cantada.com>
GLIBC 2.31 needs --with-cpu=ultrasparc for both 32/64-bits now, and
--with-cpu only sets the CPU model for the "primary" bitness.
Signed-off-by: Alexey Neyman <stilor@att.net>
This commit adds support for the newlib configuration option
'--enable-newlib-retargetable-locking'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Fixes: #1210
Per the release notes for the GNU C library 2.28[1] make 4.0 or newer is
required. Previously the logic was applied to glibc 2.29 or newer.
[1] - https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
Signed-off-by: Chris Packham <judge.packham@gmail.com>
While we may use build machine's library when building a simple cross,
we won't have it for the host machine in a canadian build. Until there
are separate selectables for the build/host components, just build our
own local zlib.
Signed-off-by: Alexey Neyman <stilor@att.net>
... unless one retrofits it with a decent compiler instead of stock
GCC 4.4.
While here, sync up the ax_*.m4 with autoconf-archive.
Signed-off-by: Alexey Neyman <stilor@att.net>
- Force building make as a companion tool if host make is older than
4.0 (CentOS 7 currently has 3.82)
- Disable 2.29 as a choice if host python is older than 3.4
(CentOS 7 has 2.6 unless python from EPEL is installed)
- Python2 emits its version information to STDERR. Ugh.
While there, also use the detected host Python for GDB configuration.
Signed-off-by: Alexey Neyman <stilor@att.net>