Commit Graph

1379 Commits

Author SHA1 Message Date
Felix Fietkau db34b93331 toolchain: add a version that can be bumped to force toolchain/target rebuild
This can be used to ensure that the compiled code is up to date, when
something important changes in the toolchain.
A recent example of this is the gcc 11 fix for a code miscompilation issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-16 22:02:45 +01:00
Felix Fietkau 0c249ab076 toolchain/gcc: revert a faulty upstream commit that caused miscompiled code
This broke at least the OKLI loader, but possibly other things as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-16 10:48:45 +01:00
Felix Fietkau 9f90a89655 build: add support for using prebuilt LLVM toolchain
When the prebuilt llvm toolchain is unpacked into the source dir,
it is automatically picked up and used by the build system, and eBPF
based packages can be selected

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-04 20:06:14 +01:00
Felix Fietkau 2a832b3df5 llvm-bpf: support creating a tarball in bin
This can be used for adding the toolchain to an existing tree without having
to build it from scratch.
Enable building the toolchain + tarball by default on buildbot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-04 16:59:22 +01:00
Hauke Mehrtens 2fea0e5cb0 toolchain: gdb: Update to version 11.1
The removed patch was already applied upstream.

gdb now mandatory depends on gmp, tell configure where to find it
explicitly. We already build gmp in the tools directory for gcc. Also
make it use mpfr and mpc as we also build both of them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-03 23:52:08 +01:00
Felix Fietkau 6738820bf6 build: fix bpf toolchain dependency for qosify
Add hidden symbols to fix defaults with CONFIG_DEVEL unset

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 18:41:20 +01:00
Felix Fietkau 5ad663b765 config: add choice for selecting the LLVM toolchain type
This is global for all BPF based packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-01 16:38:40 +01:00
Felix Fietkau faa6a9a04b tools/llvm-bpf: add llvm+clang build suitable for compiling code to eBPF
Preparation for building packages that ship eBPF code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-20 11:35:34 +02:00
Paul Spooren f48ced582d toolchain/binutils: switch to version 2.37 by default
Compile tests:
* all

Runtime tests:
* ipq806x/generic
* lantiq/mt7621
* lantiq/xrx200
* x86/64

Signed-off-by: Paul Spooren <mail@aparcar.org>
Tested-by: Paul Spooren <mail@aparcar.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-22 19:37:24 -10:00
Hauke Mehrtens 71e96532df toolchain/musl: Remove extra format attribute patch
This patch never went upstream so remove it. GCC should already add such
a check to the common functions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-22 19:04:02 +02:00
Rosen Penev b519be1c52 toolchain/musl: remove several GNU headers
Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools has been
fixed separately.

Remove woresize.h file. It seems to be for an old version of GCC.

Remove features.h and glibc-types files. Same as above.

Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
that use it have already been patched.

Tested with all packages in the base tree. They all compile.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-22 19:04:02 +02:00
Rosen Penev aaec2ad13b toolchain/musl: update to 1.2.2
This release introduces 64-bit time_t, which is needed to avoid the
year 2038 problem.

Remove upstream patches. Refreshed others.

Rebased features.h file based on latest musl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-22 19:04:02 +02:00
Paul Spooren da5bb885e1 toolchain/gcc: switch to version 11 by default
gcc10 seem to increase build size and gcc11 seem to fix that.

Compile tests:
* all

Runtime tests:
* ath79
* mpx85xx/p2020
* mvebu
* x86/64

Special thanks to Rosen for fixing layerscape & bcm63xx

