Commit Graph

1542 Commits

Author SHA1 Message Date
Chris Packham
3ac6f1791a gdb: drop obsolete versions
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>
2022-05-10 19:46:53 +12:00
Chris Packham
6d5227b63b Remove obsolete glibc 2.12.1
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>
2022-05-10 19:46:53 +12:00
Chris Packham
53bbdc7425 Remove obsolete bionic/android support
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>
2022-05-10 19:46:53 +12:00
Chris Packham
7e21141973 glibc: Enable -Werror for more combinations of GCC/GLIBC
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>
2022-05-01 12:02:54 +12:00
Anton Maklakov
06120b97ff xtensa: Remove obsoleted CT_ARCH_XTENSA_CUSTOM_NAME 2022-04-02 13:31:07 +13:00
Norbert Lange
ad3996a483 gcc: add gcc libstdcxx-verbose option
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>
2022-02-23 20:21:16 +13:00
Chris Packham
20044c0bf7 bionic: mark bionic/android-ndk as obsolete
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>
2022-02-23 20:19:46 +13:00
Alexey Neyman
681aaef1f1
Merge pull request #1674 from stilor/master
Updates to make `ct-ng build-all` pass
2022-02-14 00:11:42 -08:00
Chris Packham
c5565f175a powerpc: Allow GCC 8.5 for SPE ABI
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>
2022-02-13 20:46:27 +13:00
Alexey Neyman
5a0be8b4ec Unify core passes
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>
2022-02-11 00:47:51 -08:00
Alexey Neyman
7b97bdd825 Convert tabs to spaces
Recent changes introduced a mixture of tabs/spaces that result in broken
indentation in multiple places.

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:51 -08:00
Alexey Neyman
c6ff1eca5b Restrict *-uclibc,* canadians to gettext 0.20
Newer gettext is incompatible with uClibc-NG in cross-compilation, see
the comment in the code.

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:51 -08:00
Alexey Neyman
58da27c965 Restrict bionic's GCC/GDB selections
Refer to the comments in the code for the reason.

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:51 -08:00
Alexey Neyman
4c0d78bb64 gdb: use single-number versions/milestones for 9+
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>
2022-02-11 00:47:51 -08:00
Alexey Neyman
586c2d0156 sparc-leon: restrict to GDB9
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>
2022-02-11 00:47:51 -08:00
Alexey Neyman
b4191b23a8 Update tic6x sample
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>
2022-02-11 00:47:51 -08:00
Alexey Neyman
cc6b7fad46 Retire obsoleted milestones
... 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>
2022-02-11 00:47:50 -08:00
Norbert Lange
392955a293 Fix deterministic binutils option
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>
2022-01-30 21:08:25 +13:00
Chris Packham
f58583039f glibc: Re-enable Werror
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>
2022-01-12 21:02:38 +13:00
Chris Packham
557b9d4f8d gcc: Build static libgcc in core_pass1
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 #808
Fixes #217

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-01-12 21:02:38 +13:00
Chris Packham
5075e1f98e glibc: Add comment about python 3.4 dependency
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>
2021-11-30 19:56:44 +13:00
Chris Packham
f441a6bf0d linux: Add dependency on rsync for Linux >= 5.3
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>
2021-11-30 19:56:44 +13:00
Alexey Brodkin
c46a6e809e ncurses: Use new v6 ABI by default
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>
2021-10-10 04:54:36 -07:00
Chris Packham
fa992b4191 binutils: Remove obsolete versions
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>
2021-09-21 21:24:31 +12:00
Chris Packham
9703e669d0 gdb: Remove old milestones
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>
2021-09-21 21:12:19 +12:00
Chris Packham
68088f65c6 gdb: Add gdb-11.1
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>
2021-09-19 19:50:29 +12:00
Chris Packham
4b2b610b9a gmp: Support building for target
Allow GMP to be build for the target. This will be needed by the up
coming gdb-11.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-19 19:50:29 +12:00
Chris Packham
b346fa58b1 cc/gcc: Add options for zstd usage
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>
2021-08-29 21:27:29 +12:00
Alexey Brodkin
5463ab4bf6 gdb: Add gdb-10.2
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>
2021-08-25 10:12:56 +12:00
Raphael Catolino
c3b13ffdda Add EXTRA_CXXFLAGS_FOR_BUILD option
Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
2021-07-06 16:19:17 +01:00
Nik Konyuchenko
aa98a2e2f3 Add fcommon flag help and remove extra empty lines
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
2021-06-24 01:49:22 -07:00
Nik Konyuchenko
05c6758985 Fix build of older Glibc using GCC >=10
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>
2021-06-24 00:58:32 -07:00
Chris Packham
96d8a0588f gcc: Make CC_GCC_TM_CLONE_REGISTRY tristate
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>
2021-06-20 11:37:00 +12:00
Chris Packham
594b9286f4
Merge pull request #1524 from stephanosio/gcc_custom_libstdcpp_cxx_flags_upstream
Fix libstdc++ build options
2021-06-09 20:11:48 +12:00
Stephanos Ioannidis
1e21a30287 gcc: Add CT_CC_GCC_TM_CLONE_REGISTRY config
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>
2021-06-08 02:13:45 +09:00
Stephanos Ioannidis
7144b5f275 newlib: Add libstdc++ nano-specific CXXFLAGS
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>
2021-06-07 19:53:28 +09:00
Chris Packham
cc8c64a8dc glibc: --enable-obsolete-rpc has been removed as of 2.32
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>
2021-05-11 21:02:29 +12:00
Chris Packham
10c21dfc17 alpha: Support 64-bit only
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>
2021-05-11 21:02:22 +12:00
spaun2002
6b465e150d Remove m1 from multilibs for GCC11 on SH arch.
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>
2021-05-05 01:27:57 -07:00
spaun2002
6ca5f91fb5 Disable -Werror for GLIBC for all ARCH for GCC11.
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>
2021-05-05 01:26:34 -07:00
Kumar Gala
8e99639419 newlib-nano: Add option to copy libs into target
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>
2021-04-15 14:29:04 -05:00
Ivan Kukhta
8b4373d4ee Extend CC_GCC_LIBSSP with manual state
Signed-off-by: Ivan Kukhta <Ivan.Kukhta@acronis.com>
2021-03-17 13:50:45 +03:00
Chris Packham
8fbf528681 config: Update environment variable usage
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>
2021-02-02 20:06:32 +13:00
Chris Packham
51cb8939f8 config/cc/gcc.in: Fix typo CC_GCC_DEC_FLOAT -> CC_GCC_DEC_FLOATS
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>
2021-02-02 20:06:32 +13:00
Chris Packham
30316cd27a
Merge pull request #1448 from dinuxbg/master
Add PRU target configuration
2021-01-25 12:40:31 +13:00
Dimitar Dimitrov
e7d0485ca2 Add package with PRU linker scripts and headers
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>
2021-01-19 21:18:55 +02:00
Dimitar Dimitrov
c800bc8c82 Add PRU cross tool target
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>
2021-01-19 21:18:55 +02:00
Keith Packard
beb587a271 newlib-nano: Build libstdc++ against newlib-nano if requested
This uses the gcc support for building libstdc++ using alternate lib
header files.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-14 15:05:10 -08:00
Keith Packard
945b4c6436 Add newlib-nano as companion lib
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>
2021-01-14 15:05:10 -08:00
Keith Packard
27b18d2fc7 picolibc: Build libstdc++ against picolibc if requested
This uses the gcc support for building libstdc++ using alternate lib
header files.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-11 23:29:01 -08:00