Commit Graph

455 Commits (88c07c655262ea63c342e7c9df67cfe36fe3e5df)

Author SHA1 Message Date
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>
5 years ago
Alexander Couzens 79948e9d61
replace links towards lede-project.org with openwrt.org
Modify VERSION_SUPPORT_URL VERSION_REPO
Replace BUGS variable in toolchain/gcc/common.mk

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years ago
Boris Krasnovskiy 4cf991bedb toolchain: ARM: Fix option conflict with multiarch
This problem exposed when compiling glibc, but applicable across the
board. gcc compiles runtime libraries for all supported architectures,
unless otherwise specified, and later selects applicable library based
-m[arch,cpu,*] options, thus these options should not be passed to gcc
as they break the compilation process.

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[modified so it only touches ARM - I'm too chicken, changed authors email]
5 years ago
Boris Krasnovskiy 8dcc108760 toolchain: ARM: Fix toolchain compilation for gcc 8.x
Set the toolchain's ARM CPU and FPU architectures by utilizing' gcc's
--with-cpu / --with-fpu configure options that: "Specify which cpu
variant the compiler should generate code for by default. cpu will
be used as the default value of the -mcpu= switch."

This will resolve the following kernel compilation failures under
gcc 8.x on ARM because the kernel wants to set (possibly conflicting)
optimization flags.

.../ccyVnmrs.s:204: Error: selected processor does not support `dmb ish' in ARM mode
.../ccyVnmrs.s:215: Error: architectural extension `mp' is not allowed for the current base architecture
.../ccyVnmrs.s:216: Error: selected processor does not support `pldw [r4]' in ARM mode

Because this is a big change, the .config and toolchain need to be
refreshed (as in removed and regenerated).

Reported-by: Ansuel Smith <ansuelsmth@gmail.com>
Reported-by: Daniel Engberg <daniel.engberg.lists@pyret.net> [#1203]
Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [extended commit message,
removed now-deprecated CPU_CFLAGS, changed author to gmail address]
5 years ago
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>
5 years ago
Daniel Engberg 343b36ffc7 toolchain: Use GCC 8.3.0 by default for ARC
Use GCC 8.3.0 by default for ARC targets
Includes a fix by Evgeniy Didin which fixes GCC version selection if
DEVEL isn't set

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years ago
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>
5 years ago
Daniel Engberg 700c0edc06 toolchain/gcc: Remove workaround for GCC 4.8
GCC 4.8 was removed a long time ago...

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years ago
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>
5 years ago
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>
5 years ago
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>
6 years ago
Syrone Wong 713cee6463 toolchain/gcc: add config symbol to determine how to apply path remapping
Added boolean symbol for GCC 8 and higher, when we add newer GCC, we don't have
to modify rules.mk to keep things consistant.

Fixes: da9d760 ("rules.mk: replace iremap when using GCC 8")

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
6 years ago
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>
6 years ago
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>
6 years ago
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>
6 years ago
Felix Fietkau 61eee1adfb toolchain/gcc: switch to version 7 by default
Newer GCC versions are reported to improve code size on various ARM
devices, which is why newer u-boot versions require them now.
There have also been user reports of data corruption issues fixed on
MIPS by updating from GCC 5 to GCC 7.

This update was previously held up by these two MIPS compile issues,
which have since been fixed:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83496
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 16cec7ae67 toolchain/gcc: merge pending fix for miscompiled MIPS16 code issue (GCC PR 84790)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau fe98f2679c toolchain/gcc: fix a build failure on 7.3.0 with macOS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 1198204a6f toolchain: fix selecting older gcc versions for x86
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
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>
6 years ago
Felix Fietkau 38dc678166 gcc: refresh patches for version 7.3.0
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 7a97588bc6 toolchain/gcc: use version 7.x for x86 by default
This is needed for retpoline support, which mitigates the spectre
attacks.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 65ae02d602 toolchain/gcc: remove unused config symbol
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
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>
6 years ago
Julien Dusser 241e6dd3e9 build: cleanup SSP_SUPPORT configure option
Configure variable SSP_SUPPORT is ambiguous for packages (tor, openssh,
avahi, freeswitch). It means 'toolchain supporting SSP', but for toolchain
and depends it means 'build gcc with libssp'.

Musl no longer uses libssp (1877bc9d8f), it has internal support, so
SSP_SUPPORT was disabled leading some package to not use SSP.

No information why Glibc and uClibc use libssp, but they may also provide
their own SSP support. uClibc used it own with commit 933b588e25 but it was
reverted in f3cacb9e84 without details.

Create an new configure GCC_LIBSSP and automatically enable SSP_SUPPORT
if either USE_MUSL or GCC_LIBSSP.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
6 years ago
Julien Dusser 55779569eb toolchain: add gcc configure default PIE and SSP
GCC supports starting version 5 --enable-default-ssp and starting version 6
--enable-default-pie.

It produces hardened binaries by default without dealing with package
compilation flags.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
6 years ago
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>
6 years ago
Zoltan HERPAI d2c06eb075 merge: etc: update remaining files
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Felix Fietkau 7e2c271a80 gcc: remove support for libgcj/java
It has been removed in gcc 7

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
7 years ago
Felix Fietkau 07a99a83f2 gcc: fix build error with macOS + Xcode 9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
7 years ago
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>
7 years ago
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>
7 years ago
Syrone Wong c87aa0d7ca toolchain/gcc: fix --with-isl path
This fixes GCC 7 compilation when GRAPHITE is selected.
The path is replaced with $(TOOLCHAIN_DIR), while it should be
$(STAGING_DIR_HOST). To keep in sync with the path of gmp,
mpfr and mpc, I'm using $(TOPDIR)/staging_dir/host.

Fixes: f62f4b3c5c ("build: stop overriding STAGING_DIR_HOST for toolchain build")

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
7 years ago
Felix Fietkau 8851a18a88 gcc: fix documentation entries added by 910-mbsd_multi.patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 70c2c8ff39 toolchain: add gcc 7.1.0 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f62f4b3c5c build: stop overriding STAGING_DIR_HOST for toolchain build
This causes various issues in other places that assume that host
binaries are staged in STAGING_DIR_HOST.
Since all the right places use HOST_BUILD_PREFIX, override that instead.
This fixes some issues with quilt on toolchain dirs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
7 years ago
Felix Fietkau 0f5d17a7e6 toolchain/gcc: parallelize make install
If the staging dir was deleted, the build needs to recompile some files.
This change speeds up this corner case significantly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 70973dd30d gcc: remove obsolete uclibc patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f204e0fc46 toolchain/gcc: reduce source directory size by about 420 MB
Remove gcc testsuite, ada and libjava (if not selected)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
7 years ago
Felix Fietkau 3f55e5aeb5 toolchain: remove ppl/cloog, disable graphite for gcc 4.8
graphite is disabled by default and it's not worth carrying ppl and
cloog for supporting this feature on the old gcc 4.8, which is only used
for ARC

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
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>
8 years ago
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>
8 years ago
BangLang Huang 0fe34d27e2 toolchain: fix MIPS softfloat build issue for gcc-5.4.0
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
8 years ago
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>
8 years ago
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>
8 years ago