Commit Graph

113 Commits

Author SHA1 Message Date
Nik Konyuchenko
1f8fae2615 Initial GCC 14.1.0 support
+ gcc 14 package version
+ tar.gz and tar.xz checksums
+ patches from gcc13 that can still be applied to gcc14

Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
2024-05-18 15:45:55 +12:00
WANG Rui
36537f60e0 gcc/13.2.0: Fix musl libdir path for loongarch64
This patch adds two gcc commits to fix musl libdir path for loongarch64:

* 13c5de14 ("LoongArch: Fix MUSL_DYNAMIC_LINKER")
* a5f1bdfc ("LoongArch: Modify MUSL_DYNAMIC_LINKER.")
* 2f7d4728 ("LoongArch: Use /lib instead of /lib64 as the library search path for MUSL.")

Signed-off-by: WANG Rui <wangrui@loongson.cn>
2024-03-09 13:03:47 +13:00
Chris Packham
2c93ba7577 gcc: Add patch to resolve libsanitizer build issue
libsanitizer has problems intercepting crypt() and crypt_r() with newer
glibcs. Bring in an upstream patch that drops support for these from
ASAN.

llvm/llvm-project@d7bead8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111057

Fixes #2083
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2024-01-30 11:04:27 +13:00
Chris Packham
c175b21ce4 gcc: Bring in upstream fixes for CVE-2023-4039
Bring in the fixes for GCC 7 through 13.