Signed-off-by: Paul Spooren <mail@aparcar.org>
Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-09-21 22:07:36 -10:00
Paul Spooren 753f2f1eaa toolchain/gcc: cleanup gcc9 config option
This line should have been removed in 244847da "build: remove GCC9
support" but stayed in tree after an incomplete rebase. Fix it.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-21 15:10:25 -10:00
Paul Spooren 62ed1af15d build: remove GCC7 support
The development branch is now on version 10, we shouldn't drag to many
old versions and therefore drop at least 7.x.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-09-19 11:26:00 -10:00
Paul Spooren 244847dae9 build: remove GCC9 support
gcc9 was never used within a release and the development branch is
already on version 10, no need to keep this in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-09-19 11:21:02 -10:00
Hans Dedecker c6a2ffd505 glibc: update to latest 2.33 HEAD (bug 28213)
9b01145592 MIPS: Setup errno for {f,l,}xstat
9c676ef514 RISC-V: Update rv64 ULPs
c6cadbf83a linux: Remove shmmax check from tst-sysvshm-linux
22d37364ae librt: add test (bug 28213)
27a78fd712 librt: fix NULL pointer dereference (bug 28213)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-09-12 16:03:19 +02:00
Stijn Tintel 6d0cefcf42 toolchain/gcc: switch to version 10 by default
Runtime-tested on:
* ath79
* bcm27xx/bcm2708
* bcm27xx/bcm2709
* bcm27xx/bcm2711
* mvebu/cortexa53
* octeon
* realtek
* x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-18 20:48:53 +03:00
Stijn Tintel 3f41153b1c toolchain/binutils: switch to version 2.36.1 by default
Runtime-tested on:
* ath79
* bcm27xx/bcm2708
* bcm27xx/bcm2709
* bcm27xx/bcm2711
* mvebu/cortexa53
* octeon
* realtek
* x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-18 20:48:47 +03:00
Rui Salvaterra 0af0ec1b7d toolchain/gcc: bump gcc 11 to 11.2
Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 19:50:46 +02:00
Rui Salvaterra d63fbfce70 toolchain/binutils: add binutils 2.37
Tested on ath79/generic, without issues.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-07-25 13:52:38 +02:00
Ansuel Smith 0f499372c0 toolchain: add gcc 11 version
Add gcc 11 version. Same patches of gcc 10.

