Commit Graph

5564 Commits

Author SHA1 Message Date
Chris Packham
0c467f165d Merge branch 'foss-for-synopsys-dwc-arc-processors-gdb10-disable-gdb-with-gdbserver'
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-19 19:47:15 +12:00
Alexey Brodkin
58c347c781 gdb: Realy decouple building of native/target GDB & gdbserver
Back in the day gdbserver was treated as a subproject of GDB and
even was located in "gdb/gdbserver" and so to build gdbserver we had
to go into "gdb/gdbserver" and there run configure. That way full GDB
was out of the picture.

Now starting from GDB 10.1 where gdbserver was promoted to the top-level
we're supposed to run top-level's configure script for all the tools
provided by the unified binutils-gdb tree.

That said if we only want to build gdbserver (and that's what we
want since we build one tool at a build step) we have to be explicit:
----------------->8----------------
--enable-gdbserver --disable--gdb
----------------->8----------------

Ah, and so far we used to build full native GDB when only wanted gdbserver
if it was GDB v10.x ;)

Ironically full native/target GDB also enabled gdbserver by default so
we need to also disable it explicitly with "--disable-gdbserver".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-19 19:46:49 +12:00
Alexey Brodkin
4a8f7ff12b gdb: Enable TUI for full target/native GDB
Since we have curses built for target anyway now, why don't allow
users to use very convenient pseudo-GUI operating mode?

And while at it, there's no use of TUI in naturally headless gdbserver.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-16 12:50:12 -07:00
Chris Packham
7daa182506 Merge branch 'gcc11-cross-canadian' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-16 21:42:44 +12:00
Alexey Brodkin
9ddd4b7883 gcc: Fix cross-canadian builds wih GCC11
With this we may finally build Windows and "native" toolchains
if host tools are also GCC11 based. For example:

1. You build cross toolchain with all the recent components by CT-NG
2. You build cross-canadian toolchain for Windows or ARC, ARMm whatever board

See upstream bug report [1] for more details.

Basically when we do cross-canadian build with
use of the same GCC11 as a "host" compiler we're seeing
an error like that:
------------------->8-------------------
mingw-w64-cross/gcc/x86_64-w64-mingw32/libstdc++-v3/include/fenv.h:58:11: error: 'fenv_t' has not been declared in '::'
   58 |   using ::fenv_t;
------------------->8-------------------

This is a solution proposed by Yujie Yang in [2]
Note, though it's not the final fix merged upstream, that's just
an attempt to fix this by casual GCC users. There's a hope it
will be fixed anyways a bit later, maybe by the time of GCC 11.3...

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017#c20

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-15 02:02:16 -07:00
Chris Packham
f49ae4054d Merge branch 'binutils-2-37-mingw-fix' of https://github.com/temap/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-15 20:21:17 +12:00
Chris Packham
f7e3d75627 Merge branch 'gdb10-arc-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-15 20:20:57 +12:00
Alexey Brodkin
24a1f120d7 gcc: Refresh patches of GCC 11.2.0
As simple as: ./maintainer/manage-packages.sh --update-patches --select gcc-11.2.0

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-15 01:18:45 -07:00
Alexey Brodkin
8099a74750 gdb10: Fixes for ARC
Here we add a couple of fixes and improvements for ARC processors.
All except 1 patch are already in the upstream "master" branch
and will be an essential part of GCC 11.x whenever it gets released.

The most important are first 4 patches (0005-0008) which introduce
support of full native GDB support in Linux on ARC.

And the rests are tiny, yet useful improvements.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-14 04:30:17 -07:00
Alexey Brodkin
d6eeff01a6 gdb10: Update existing patches
As easy as: ./maintainer/manage-packages.sh --update-patches --select gdb-10.2

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-14 04:29:36 -07:00
Artem Panfilov
3e4421d420 binutils: Add MinGW build fix from 2.37 branch
This fixes a defect introduced in 25162c7. The "uint" type has not
been explicitly defined here on mingw, causing compilation to fail.

Signed-off-by: Artem Panfilov <artemp@synopsys.com>
2021-09-14 12:28:59 +03:00
Chris Packham
e5aaa1ca7a Merge branch 'binutils-arc-32-hosts' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-14 20:35:52 +12:00
Alexey Brodkin
2160d68291 binutils 2.37: arc: Fix for 32-bit hosts
While building statically-linked executables for ARC on 32-bit platform
LD segfaulted like that:
--------------------------->8-------------------------
$ gcc test.c -static