https://rtx.meta.security/mitigation/2023/09/12/CVE-2023-4039.html
https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-09-17 15:41:50 +12:00
Chris Packham
2b2183b321 gcc: Add patch to avoid reference to __pthread_key_create
A toolchain uclibc-ng-1.0.43, binutils-2.40 and gcc-13.2.0 hits the
following error when building:

  ld.bfd: isl_test2.o: non-canonical reference to canonical protected function `__pthread_key_create' in x86_64-multilib-linux-uclibc/sysroot/lib64/libc.so.1
  ld.bfd: failed to set dynamic section sizes: bad value

The reference comes from libgcc where it is using the
__pthread_key_create() symbol to detect the use of pthreads with GNU
libc. Prevent this on uclibc-ng with an explicit condition.

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

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-09-13 13:55:00 +12:00
Keith Packard
5a09578b67 gcc/13.2.0: Add patch with fixes for m68k soft float code
Here's a patch I've sent upstream which fixes a range of floating
point bugs in libgcc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-25 18:13:37 +12:00
Chris Packham
f064a63c6f gcc: Add patch to resolve libsanitizer build issue
libsanitizer has problems intercepting crypt() and crypt_r() with newer
glibcs. Bring in an upstream patch that drops support for these from
ASAN.

d7bead8336
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111057

Fixes #2010
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-08-19 16:47:15 +12:00
Chris Packham
41f5d49053 gcc: Add 13.2.0
https://gcc.gnu.org/pipermail/gcc-announce/2023/000179.html
https://gcc.gnu.org/gcc-13/changes.html

Add the new version and regenerate the patches.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-08-04 16:43:19 +12:00
Chris Packham
dac4403390 gcc: Update 10.4 -> 10.5
Add GCC 10.5.0 and regenerate patches against the new version.

https://gcc.gnu.org/pipermail/gcc-announce/2023/000178.html
https://gcc.gnu.org/gcc-10/changes.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-07-14 14:01:33 +12:00
Chris Packham
d855363eee gcc: Add 11.4.0
Add gcc 11.4.0 and regenerate patches against the new version.

https://gcc.gnu.org/pipermail/gcc-announce/2023/000177.html
https://gcc.gnu.org/gcc-11/changes.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-31 20:21:59 +12:00
Chris Packham
aad643b594 gcc/6.5.0: Bring in upstream fix for newer ISL versions
isl-0.26 moves some header includes around so now if we want
isl_val_free we need to include isl/val.h. Otherwise we get errors such
as

 src/gcc/gcc/graphite-isl-ast-to-gimple.c: In member function 'tree_node* translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int(tree, isl_ast_expr*)':
 src/gcc/gcc/graphite-isl-ast-to-gimple.c:349:3: error: 'isl_val_free' was not declared in this scope; did you mean 'isl_vec_free'?
      349 |   isl_val_free (val);
          |   ^~~~~~~~~~~~
          |   isl_vec_free

Bring in an upstream fix that uses the correct header file.

Fixes #1962
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-28 09:29:00 +12:00
Chris Packham
abe4f4583e gcc/6.5.0: Regenerate patches
Run patches through ./maintainer/manage-packages.sh -P -s gcc-6.5.0 to
clean them up.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-28 09:29:00 +12:00
Chris Packham
e8b3eccd8a gcc: Add upstream patch for build issue on RISCV
Depending on the host C++ compiler GCC13 fails on riscv configurations
with the following error

 src/gcc/gcc/config/riscv/genrvv-type-indexer.cc:118:30: error: no member named 'log2' in namespace 'std'; did you mean simply 'log2'?
        elmul_log2 = lmul_log2 - std::log2 (sew / eew);
                                 ^~~~~~~~~
                                 log2
 /usr/include/c++/v1/math.h:1463:1: note: 'log2' declared here
    log2(_A1 __lcpp_x) _NOEXCEPT {return ::log2((double)__lcpp_x);}
    ^

Bring in an upstream fix for the build error.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-14 10:35:14 +12:00
Chris Packham
f00a45eba6 gcc: Add 13.1.0
Add gcc 13.1.0 with rebased patches against the new version.

https://gcc.gnu.org/pipermail/gcc-announce/2023/000175.html
https://gcc.gnu.org/gcc-13/changes.html
https://gcc.gnu.org/gcc-13/porting_to.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-14 10:35:14 +12:00
Chris Packham
8e55ab0607 gcc: Add 12.3.0
Add gcc 12.3.0 and regenerate patches against the new version.

https://gcc.gnu.org/pipermail/gcc-announce/2023/000176.html
https://gcc.gnu.org/gcc-12/changes.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-05-14 10:34:29 +12:00
Chris Packham
b646773ebb gcc/12.2.0: Regenerate patches
Run the patches through

  ./maintainer/manage-packages.sh -P -s gcc-12.2.0

to mop up the fact that we'd ended up with two 0005 patches.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-04-30 20:28:57 +12:00
Bryan Hundven
89671bf236 [gcc] Move a patch to the bundled experimental patches
As mentioned in #1908, we should have patches that are experimental
under the CT_EXPERIMENTAL option. This an experimental patch to gcc:

https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600452.html

And since it may affect production toolchains, we should move this patch
to the experimental bundled patches introduced in the previous commit.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2023-03-16 16:54:22 +13:00
Steven Fackler
9f2866037a Support targeting macOS aarch64 in older GCCs
This adds backports of a couple of patches necessary to support macOS
arm64 hosts for gcc. It was ported from
https://github.com/richfelker/musl-cross-make/pull/129 with some small
fixups to make the patches apply cleanly.

Signed-off-by: Steven Fackler <sfackler@gmail.com>
2023-03-14 08:56:14 +13:00
Bryan Hundven
5248760ea9
Merge pull request #1908 from keith-packard/gcc-getenv-default
packages/gcc: Add gcc patch to allow getenv default values
2023-03-09 19:59:35 -08:00
Keith Packard
90cbc880af packages/gcc/12.2.0: Add picolibc patches
These patches allow picolibc to act as the system C library within gcc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-03-08 16:54:12 +13:00
Keith Packard
06a0160328 packages/gcc: Add gcc patch to allow getenv default values
This patch, submitted upstream but not (yet?) accepted, adds a third
parameter to the specs file 'getenv' function that provides a value
for when the environment variable is not set, instead of having gcc
fail.

This seemed like the safest way to provide a mechanism for getting the
installed location of the toolchain from inside a specs file as, when
not installed in the built-in location, gcc already sets the
GCC_EXEC_PREFIX environment variable to a well defined location within
that directory hierarchy, but when installed in the location specified
at compile time, gcc does not. Providing a default value that matches
the compile-time location then allows the specs file to compute paths
relative to the current GCC installation location, whereever it is
installed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-02-28 13:42:48 -08:00
Bryan Hundven
9e3c574ec6 Backport fixes for glibc and gcc to fix interactions with kernel headers
Reported-by: milkylainen (IRC)
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-11-09 20:36:04 +13:00
Chris Packham
3020aca6bb gcc: Add gcc 12.2.0
https://gcc.gnu.org/pipermail/gcc-announce/2022/000174.html

Add gcc 12.2.0. None of the patches needed regenerating.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-08-23 20:02:11 +12:00
Chris Packham
1655025873 gcc: Add gcc 10.4.0
https://gcc.gnu.org/pipermail/gcc-announce/2022/000173.html

Add GCC 10.4.0 and regenerate the ct-ng patches. The
powerpc-Fix-asm-machine-directive-for-some-CPUs patch is dropped as the
change was applied upstream (and subsequently refactored).

Closes #1777

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-07-11 19:50:02 +12:00
Chris Packham
bcb053baf6 Revert "gcc: Bring in fix for libsanitizer on mips64"
This reverts commit 1b6ad7cd48. As it
turns out libsanitizer isn't supported on mips64 with GCC11 or older
(there is support in GCC12). The bug is actually the fact that ct-ng
allows configuring libsanitizer for architectures that don't support it.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-07-11 19:49:23 +12:00
Chris Packham
2f0d1f334f gcc: Add gcc 9.5.0
Add GCC 9.5.0 and regenerate the patches as necessary.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-06-08 19:38:05 +12:00
Chris Packham
dec3d3a421 gcc: Update fix for sh-unknown-elf
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>
2022-05-31 20:00:00 +12:00
Chris Packham
23580a86aa gcc: drop libsanitizer patch for GCC12
For some reason GCC 12 ends up hitting the _MIPS_SIM_NABI32 case for
Linux's arch/mips/include/uapi/asm/stat.h when building libsanitizer.
This is basically the opposite of the problem from
commit 1b6ad7cd ("gcc: Bring in fix for libsanitizer on mips64").
Dropping the patch resolves the issue for GCC 12.

Fixes #1741
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-05-23 20:51:45 +12:00
Chris Packham
db6f703f52 gcc: Add 12.1
Add GCC 12.1 https://gcc.gnu.org/gcc-12/

The following patches from GCC 11.3.0 are no longer needed:
- 0005-arc-Update-ZOL-pattern.patch
- 0006-arc-Update-u-maddhisi4-patterns.patch
- 0007-arc-Fix-maddhisi-patterns.patch
- 0008-Darwin-aarch64-Initial-support-for-the-self-host-dri.patch
- 0009-libstdc-Check-for-TLS-support-on-mingw-cross-compile.patch

One new patch is needed to avoid issues building sh-unknown-elf:
- 0006-sh-Avoid-mb-m1-multilib-combination.patch

It is also necessary to build all-build-libcpp. This target exists as
far back as GCC 6 so has been done unconditionally.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-05-19 14:24:46 +12:00
Chris Packham
1b6ad7cd48 gcc: Bring in fix for libsanitizer on mips64
The kernel's struct stat is 104 bytes when compiling for
_MIPS_SIM_ABI64. Set struct_kernel_stat_sz to match.

Fixes #1733

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-05-18 20:17:01 +12:00
Chris Packham
aa46366fc3 gcc: Update vcs URL
The GCC project has been using git for a while now. Update the
repository field accordingly.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-05-08 13:37:41 +12:00
Hans-Christian Noren Egtvedt
3c94c6c678 gcc: bump GCC 11 to latest release 11.3.0
Remove patches applied upstream we no longer need to maintain here.

Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
2022-05-08 13:29:34 +12:00
Anton Maklakov
6cd16639b9 gcc: add fixes for GCC 11.2. Anon and aggregated struct access 2022-03-28 21:01:58 +13:00
Anton Maklakov
bfda65e00e gcc: rename patches to order 2022-03-28 21:01:58 +13:00
Chris Packham
1e47ca1e70 gcc: powerpc: Fix asm machine directive for some CPUs
Bring in upstream fix for gcc outputting an incorrect .machine
directive.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-02-28 20:59:33 +13:00
ivanka2012
76d9b8c15c Fix MinGW libstdc++ TLS functionality
Backport of cc1e28878a

Signed-off-by: Kittenberger Iván <ivanka2012@gmail.com>
2022-02-28 20:58:55 +13:00
Alexey Neyman
86c2982568 Run patches thru manage-packages -P
This refreshes the line numbers, removes any fuzz (which would make any
future forward ports easier) and standardizes the patch/file headers
(which makes them easier to read).

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:51 -08:00
Alexey Neyman
1210b0c2f4 Run packages through manage-packages -D
This fixed some typos in the checksum files (please don't edit them
manually, this is error-prone!)

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:51 -08:00
Alexey Neyman
cc6b7fad46 Retire obsoleted milestones
... 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>
2022-02-11 00:47:50 -08:00
Alexey Neyman
4c6604e730 Remove gcc-oracle-4.8-44.0.5
GCC 4.8 and its prerequisites have been removed by 04dce680, 41d4583a
and e4221734; as a result, 4.8-based version of gcc-oracle became
unbuildable (no valid versions for the prerequisites).

Update the samples to use 4.9.4; which however fails to build on a modern
host GCC. Build fix backported to gcc-4.9 and gcc-5 versions.

Fix binutils-oracle build with host GCC11.

Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11 00:47:50 -08:00
Chris Packham
6737cfaa8c gcc: Use upstream fix for cross-canadian builds
Replace the patch from #1600 with the change that landed upstream.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-01-14 12:44:51 +13:00
Kairui Song
85530cce98 gcc: Fix 11.2.0 build failure on MacOS with Apple M1
With latest aarch64-unknown-linux-gnu, ct-ng build failed with:

[INFO ]  Installing pass-1 core C gcc compiler
[EXTRA]    Configuring core C gcc compiler
[EXTRA]    Building gcc
[ERROR]    clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR]    make[2]: *** [Makefile:2148: xgcc] Error 1
[ERROR]    make[2]: *** Waiting for unfinished jobs....
[ERROR]    clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR]    make[2]: *** [Makefile:2157: cpp] Error 1
[ERROR]    make[1]: *** [Makefile:4444: all-gcc] Error 2

And in build log:
Undefined symbols for architecture arm64:
  "host_detect_local_cpu(int, char const**)", referenced from:
      static_spec_functions in gcc.o

Just backport a upstream gcc fix.

Signed-off-by: Kairui Song <ryncsn@gmail.com>
2021-12-13 21:19:30 +13:00
Alexey Brodkin
15f9d8fcea gcc11: Fixes for ARC
See more details here:
1. https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/398
2. https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/427
3. https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/429

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-10-10 04:53:17 -07:00
Chris Packham
e422173483 gcc: Remove obsolete versions
The following versions were marked obsolete in crosstool-ng-1.24.0,
remove them.
- gcc-linaro-4.8-2015.06
- gcc-4.8.5

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-09-21 21:24:31 +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
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
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
5ab678eae3 gcc: Bump maintenance versions
8.4.0 -> 8.5.0
9.3.0 -> 9.4.0

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-07-05 21:11:45 +12:00
Keith Packard
83029d7570 packages/gcc/libstdc++: #include_next → #include
Some of the installed libstdc++ header files use '#include_next' to
work around toolchain oddities that might cause loops in the
compiler. However, these also cause mistakes in locating header files
when there are multiple C libraries installed as '#include_next' often
ends up finding default C library header files.

It doesn't seem like this patch could be accepted upstream; there's a
long discussion about the use of include_next in these headers which I
cannot fully understand.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-06-17 10:30:25 -07:00
Stephanos Ioannidis
4ab0727f98 packages: gcc: Add missing milestones
This commit adds the missing gcc milestones 9 and 10, so that the
helper symbols `GCC_9_or_later` and `GCC_10_or_later` can be used.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-07 18:54:58 +09:00