Commit Graph

255 Commits

Author SHA1 Message Date
Ilya Lipnitskiy
f30e6d98fa toolchain/gcc: refresh gcc-11.2.0 patch
Run make toolchain/gcc/minimal/refresh (with glibc, with musl
toolchain/gcc/{initial,final}/refresh don't work)

Fixes: ab241e0937 ("toolchain/gcc: fix build on MacOS arm64")

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-12-17 15:10:22 +01:00
Ilya Lipnitskiy
0dca1060fd toolchain/gcc: replace revert with upstream fix
This will make upgrade to v11.3.0 easier and follows upstream more
closely.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-12-17 15:10:22 +01:00
Ilya Lipnitskiy
475b366a5b toolchain/gcc: remove upstreamed patch, add backport
This patch has been upstream since GCC 10.
Dragan Mladjenovic (2):
      Emit .note.GNU-stack for soft-float linux targets.
      Emit .note.GNU-stack for hard-float linux targets.

Link: https://gcc.gnu.org/g:a3c1e1f2ff88
Link: https://gcc.gnu.org/g:54b3d52c3cca

Add backport patch to define TARGET_LIBC_GNUSTACK on musl to add
.note.GNU-stack on hard-float MIPS targets.

Link: https://gcc.gnu.org/g:25abbb924968

The net effect should be the exact same functionality while following
upstream code instead of a custom outdated patch.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-12-17 15:10:22 +01:00
Sergey V. Lobanov
ab241e0937 toolchain/gcc: fix build on MacOS arm64
Added patch for GCC to fix compilation issues on MacOS arm64

The original commit message from Przemysław Buczkowski:

GCC: Patch for Apple Silicon compatibility

This patch fixes a linker error occuring when compiling
the cross-compiler on macOS and ARM64 architecture.

Adapted from:
https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2021-12-02 14:43:41 +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
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
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
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
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
Hauke Mehrtens
080dc619d4 toolchain: gcc: Remove support for GCC 5
GCC was used in 17.01 as the default compiler the last time. We do not
test this old GCC version any more and there are some known problems it
fails to compile the U-Boot for the Allwinner A64 SoC.

Just remove it to make it clear that we will not support this old GCC
version any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2020-12-16 22:11:16 +01:00
DENG Qingfang
21abc09cd6 toolchain: Update GCC 10 to version 10.2.0
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-08-31 22:11:23 +02:00
Syrone Wong
e027df97fc toolchain/gcc: Add GCC 10.1.0 patches
Compared to GCC 9:

870-ppc_no_crtsavres.patch changes moved to another file following upstream
881-no_tm_section.patch keep the tm section disabled

patches refreshed to apply cleanly

See https://gcc.gnu.org/gcc-10/porting_to.html for more info

Compiled and run tested on x86_64

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2020-07-11 13:33:28 +02:00
Syrone Wong
d0b25301d3 toolchain/gcc: Copy patches from 9.3.0 to 10.1.0
No content changes in this commit

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2020-07-11 13:33:28 +02:00
Hauke Mehrtens
cb44ab4f5d toolchain: Update GCC 9 to version 9.3.0
The removed patch is included in GCC 9.3.0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-03-18 23:55:51 +01:00
Hauke Mehrtens
db70077668 toolchain: Update GCC 8 to version 8.4.0
The removed patch is included in GCC 8.4.0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-03-18 23:55:51 +01:00
Jeffery To
c102f702e7 toolchain/gcc: Backport patch to fix unconditional MULTIARCH_DIRNAME
This backports the patch for GCC PR target/89587 (gcc's rs6000
configuration unconditionally sets MULTIARCH_DIRNAME, even when
multiarch is disabled).

This currently affects apm821xx and may cause issues when
cross-compiling packages, e.g. Python 3[1].

This includes patches for GCC 8 (with the changelog diff removed);
this change is already included in GCC 9.2 and 7.5.

[1]: https://github.com/openwrt/packages/issues/10552

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
[Removed patch for GCC 7.4.0, GCC 7.5.0 already contains this]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-12-23 00:04:18 +01:00
Koen Vandeputte
e5c18dad14 toolchain/gcc: bump to 7.5.0
This updates the GCC to the next minor release which fixes +213 bugs.
Tested on ARMv6, ARMv7, MIPS R2, x86

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-11-19 14:59:03 +01:00
Hauke Mehrtens
9edd7edcda gcc: Fix ICE in GCC 9.2.0
This backports a fix from GCC master to fix a internal compiler
exception seen when compiling libjson-c with mips16 activated.

Fixes: FS#2455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-09-20 19:27:25 +02:00
Hauke Mehrtens
b8b7d4cbca gcc: Update gcc 9.X to version 9.2.0
This updates the GCC version 9.X to version 9.2.0.
The removed patches are applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-19 01:02:43 +02:00
Joseph Benden
88c07c6552 toolchain: Add GCC 9.1.0 release
Most of the patches are copied over from GCC 8.3.

The following patches are backported from the GCC 9.X development branch:
toolchain/gcc/patches/9.1.0/970-recompute-dom-fast-queries-before-vn.patch
toolchain/gcc/patches/9.1.0/975-g++-ICE-with-generic-lambda.patch

The specs file changed with gcc 9, now it contains "%@{L*}" instead of
"%{L*}" in older GCC versions.

Signed-off-by: Joseph Benden <joe@benden.us>
2019-06-16 16:40:08 +02:00
Daniel Engberg
075c76ea67 toolchain: Remove GCC 7.1 for ARC targets
Remove GCC 7.1 for ARC targets

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2019-03-20 18:23:39 +01:00
Daniel Engberg
40aec89b4c toolchain: Update to GCC 8.3.0
Update GCC to 8.3.0
Refresh patches
Allow GCC to be used for ARC
Source: https://github.com/openwrt/openwrt/pull/1803#issuecomment-462334890

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2019-02-26 23:20:04 +01:00
Hans Dedecker
b88907e62a toolchain/gcc: backport FORTIFY patch to 5.5.0
Commit e61061a088 added support for hardening
options  in the toolchain. However this breaks the gcc5.5.0 compilation in
case FORTIFY_SOURCE is set different from FORTIFY_SOURCE_NONE as reported
in [1].
Fix this by backporting the upstream patch which fixes this in later gcc versions

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=61164

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2019-02-04 09:35:11 +01:00
Hauke Mehrtens
af1aa07b07 gcc: update to version 7.4.0
This updates the GCC to the next minor release which fixes 178 bugs.
The two removed patches are included in gcc 7.4.0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-15 15:25:03 +01:00
Syrone Wong
2fb95f7142 toolchain/gcc: update 8.x to 8.2.0
This release fixes LTO link-time performance problems and C++ bug introduced in GCC 8.1

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2018-08-20 09:24:33 +02:00
Syrone Wong
139f99c058 toolchain/gcc: add GCC 8.1.0
Changes compared to GCC 7.x

001-revert_register_mode_search.patch dropped

The underlying issue is described at the end of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

It is fixed by the upstream commit:
3fa2798aa8

020-PR-libstdc-81797-Add-.NOTPARALLEL-to-include-Makefil.patch dropped due to already upstream

100-PR-rtl-optimization-83496.patch dropped due to already upstream

910-mbsd_multi.patch
modified to fix ambiguous overloaded inform() call error

gcc/input.h
header: define UNKNOWN_LOCATION ((source_location) 0)

-        inform (0, "someone does not honour COPTS correctly, passed %d times",
-         honour_copts);
+        inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
+         honour_copts);