potentially unexpected fatal signal 11.
Path: /arc_gnu_2021.03_prebuilt_glibc_le_archs_native_install/arc-snps-linux-gnu/bin/ld
CPU: 0 PID: 79 Comm: ld Not tainted 5.10.43 #8
Invalid Read @ 0x00000020 by insn @ 0x40bbe
  @off 0x40bbe in [/arc_gnu_2021.03_prebuilt_glibc_le_archs_native_install/arc-snps-linux-gnu/bin/ld]  VMA: 0x00010000 to 0x0010e000
ECR: 0x00050100 EFA: 0x00000020 ERET: 0x00040bbe
STAT: 0x80080082 [IE U     ]   BTA: 0x0003fc24
 SP: 0x5fdb8dec  FP: 0x00129598 BLK: 0x40b66
LPS: 0x2008c602 LPE: 0x2008c63e LPC: 0x00000001
r00: 0x008392f2 r01: 0x00000001 r02: 0x00000000
r03: 0x008392f2 r04: 0x00000058 r05: 0x00e37e88
r06: 0x00eb8ea8 r07: 0x00a837e8 r08: 0x0000003f
r09: 0x736e7520 r10: 0x2011aa74 r11: 0x001147f4
r12: 0x00a83834 r13: 0x00a837e8 r14: 0x00ce92b8
r15: 0x00112130 r16: 0x00eb8ea8 r17: 0x00000058
r18: 0x001273b8 r19: 0x00e37e88 r20: 0x00129598
r21: 0x5fdb8e74 r22: 0x00112130 r23: 0x00179bb0
r24: 0x00170684 r25: 0x20122490
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
--------------------------->8-------------------------

Originally found during native building on ARC board, but later
re-produced on other 32-bit systems like i386/i586.

For all the gory details please refer to [1].
Original fix could be found here [2].

[1] https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/402
[2] 29d31b4ed9

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-13 01:57:39 -07:00
Chris Packham
3b97480638 Merge branch 'linux-bump' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-08 20:27:34 +12:00
Chris Packham
15635997a1 Merge branch 'canadian-cross-build' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-08 20:26:30 +12:00
Chris Packham
bc4b8c790b Merge branch 'with-host-libstdcxx' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-08 20:25:16 +12:00
Alexey Brodkin
e075bdfc94 gcc: Don't mess with --with-host-libstdcxx if recent GCC (6+) is used
"--with-host-libstdcxx" option was removed in GCC 6.x, see [1] because of [2].
So it makes no sense to use it with later GCC versions.

Frankly I don't like that implementation with yet another set of "if XXX",
but since we still support GCC down to 4.8.5 what else we may do?

Well, technically we may keep using things as they are now,
because surprisingly GCC's configure script doesn't mind accepting
meaningless options, but as a person who's looking at differences between
various builds and drill-down to peculiarities of various config
options, I'd prefer to not pollute configure with garbage.

But for all the rest... well, it works now and maybe nodody else cares.

[1] https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=5dc85f7ec719a79ecfbcdd8563b07e5f0f365e65
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67092

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-07 00:43:36 -07:00
Alexey Brodkin
5c5b4df6d3 gcc: Fix canadian cross building on older hosts
GCC 11+ requires compiler being used to support C++11 standard [1].
And while GCC starting from 6.x has C++11 support enabled by default [2],
older versions need to be forced to implement it with "-std=gnu++11" and luckily
GCC's build-system takes care of that:

 1. For ${host} compiler - [1]
 2. For ${build} compiler - [3, 4]

In a nutshell the configure script tries a couple of options and the one which
helps to build a test source gets appended to CXX (not CXXFLAGS!),
so on say CentOS 7.x with GCC 4.8.5 during cross-compilation of GCC
CXX="x86_64-build_pc-linux-gnu-g++ -std=gnu++11". And all is good.

But in case of canadian cross due to [5] we for some reason* force set
CXX_FOR_BUILD with just a compiler name, effectively overriding all the
magic done by GCC's internals described above.