Build tested on: ipq806x ipq807x
Run tested on: ipq806x ipq807x

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[refresh patches]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-07-17 19:12:11 +02:00
Hans Dedecker 9d2dcc8312 glibc: update to latest 2.33 HEAD (bug 28011)
b5711025bc x86_64: Remove unneeded static PIE check for undefined weak diagnostic
edfd11197e wordexp: handle overflow in positional parameter number (bug 28011)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-07-13 21:28:19 +02:00
Hans Dedecker f033d5ad1c glibc: update to latest 2.33 HEAD (BZ #27646, bug 27896, BZ #15271)
58b90461ae elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]
8c06748c51 Fix use of __pthread_attr_copy in mq_notify (bug 27896)
4b6be914bd Use __pthread_attr_copy in mq_notify (bug 27896)
f4cba6ca1e dlfcn: Failures after dlmopen should not terminate process [BZ #15271]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-06-27 15:34:11 +02:00
Felix Fietkau 7f946a880a toolchain/gdb: fix broken non-python build
Append configure args instead of overwriting them

Fixes: 74417f8b3a ("toolchain: gdb: Add optional python support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-09 13:16:45 +02:00
Hauke Mehrtens 74417f8b3a toolchain: gdb: Add optional python support
Compile gdb with python support optionally.

To use the Python support in gdb some extra python files are needed,
install them too. While at it also install other shared files which we
did not install before.

If gdb is built without Python support the python folder does not
exists.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2021-06-06 00:26:13 +02:00
Hans Dedecker 507257778c glibc: update to latest 2.33 HEAD (BZ #27892)
0ef0e6de7f powerpc: Fix handling of scv return error codes [BZ #27892]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-05-30 19:42:12 +02:00
Felix Fietkau 3f4b382c3c toolchain/gdb: fix broken configure test for ELF support
A missing #include was causing gdb on macOS to be compiled without ELF support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-18 12:52:52 +02:00
Hans Dedecker 2fc20886ec glibc: update to latest 2.33 HEAD (bug 27744)
3f5080aedd nptl: Do not build nptl/tst-pthread-gdb-attach as PIE
36783141cf nptl: Check for compatible GDB in nptl/tst-pthread-gdb-attach
ea299b62e8 nptl_db: Support different libpthread/ld.so load orders (bug 27744)
162df872f0 x86: tst-cpu-features-supports.c: Update AMX check

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-05-01 21:16:11 +02:00
DENG Qingfang 6c618f8512 toolchain/binutils: add binutils 2.36.1
Add binutils version 2.36.1

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2021-05-01 00:37:15 +02:00
DENG Qingfang b1ac59ed13 toolchain/binutils: update to 2.35.2
Update binutils 2.35 to 2.35.2

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2021-05-01 00:37:15 +02:00
Rosen Penev fc093c3f9c toolchain/gdb: fix compilation with ccache
For some reason, one of the configure checks results in some infinite
loop and ends up spawning endless gcc processes, causing OOM. Just pass
a configure var to avoid it.

Same fix as 6e23813c1e

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-17 21:56:05 +02:00
Hans Dedecker b3728f2cbd glibc: update to latest 2.33 commit
12ff80b312 Remove PR_TAGGED_ADDR_ENABLE from sys/prctl.h
1bf38e7260 Fix SXID_ERASE behavior in setuid programs (BZ #27471)
a7b8e8ec9b Enhance setuid-tunables test
ee16c81063 tst-env-setuid: Use support_capture_subprogram_self_sgid
267e174f19 support: Add capability to fork an sgid child
249c486ce8 support: Pass environ to child process
45b2c57d34 support: Typo and formatting fixes
e07abf59b2 tunables: Fix comparison of tunable values
3e9ca60a58 linux: always update select timeout (BZ #27706)
8380ca5833 linux: Normalize and return timeout on select (BZ #27651)
85e4dc415a libsupport: Add support_select_normalizes_timeout
b5b4aa62c1 libsupport: Add support_select_modifies_timeout
3d525dd639 misc: Fix tst-select timeout handling (BZ#27648)
830674605f tst: Provide test for select

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-04-17 21:27:21 +02:00
Hauke Mehrtens acb0788b8e toolchain: gcc: Update to version 10.3.0
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-04-11 23:01:30 +02:00
Hans Dedecker d49f1acff1 glibc: update to latest git HEAD (BZ #27468, BZ #27511)
e78ea9bd26 Update Nios II libm-test-ulps.
98bb18f52a malloc: Fix a realloc crash with heap tagging [BZ 27468]
fc4ecce85b S390: Also check vector support in memmove ifunc-selector [BZ #27511]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-04-05 20:25:42 +02:00
Hans Dedecker 956490ad6a glibc: update to latest 2.33 commit
db32fc27e7 test-container: Always copy test-specific support files [BZ #27537]
79c6be6a0a nptl: Remove private futex optimization [BZ #27304]
f90d6b0484 pthread_once hangs when init routine throws an exception [BZ #18435]
dd8023c2ac elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577]
ea5a537e87 elf: Always set l in _dl_init_paths (bug 23462)
64f6c287ad x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444]
32b9280f1d io: Return EBAFD for negative file descriptor on fstat (BZ #27559)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-03-20 21:18:52 +01:00
Rosen Penev 6e23813c1e binutils: fix compilation with ccache
For some reason, one of the configure checks results in some infinite
loop and ends up spawning endless gcc processes, causing OOM. Just pass
a configure var to avoid it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-19 01:25:26 +01:00
Hans Dedecker 0ef3c58ac8 glibc: update to latest 2.33 commit (BZ #27462, BZ #27318, BZ #27389)
a151f2e05a nscd: Fix double free in netgroupcache [BZ #27462]
ee9f98d9ca x86: Set minimum x86-64 level marker [BZ #27318]
3e880d7337 nss: Re-enable NSS module loading after chroot [BZ #27389]
71b2463f61 x86: Add CPU-specific diagnostics to ld.so --list-diagnostics
a1eb3915e7 x86: Automate generation of PREFERRED_FEATURE_INDEX_1 bitfield
33dc1dd602 ld.so: Implement the --list-diagnostics option
8d4241b897 string: Work around GCC PR 98512 in rawmemchr
6efa2d44c8 S390: Add new hwcap values.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-03-10 20:56:50 +01:00
Daniel Golle a8a37d4ea5
Revert "toolchain: add autoconf-lean"
autoconf-lean was not ready yet. Revert it until things get sorted.

This reverts commit 32c664ff02.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-02 11:36:36 +00:00
Daniel Golle 81d8f874b1
Revert "toolchain/autoconf-lean: add check for ssize_t"
This reverts commit 6b7b064492.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-02 11:34:59 +00:00
Sebastian Kemper 6b7b064492 toolchain/autoconf-lean: add check for ssize_t
This was provided by the old static config.site files and is required by
some software, i.e. freeswitch.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2021-03-01 16:14:04 +00:00
Felix Fietkau 32c664ff02 toolchain: add autoconf-lean
Use it to generate a more comprehensive configure sitefile

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-28 00:09:09 +00:00
Hans Dedecker 048131ba3a glibc: update to latest 2.33 commit
c5e3545897 tunables: Disallow negative values for some tunables
905fdc7071 x86: Use SIZE_MAX instead of (long int)-1 for tunable range value
15afd6b8d8 tunables: Simplify TUNABLE_SET interface

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-02-13 10:07:40 +01:00
Curtis Deptuck 768d1f763c glibc: update to 2.33
ChangeLog:
https://sourceware.org/pipermail/libc-alpha/2021-February/122207.html

Refresh patch:
None required

Signed-off-by: Curtis Deptuck <curtdept@me.com>
2021-02-09 20:59:28 +01:00
Hans Dedecker fc72d07b46 glibc: update to latest 2.32 commit (bug 27256)
760e1d2878 gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-31 12:16:16 +01:00
Rosen Penev 01e4274c21 toolchain/libstdcpp: disable dual ABI and default to new
GCC 5.1 changed the std::string ABI in order to properly support C++11.
For compatibility with libraries compiled with the older ABI, that is,
linking between old-abi.so and new-abi.bin, both ABIs are enabled. In
terms of OpenWrt, all packages are compiled with the same toolchain,
which means these issues do not need to be handled.

Most importantly, this results in a significant size reduction of
libstdpp:

Before:

450794 bytes

After:

327752 bytes

Tested with all OpenWrt packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-26 15:23:06 -10:00
Hans Dedecker 111de654af glibc: update to latest 2.32 commit (BZ#2692 BZ#26988 BZ#26831 BZ#2706)
d3cb8f6222 aarch64: fix static PIE start code for BTI [BZ #27068]
082798622d __vfscanf_internal: fix aliasing violation (bug 26690)
33dc30bc83 aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831]
46e1e64fe3 elf: Pass the fd to note processing
b6eae83717 elf: Move note processing after l_phdr is updated
c6090dcebd aarch64: align address for BTI protection [BZ #26988]
610e2c5150 aarch64: Fix missing BTI protection from dependencies [BZ #26926]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-23 20:59:17 +01:00
Hans Dedecker 54bfebdca0 glibc: update to latest 2.32 commit (BZ #20019, BZ #27177, BZ #27130)
4c619b3eed x86: Check IFUNC definition in unrelocated executable [BZ #20019]
87450ecf8a x86: Set header.feature_1 in TCB for always-on CET [BZ #27177]
2b4f67c2b3 Update for [BZ #27130] fix
1a24bbd43e x86-64: Avoid rep movsb with short distance [BZ #27130]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-15 20:49:01 +01:00
Rosen Penev 33646a51ab glibc: add arc700 patch
glibc does not officially support ARC700 so this adds the missing
pieces. I looked at uClibc-ng and a patch by Synopsis for glibc.

ran make toolchain/glibc/refresh to clean up fuzz.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-14 12:45:46 -10:00
Hans Dedecker 425e392466 glibc: update to latest 2.32 commit (BZ #24973)
0d9793e82a Fix buffer overrun in EUC-KR conversion module (bz #24973)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-01-10 13:14:19 +01:00