940-no-clobber-stamp-bits.patch dropped due to fixed upstream by another way
upstream commit: 87b2d547f8

950-cpp_file_path_translation.patch dropped, Both -fmacro-prefix-map and -ffile-prefix-map are added
to gcc 8.1.0, if I understand it correctly, we should use -fmacro-prefix-map
usage: -fmacro-prefix-map=@var{old}=@var{new}
upstream commit: 859b51f836

-iremap exists as a flag for a long time, for backward compatibility, I think we should keep the
variable name unchanged but change its value in rules.mk for gcc 8.x and higher.

Compile and run tested on x86_64

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2018-07-22 17:16:47 +02:00
Felix Fietkau
29e2f9ea5b gcc: remove support for version 6.3.0
It is obsoleted by gcc 7

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-06-05 09:27:33 +02:00
Yousong Zhou
f172456edc toolchain: gccgo: fix building gccgo compiler
Fixes FS#1498.  "gccgo -static" can fail for missing linker flag
-lgcc_eh caused by patch 850-use_shared_libgcc.patch

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 13:33:44 +08:00
Felix Fietkau
16cec7ae67 toolchain/gcc: merge pending fix for miscompiled MIPS16 code issue (GCC PR 84790)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-03-12 12:19:07 +01:00
Felix Fietkau
fe98f2679c toolchain/gcc: fix a build failure on 7.3.0 with macOS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-03-12 12:19:03 +01:00
Felix Fietkau
25aaff9100 gcc: merge upstream fix for PR 83496 (fixes FS#814)
This bug was causing miscompiled code related to branch delay slots

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-26 19:13:55 +01:00
Felix Fietkau
38dc678166 gcc: refresh patches for version 7.3.0
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-26 19:13:55 +01:00
Hauke Mehrtens
1a8523c835 toolchain: gcc: update 7.x to 7.3.0
This version still generates broken code in our setup for MIPS.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-27 19:54:52 +01:00
Evgeniy Didin
e47fe3284f toolchain/arc: update to the most recent release arc-2017.09
This commit finally bumps ARC tools to the most recent arc-2017.09 release version.

ARC GNU tools of version arc-2017.09 bring some quite significant changes like:
 * Binutils v2.29 with additional ARC patches
 * GCC 7.1.1 with additional ARC patches

More information on this release could be found here:
  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2017.09-release

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: John Crispin <john@phrozen.org>
2018-01-27 16:46:44 +01:00
Ryan Mounce
d67979b9d6 toolchain/gcc: update 5.x to 5.5.0
This is the final bugfix release in the gcc-5 series.

Compile and run tested on macOS 10.13 (Xcode 9), mvebu/ar71xx.

Removed redundant patch for macOS (backported upstream by yours truly)

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
2017-10-15 00:24:22 +02:00
Felix Fietkau
07a99a83f2 gcc: fix build error with macOS + Xcode 9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-10-05 21:14:43 +02:00
Kevin Darbyshire-Bryant
3f4f580954 toolchain: gcc: update 7.x to 7.2.0
Bump gcc from 7.1 to 7.2

Compile & run tested: ar71xx

Trace history of current patches and update with commit ref & comment
to give more clue as to why they're still around/needed.  Some have
changed form since the original commit but some clue is better than no
clue at all.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-09-16 19:33:37 +02:00
Evgeniy Didin
8647f4f018 toolchain/arc: update to the most recent release arc-2017.03
arc-2017.03 is the most recent release toolchain for ARC cores
and it is based on upstream Binutils 2.28 and GCC 6.3.0

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
2017-07-18 23:23:27 +02:00
Kevin Darbyshire-Bryant
22e2b402ae gcc: gcc 6.3.0 fix comparison between pointer and integer
Fix FS#832

/source/build_dir/toolchain-mips_74kc_gcc-6.3.0_musl/gcc-6.3.0/gcc/ubsan.c:
In function 'bool ubsan_use_new_style_p(location_t)':
/source/build_dir/toolchain-mips_74kc_gcc-6.3.0_musl/gcc-6.3.0/gcc/ubsan.c:1474:23:
error: ISO C++ forbids comparison between pointer and integer
[-fpermissive]
       || xloc.file == '\0' || xloc.file[0] == '\xff'
                       ^~~~
make[5]: *** [Makefile:1085: ubsan.o] Error 1

https://www.viva64.com/en/b/0425/#ID0EMGCI

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-06-24 13:11:19 +02:00
Felix Fietkau
8851a18a88 gcc: fix documentation entries added by 910-mbsd_multi.patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-25 19:01:07 +02:00
Felix Fietkau
70c2c8ff39 toolchain: add gcc 7.1.0 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-25 19:01:07 +02:00
Alexey Brodkin
34e8393019 toolchain/arc: update to the most recent release arc-2016.09
arc-2016.09 is the most recent toolchain for ARC cores and
it is based on top of upstream Binutils 2.27 and GCC 6.2.1.

With updated major version of GCC we copied all GCC 6.x patches
for ARC as well as Bintils 2.27 patches.

Note that toochain sports ARCv4 ABI and so must be used
with 4.8+ Linux kernels. Even though it will build v4.4 kernel
perfectly fine on attempt to run user-space apps they won't
work with older kernel. That said previuosly sent RFC patches with
Linux kernel update are required:
 [1] https://patchwork.ozlabs.org/patch/726686/
 [2] https://patchwork.ozlabs.org/patch/726687/

Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
2017-05-02 15:17:30 +02:00
Felix Fietkau
70973dd30d gcc: remove obsolete uclibc patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 16:14:10 +01:00
Syrone Wong
0a5ccfbadd toolchain/gcc: update 6.x to 6.3.0
This is a bugfix release

Build and run tested on mvebu/Linksys WRT1900AC v1

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-24 12:02:10 +01:00
Felix Fietkau
565988ab47 gcc: rip out transactional memory related bloat from crtbegin
Slightly improves compression for each executable, saving about 4k from
the default ar71xx rootfs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-14 12:13:13 +01:00
Yousong Zhou
49703b589b toolchain: gcc: disable ifunc on *-musl by default
Otherwise the built binaries may fail with

    Error relocating /usr/bin/qemu-system-x86_64: unsupported relocation type 37

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-11-24 12:53:18 +01:00
BangLang Huang
0fe34d27e2 toolchain: fix MIPS softfloat build issue for gcc-5.4.0
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
2016-11-14 09:37:15 +01:00
Syrone Wong
f8c7e935ef toolchain/gcc: bump GCC 6.1.0 to 6.2.0
Compile and run tested on ar71xx and mvebu

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-04 13:36:09 +02:00
Matteo Croce
360fd10ac9 gcc: optionally build gccgo compiler
Tested with eglibc on x86 and armv7 so far

Signed-off-by: Matteo Croce <matteo.croce@canonical.com>
2016-08-11 10:45:33 +02:00