This leads to a compilation failures like that:
------------------------------------->8----------------------------------
[ALL  ]    In file included from /usr/include/c++/4.8.2/type_traits:35:0,
[ALL  ]                     from .../HOST-x86_64-apple-darwin14/arc-gcc11-elf/src/gcc/gcc/system.h:244,
[ALL  ]                     from .../HOST-x86_64-apple-darwin14/arc-gcc11-elf/src/gcc/gcc/gengtype.c:26:
[ERROR]    /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
[ALL  ]     #error This file requires compiler and library support for the   ^
------------------------------------->8----------------------------------

* my guess that [5] was done because back in the day indeed we used to have
"--build=${CT_BUILD} --host=${CT_HOST}" in do_cc_core(). But now after [6]
this is no longer necessary as we use "--build=${CT_BUILD} --host=${CT_BUILD}"
and all is safe and clean. So yet another old quirk goes away - hooray!

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed
[2] https://gcc.gnu.org/gcc-6/changes.html
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96612
[4] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7ffcf5d61174dda1f39a623e15f7e5d6b98bbafc
[5] 9c6c090d7b
[6] 08161250ed

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-06 23:21:21 -07:00
Chris Packham
b1cda4a08a linux: Add new version and bump LTS
Add 5.14.1
Bump 4.4.275 -> 4.4.283
Bump 4.9.275 -> 4.9.282
Bump 4.14.239 -> 4.14.246
Bump 4.19.197 -> 4.19.206
Bump 5.4.131 -> 5.4.144
Bump 5.10.49 -> 5.10.62
Bump 5.13.1 -> 5.13.14

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-05 21:00:59 +12:00
Chris Packham
4de586cd2e
Merge pull request #1589 from cpackham/zstd
cc/gcc: Add options for zstd usage
2021-08-30 19:21:50 +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
Chris Packham
f64bd272d8
Merge pull request #1570 from cpackham/glibc-2.34
packages/glibc: Add 2.34
2021-08-29 20:00:57 +12:00
Chris Packham
5faf255006 packages/glibc: Add 2.34
Add glibc 2.34. Bring through patches for canadian build and ARC700.

https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:32:27 +12:00
Chris Packham
672c13eb00 Merge branch 'uclibc-atomics' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:30:29 +12:00
Chris Packham
86e7788dd0 Merge branch 'gdb-10' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:29:49 +12:00
Chris Packham
d45664d144 Merge branch 'no-mmu-microblaze' of https://github.com/msteveb/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:28:13 +12:00
Steve Bennett
065dabd767 Add support for no-mmu microblaze
no-mmu architectures need to be explicitly listed
in CT_DoKernelTupleValues

Signed-off-by: Steve Bennett <steveb@workware.net.au>
2021-08-25 17:36:47 +10: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
Alexey Brodkin
028c372ba6 ARC: No more fiddling with uClibc's CONFIG_ARC_HAS_ATOMICS
Older ARC700 processors had atomic instructions (AKA llock/scond)
as an option and so quite some "atomic" operations were not possible
w/o OS support, which we implemented - see arc_usr_cmpxchg() in the
Linux kernel.

And in uClibc, which was the only Linux libc back in the day of ARC700
era, it is well supported. Well, uClibc could be configured to support it.
Which is done with CONFIG_ARC_HAS_ATOMICS Kconfig option.

But the problem is there's no check for ARC ISA version in uClibc when
this option gets enabled. That leads to a funny situation when even for
ARCv2 processors (ARC HS3x & HS4x) uClibc tries to utilize
arc_usr_cmpxchg() syscall which is not supported for this newer ISA since
ARCv2 processors have atomic instructions built-in all the time.

So what was happening here we didn't specify additional "-matomic"
CFLAG unless we were targeting exactly those ancient ARC770 processors
(ARC700 + MMUv3 + atomics) and so even for ARCv2 we forced uClibc
to not use built-in atomics.

