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>
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>