And even though there're ways to add a smarter solution here to handle
that pretty rare by now case of ARC750 (ARC700 + MMUv2 - atomics),
I suggest we just remove this part completely, leaving a possibility
to add needed option in uClibc-ng's configuration
(I mean "packages/uClibc-ng/config").

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-08-24 09:48:56 -07:00
Chris Packham
cf53d3736f Merge branch 'comp-tools' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-24 20:16:30 +12:00
Chris Packham
cc7a2eef91 Merge branch 'mips-unknown-linux-gnu' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-24 20:15:53 +12:00
Chris Packham
da65c829f3 Merge branch 'gnuprumcu-v0.6.0' of git://github.com/dinuxbg/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-24 20:15:03 +12:00
Chris Packham
6fae696131 Add mips-unknown-linux-gnu sample
We have unkown-elf and linux-uclibc already. Complete the set with a
linux-gnu configuration.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-24 08:46:35 +12:00
Chris Packham
578871ddfc CI: Download bison, m4 and make
Various configurations end up using these companion tools (particularly
those with GNU libc). Ensure we download these tools at the start of the
build.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-23 19:09:44 +12:00
Dimitar Dimitrov
6424fb73f0 pru: Default to pru-, not pru-elf- prefix
The gcc-pru package in BeagleBoard Debian image has been using the
"pru-" prefix for a few years now. Let's not add unnecessary confusion
for users, and stick to "pru-" cross toolchain prefix.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2021-08-22 18:11:42 +03:00
Dimitar Dimitrov
94df240f08 gnuprumcu: Bump to v0.6.0
Changes since v0.5.0:
  * Add spec files for am64x SoCs.
  * Require Binutils at least version 2.37.
  * Require pru-gcc to be installed.
  * Remove linker scripts. Instead set memory sizes from specs.
  * Activate --gc-sections linker option by default.
  * The "--host=pru" configure option must be used instead of "--target=pru.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2021-08-22 18:08:13 +03:00
Chris Packham
358945ff22
Merge pull request #1578 from foss-for-synopsys-dwc-arc-processors/abrodkin-binutils-2.37
binutils: add version 2.37
2021-08-18 21:08:33 +12:00
Alexey Brodkin
77525a81d3 binutils: add version 2.37
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-08-16 10:22:50 -07:00
Chris Packham
f322679392
Merge pull request #1571 from cpackham/avr-ci
CI: Add avr target
2021-08-06 08:42:01 +12:00
Chris Packham
4a6408cc24 CI: Add avr target
Add avr to list of samples to build.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-03 21:37:28 +12:00
Chris Packham
d47b234152
Merge pull request #1568 from galak/fix-nano-spec
newlib-nano: Fix nano.spec based on CT_NEWLIB_NANO_INSTALL_IN_TARGET
2021-08-01 19:55:15 +12:00
Kumar Gala
9179450082 newlib-nano: Fix nano.spec based on CT_NEWLIB_NANO_INSTALL_IN_TARGET
The spec file was missing replacing various libs like libc, libm, etc
with their nano equiv when CT_NEWLIB_NANO_INSTALL_IN_TARGET=y.  Update
the nano.spec file that is generated to rename libc, libm, etc if
CT_NEWLIB_NANO_INSTALL_IN_TARGET=y

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-07-30 00:02:42 -05:00
Chris Packham
cd275bc38c
Merge pull request #1567 from graysky2/11.2
gcc: bump to 11.2
2021-07-29 20:07:58 +12:00
graysky
329c45eb58 gcc: bump to 11.2
Signed-off-by: John Audia <graysky@archlinux.us>
2021-07-28 14:53:00 -04:00
Chris Packham
283142c032 Merge pull request #1563 from cpackham/kernel-bump
linux: Add new version and bump LTS
2021-07-18 19:41:52 +12:00
Chris Packham
9f0c0193e9 Merge pull request #1561 from keith-packard/picolibc-1.7.1
Picolibc 1.7.1
2021-07-18 19:39:24 +12:00
Chris Packham
26ce3b335e Merge pull request #1560 from stephanosio/upstream_local_common_patch_dir
Support common local patch directory
2021-07-18 19:37:16 +12:00
Chris Packham
e33843744f Merge pull request #1559 from QBos07/patch-2
Disable source-highlighting for static build
2021-07-18 19:34:07 +12:00
QBos07
62b5971abe Disable source-highlighting for static build
Fixes #1487
2021-07-18 19:33:48 +12:00
Chris Packham
9e1a187d70 linux: Add new version and bump LTS
Add 5.13.1
Bump 4.14.225 -> 4.14.239
Bump 4.19.190 -> 4.19.197
Bump 4.4.268 -> 4.4.275
Bump 4.9.268 -> 4.9.275
Bump 5.4.127 -> 5.4.131
Bump 5.10.44 -> 5.10.49
Bump 5.12.12 -> 5.12.16

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-07-14 21:46:54 +12:00