commit: 4f668371abba1ef8635640ae41938ca5cea611cd
parent 4aaaeff6f29573cf5ee381cc00b097ae9c5846b1
Author: fosslinux <fosslinux@aussies.space>
Date: Sun, 2 Feb 2025 15:20:26 +1100
Update GCC 10 to 10.5.0
Diffstat:
22 files changed, 423 insertions(+), 423 deletions(-)
diff --git a/steps/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs
@@ -24,7 +24,7 @@ c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6
7db49c9b024821d82d15afc0db2b1af8d89700101495a9cbadf471813ba5fa55 bc-1.07.1_0.tar.bz2
5d777f774df7fb0153aa73b501c7fe1a57f152a3aa2c86e83a04e68b5df4f696 binutils-2.30_0.tar.bz2
43bed356bf52b3d52ef62b63adbeb3bbd1e763e93d0ffd3edb5c75354842f171 binutils-2.41_0.tar.bz2
-8107e22996cc9112f1b50848570afdd44283521a296a1dc6d54d35823fd1ecc4 binutils-2.41_1.tar.bz2
+7808e5290bf530cd7068e91642def059bc3341b628630d1fb2600590477187db binutils-2.41_1.tar.bz2
fa047f6dd4595be1bf8a9cc6ff492357f02fefa3bf1ad965c8c50c8e79a52478 bison-2.3_0.tar.bz2
81554c867db75101422797d227dd76c8a12c87246393126542ff92a0b97db6c1 bison-3.4.1_0.tar.bz2
f7437edc081071cc3ecd3384abf4c63f33183858b8cae6b4ac3105c66f88b3b6 bison-3.4.1_1.tar.bz2
@@ -51,7 +51,7 @@ eec07e0d710ed3dd8d0ba6a1ec6ca9f1fa3a611bbb225195435679175317bf90 findutils-4.2.
c925739472260498342ba6dc3263da937abf5237e7e9102622bf5657ec98094a gawk-3.0.4_0.tar.bz2
97e255a5852cb5fbd16e632249787f80e6bfd75cc5b31f8dfc8c81660a0801e1 gawk-5.3.0_0.tar.bz2
ab8b5b92de4780b085d8bc7e98ee72ad5ba9c07b26690c579c559b5cc21817eb gc-8.0.4_0.tar.bz2
-6308c8d1568905cf58b3cd7b64e15a14656405f9676ec47ce3e9eecce3c857bc gcc-10.4.0_0.tar.bz2
+5917ef350e9ca3d854bde04e8570df413bd8c2f824e01caf7dc97452483c5103 gcc-10.5.0_0.tar.bz2
073c34853a2a7d221028d77029105d91a81fc82c2000bc171880270ad69fb4ea gcc-13.3.0_0.tar.bz2
64052d4b2ad1ac405455767b3ac09b77c31d90c38b1d69bfc0922902bd943a2d gcc-4.0.4_0.tar.bz2
da88bb5900f33c1caca9180784e47367e64ec9f258182a147d84168540de1450 gcc-4.0.4_1.tar.bz2
@@ -61,7 +61,7 @@ cbbc193d4bef0b9ac9e4ba0111009297da66bc65de12c9f07b14d3f0d3be9688 gcc-4.7.4_0.ta
e89c5a38c49f2beb959e51732ff29bcf3652945e4f1c2bf70d39310c22b0c58f gperf-3.1_0.tar.bz2
c1989fc2855dbb0350c4e5b677028306614a9f4b5cb6c01fd459c5e1abf592b9 grep-2.4_0.tar.bz2
bfeb5cad6720cd6ff629095f562fc7b60e2b352d248c4f8bdc9de3db1ed09b17 grep-3.7_0.tar.bz2
-7fae0496943df52f3e6a78692c4aee432d15c77d46626d58fbd7c0ae847e4934 grub-2.06_0.tar.bz2
+3f08414ffc65cebc8a635b0339f95c7ea0259d33cb53676293c3b28b0453f8c1 grub-2.06_0.tar.bz2
fc97b59e6b3a99ef457890a00ddee4a9ad44316e41cb746cf6cac1d193e480b7 guile-3.0.9_0.tar.bz2
4b784b57ed27e22750cf79492bb65bf68bd8211d942eeb74490981effa41196b gzip-1.13_0.tar.bz2
d0cb00116d742d4216af4a7ed47f20408640229909a497c184aed3d4fcd4f30a heirloom-devtools-070527_0.tar.bz2
diff --git a/steps/gcc-10.4.0/files/decDPD.h.preamble b/steps/gcc-10.4.0/files/decDPD.h.preamble
@@ -1 +0,0 @@
-../../gcc-4.7.4/files/decDPD.h.preamble
-\ No newline at end of file
diff --git a/steps/gcc-10.4.0/files/decDPD_generate.c b/steps/gcc-10.4.0/files/decDPD_generate.c
@@ -1 +0,0 @@
-../../gcc-4.7.4/files/decDPD_generate.c
-\ No newline at end of file
diff --git a/steps/gcc-10.4.0/pass1.sh b/steps/gcc-10.4.0/pass1.sh
@@ -1,193 +0,0 @@
-# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-src_prepare() {
- default
-
- # Remove unused pregenerated files
- rm libsanitizer/include/sanitizer/netbsd_syscall_hooks.h \
- libsanitizer/sanitizer_common/sanitizer_syscalls_netbsd.inc
- rm -r libgfortran/generated
- rm gcc/testsuite/go.test/test/bench/go1/jsondata_test.go \
- gcc/testsuite/go.test/test/bench/go1/parserdata_test.go \
- gcc/testsuite/go.test/test/bench/shootout/mandelbrot.txt
- rm gcc/testsuite/go.test/test/cmplxdivide1.go
- rm gcc/testsuite/gcc.target/x86_64/abi/test_3_element_struct_and_unions.c \
- gcc/testsuite/gcc.target/x86_64/abi/test_basic_returning.c \
- gcc/testsuite/gcc.target/x86_64/abi/test_passing_floats.c \
- gcc/testsuite/gcc.target/x86_64/abi/test_passing_integers.c
- rm gcc/config/rs6000/rs6000-tables.opt \
- gcc/config/h8300/mova.md \
- gcc/config/aarch64/aarch64-tune.md \
- gcc/config/nios2/ldstwm.md \
- gcc/config/riscv/t-elf-multilib \
- gcc/config/riscv/t-linux-multilib \
- gcc/config/arm/arm-tune.md \
- gcc/config/arm/arm-tables.opt \
- gcc/config/arm/ldmstm.md \
- gcc/config/arc/t-multilib \
- gcc/config/m68k/m68k-tables.opt \
- gcc/config/c6x/c6x-mult.md \
- gcc/config/c6x/c6x-tables.opt \
- gcc/config/c6x/c6x-sched.md \
- gcc/config/csky/csky_tables.opt \
- gcc/config/mips/mips-tables.opt
- rm libphobos/src/std/internal/unicode_tables.d
- rm libgo/go/math/bits/example_test.go \
- libgo/go/math/bits/bits_tables.go \
- libgo/go/math/big/accuracy_string.go \
- libgo/go/math/big/roundingmode_string.go \
- libgo/go/strconv/isprint.go \
- libgo/go/sort/zfuncversion.go \
- libgo/go/golang.org/x/net/route/zsys_*.go \
- libgo/go/golang.org/x/net/idna/*.go \
- libgo/go/golang.org/x/text/unicode/bidi/t*.go \
- libgo/go/golang.org/x/text/unicode/norm/tables*.go \
- libgo/go/internal/syscall/windows/registry/zsyscall_windows.go \
- libgo/go/internal/syscall/windows/zsyscall_windows.go \
- libgo/go/encoding/gob/*_helpers.go \
- libgo/go/index/suffixarray/sais2.go \
- libgo/go/net/http/*_bundle.go \
- libgo/go/runtime/sizeclasses.go \
- libgo/go/runtime/fastlog2table.go \
- libgo/go/html/template/*_string.go \
- libgo/go/crypto/x509/root_darwin_armx.go \
- libgo/go/crypto/md5/md5block.go \
- libgo/go/time/zoneinfo_abbrs_windows.go \
- libgo/go/unicode/tables.go \
- libgo/go/regexp/syntax/doc.go \
- libgo/go/regexp/syntax/op_string.go \
- libgo/go/regexp/syntax/perl_groups.go \
- libgo/go/image/internal/imageutil/impl.go \
- libgo/go/image/color/palette/palette.go \
- libgo/go/cmd/internal/objabi/*_string.go \
- libgo/go/debug/dwarf/*_string.go \
- libgo/go/debug/macho/reloctype_string.go
- rm libgo/go/internal/xcoff/testdata/bigar* \
- libgo/go/internal/xcoff/testdata/gcc* \
- libgo/go/internal/trace/testdata/* \
- libgo/go/compress/bzip2/testdata/*.bin \
- libgo/go/go/internal/gccgoimporter/testdata/v1reflect.gox \
- libgo/go/go/internal/gccgoimporter/testdata/time.gox \
- libgo/go/go/internal/gccgoimporter/testdata/unicode.gox \
- libgo/go/go/internal/gccgoimporter/testdata/escapeinfo.gox \
- libgo/go/go/internal/gccgoimporter/testdata/libimportsar.a \
- libgo/go/go/internal/gcimporter/testdata/versions/*.a
- rm -r libgo/go/compress/flate/testdata \
- libgo/go/runtime/pprof/testdata \
- libgo/go/debug/*/testdata
- find fixincludes/tests -name "*.h" -delete
- # Partially generated unused files
- rm libgcc/config/sh/lib1funcs.S \
- libgcc/config/sh/lib1funcs-4-300.S \
- libgcc/config/arc/lib1funcs.S
-
- # Remove vendored zlib
- rm -r zlib/
-
- # Regen gperf file (because GCC's make rules suck)
- rm gcc/cp/cfns.h
- # (taken directly from gcc/cp/Make-lang.in)
- gperf -o -C -E -k '1-6,$' -j1 -D -N 'libc_name_p' -L C++ \
- gcc/cp/cfns.gperf --output-file gcc/cp/cfns.h
-
- # Regenerate autogen stuff
- rm Makefile.in fixincludes/fixincl.x
- autogen Makefile.def
- pushd fixincludes
- ./genfixes
- popd
-
- # Regenerate autotools
- # configure
- find . -name configure | sed 's:/configure::' | while read d; do
- pushd "${d}"
- AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fiv
- popd
- done
- # Because GCC is stupid, copy depcomp back in
- cp "${PREFIX}/share/automake-1.15/depcomp" .
- # Makefile.in only
- BACK="${PWD}"
- find . -type d \
- -exec test -e "{}/Makefile.am" -a ! -e "{}/configure" \; \
- -print | while read d; do
- d="$(readlink -f "${d}")"
- cd "${d}"
- # Find the appropriate configure script for automake
- while [ ! -e configure ]; do
- cd ..
- done
- automake-1.15 -fai "${d}/Makefile"
- cd "${BACK}"
- done
-
- # Remove bison generated files
- rm intl/plural.c
-
- # Remove flex generated files
- rm gcc/gengtype-lex.c
-
- # intl/ Makefile is a bit broken because of new gettext
- sed -i 's/@USE_INCLUDED_LIBINTL@/no/' intl/Makefile.in
-
- # Regenerate crc table in libiberty/crc32.c
- pushd libiberty
- sed -n -e '38,65p' crc32.c > crcgen.c
- gcc -o crcgen crcgen.c
- head -n 69 crc32.c > crc32.c.new
- ./crcgen >> crc32.c.new
- tail -n +138 crc32.c >> crc32.c.new
- mv crc32.c.new crc32.c
- popd
-
- # Regenerate decDPD.h
- rm libdecnumber/decDPD.h
- gcc -std=c99 -o decDPD_generate decDPD_generate.c
- cp decDPD.h.preamble libdecnumber/decDPD.h
- ./decDPD_generate >> libdecnumber/decDPD.h
-
- # Remove docs/translation
- find . -name "*.gmo" -delete
- find . -name "*.info" -delete
- find . -name '*.[1-9]' -delete
- rm libiberty/functions.texi
- # Sphinx-generated
- rm gcc/jit/docs/conf.py
- rm gcc/jit/docs/_build/texinfo/libgccjit.texi \
- gcc/ada/gnat_rm.texi \
- gcc/ada/gnat_ugn.texi
-
- rm gcc/doc/avr-mmcu.texi
- gcc -o gen-avr-mmcu-texi gcc/config/avr/gen-avr-mmcu-texi.c
- ./gen-avr-mmcu-texi > gcc/doc/avr-mmcu.texi
-}
-
-src_configure() {
- mkdir build
- cd build
-
- # std=gnu11 is the default for GCC10, so that is what it makes most
- # sense to build with. (default, std=gnu90 is too outdated).
- # For this GCC, we only build one stage, as extra is superfluous,
- # since we build GCC 12 straight after.
- CFLAGS="-std=gnu11" \
- LDFLAGS="-static" \
- ../configure \
- --prefix="${PREFIX}" \
- --libdir="${LIBDIR}" \
- --build=i386-unknown-linux-musl \
- --target=i386-unknown-linux-musl \
- --host=i386-unknown-linux-musl \
- --disable-bootstrap \
- --enable-static \
- --program-transform-name= \
- --enable-languages=c,c++ \
- --with-system-zlib \
- --disable-sjlj-exceptions \
- --disable-multilib \
- --enable-threads=posix \
- --disable-libsanitizer \
- --disable-libssp
-}
diff --git a/steps/gcc-10.4.0/patches/fix-autoreconf.patch b/steps/gcc-10.4.0/patches/fix-autoreconf.patch
@@ -1,37 +0,0 @@
-SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-SPDX-FileCopyrightText: 2022 Thomas Schwinge <thomas@codesourcery.com>
-
-SPDX-License-Identifier: GPL-3.0-or-later
-
-Backport of commit 25861cf3a88a07c8dca3fb32d098c0ad756bbe38
-
-====
-
-[PATCH] Make 'autoreconf' work for 'gcc', 'libobjc'
-
-With that, we may then run plain 'autoreconf' for all of GCC's subpackages,
-instead of for some of those (that don't use Automake) manually having to run
-the applicable combination of 'aclocal', 'autoconf', 'autoheader'.
-
-See also 'AC_CONFIG_MACRO_DIRS'/'AC_CONFIG_MACRO_DIR' usage elsewhere.
-
---- gcc-10.4.0/gcc/configure.ac 2023-01-22 16:22:57.833166450 +1100
-+++ gcc-10.4.0/gcc/configure.ac 2023-01-22 16:23:08.971274603 +1100
-@@ -25,6 +25,7 @@
-
- AC_INIT
- AC_CONFIG_SRCDIR(tree.c)
-+AC_CONFIG_MACRO_DIRS([../config] [..])
- AC_CONFIG_HEADER(auto-host.h:config.in)
-
- gcc_version=`cat $srcdir/BASE-VER`
---- gcc-10.4.0/libobjc/configure.ac 2023-01-22 16:23:42.648601085 +1100
-+++ gcc-10.4.0/libobjc/configure.ac 2023-01-22 16:23:28.937468262 +1100
-@@ -20,6 +20,7 @@
-
- AC_INIT(package-unused, version-unused,, libobjc)
- AC_CONFIG_SRCDIR([objc/objc.h])
-+AC_CONFIG_MACRO_DIRS([../config] [..])
- GCC_TOPLEV_SUBDIRS
-
- # We need the following definitions because AC_PROG_LIBTOOL relies on them
diff --git a/steps/gcc-10.4.0/patches/includes.patch b/steps/gcc-10.4.0/patches/includes.patch
@@ -1,25 +0,0 @@
-SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-
-SPDX-License-Identifier: GPL-3.0-or-later
-
-Two fold issue.
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63966
-Pre-5.0 GCC does not have a cpuid.h header installed on the system, so
-we use the one from this source tree.
-
-https://stackoverflow.com/questions/22160093/inconsistent-operand-constraints-in-an-asm
-Pre-5.0 GCC does not support PIC inline ASM that touches ebx (as
-presumably the cpuid call does); so we must disable PIC.
-
---- gcc-10.4.0/libgcc/Makefile.in 2023-01-25 16:03:45.928059755 +1100
-+++ gcc-10.4.0/libgcc/Makefile.in 2023-01-25 16:04:06.711464255 +1100
-@@ -282,7 +282,7 @@
- # subdirectory rather than in the source directory.
- # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file
- # currently being compiled, in both source trees, to be examined as well.
--INCLUDES = -I. -I$(@D) -I$(gcc_objdir) \
-+INCLUDES = -I. -I$(@D) -I$(gcc_objdir) -I../../gcc/include -fno-pic \
- -I$(srcdir) -I$(srcdir)/$(@D) -I$(srcdir)/../gcc \
- -I$(srcdir)/../include $(DECNUMINC)
-
diff --git a/steps/gcc-10.4.0/patches/libgcc-xfmode.patch b/steps/gcc-10.4.0/patches/libgcc-xfmode.patch
@@ -1,120 +0,0 @@
-SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-SPDX-FileCopyrightText: 2022 Christophe Lyon <christophe.lyon@arm.com>
-
-SPDX-License-Identifier: GPL-3.0-or-later
-
-In our context, some construct has decided that we don't support
-XF mode (which is not true for the architecture, in general, as
-this patch supports, but is sufficient for our strange environment).
-
-Backport of commit 43ccb7e445329dd9557b42e7289a87a8071ab0f7.
-
-[PATCH] libgcc: Enable XF mode conversions to/from DFP modes only if
- supported
-
-Some targets do not support XF mode (eg AArch64), so don't build the
-corresponding to/from DFP modes convertion routines if
-__LIBGCC_HAS_XF_MODE__ is not defined.
-
-diff --git libgcc/config/libbid/_dd_to_xf.c libgcc/config/libbid/_dd_to_xf.c
-index 5a2abbbb1f4..e4b12e8ac4f 100644
---- gcc-10.4.0/libgcc/config/libbid/_dd_to_xf.c
-+++ gcc-10.4.0/libgcc/config/libbid/_dd_to_xf.c
-@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- XFtype
- __bid_extendddxf (_Decimal64 x) {
- XFtype res;
-@@ -34,3 +35,4 @@ __bid_extendddxf (_Decimal64 x) {
- res = __bid64_to_binary80 (ux.i);
- return (res);
- }
-+#endif
-diff --git libgcc/config/libbid/_sd_to_xf.c libgcc/config/libbid/_sd_to_xf.c
-index 9af09913684..288ccb25075 100644
---- gcc-10.4.0/libgcc/config/libbid/_sd_to_xf.c
-+++ gcc-10.4.0/libgcc/config/libbid/_sd_to_xf.c
-@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- XFtype
- __bid_extendsdxf (_Decimal32 x) {
- XFtype res;
-@@ -34,3 +35,4 @@ __bid_extendsdxf (_Decimal32 x) {
- res = __bid32_to_binary80 (ux.i);
- return (res);
- }
-+#endif
-diff --git libgcc/config/libbid/_td_to_xf.c libgcc/config/libbid/_td_to_xf.c
-index b0c76a71497..e990282162d 100644
---- gcc-10.4.0/libgcc/config/libbid/_td_to_xf.c
-+++ gcc-10.4.0/libgcc/config/libbid/_td_to_xf.c
-@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- XFtype
- __bid_trunctdxf (_Decimal128 x) {
- XFtype res;
-@@ -34,3 +35,4 @@ __bid_trunctdxf (_Decimal128 x) {
- res = __bid128_to_binary80 (ux.i);
- return (res);
- }
-+#endif
-diff --git libgcc/config/libbid/_xf_to_dd.c libgcc/config/libbid/_xf_to_dd.c
-index 9feb0f2c3d6..e3246a1c2e1 100644
---- gcc-10.4.0/libgcc/config/libbid/_xf_to_dd.c
-+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_dd.c
-@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- _Decimal64
- __bid_truncxfdd (XFtype x) {
- union decimal64 res;
- res.i = __binary80_to_bid64 (x);
- return (res.d);
- }
-+#endif
-diff --git libgcc/config/libbid/_xf_to_sd.c libgcc/config/libbid/_xf_to_sd.c
-index 7d46548af6c..9147e979182 100644
---- gcc-10.4.0/libgcc/config/libbid/_xf_to_sd.c
-+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_sd.c
-@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- _Decimal32
- __bid_truncxfsd (XFtype x) {
- union decimal32 res;
- res.i = __binary80_to_bid32 (x);
- return (res.d);
- }
-+#endif
-diff --git libgcc/config/libbid/_xf_to_td.c libgcc/config/libbid/_xf_to_td.c
-index 07987fdcc3a..c8d102b0b7f 100644
---- gcc-10.4.0/libgcc/config/libbid/_xf_to_td.c
-+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_td.c
-@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include "bid_functions.h"
- #include "bid_gcc_intrinsics.h"
-
-+#ifdef __LIBGCC_HAS_XF_MODE__
- _Decimal128
- __bid_extendxftd (XFtype x) {
- union decimal128 res;
- res.i = __binary80_to_bid128 (x);
- return (res.d);
- }
-+#endif
---
-2.31.1
-
diff --git a/steps/gcc-10.4.0/patches/new-gettext.patch b/steps/gcc-10.4.0/patches/new-gettext.patch
@@ -1,17 +0,0 @@
-SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-
-SPDX-License-Identifier: GPL-3.0-or-later
-
-In new gettext external is required for AM_GNU_GETTEXT.
-
---- gcc-10.4.0/intl/configure.ac 2023-02-07 18:43:58.989786230 +1100
-+++ gcc-10.4.0/intl/configure.ac 2023-02-07 18:43:02.182632631 +1100
-@@ -4,7 +4,7 @@
- AC_CONFIG_HEADER(config.h)
- AC_CONFIG_MACRO_DIR(../config)
- AM_GNU_GETTEXT_VERSION(0.12.1)
--AM_GNU_GETTEXT([], [need-ngettext])
-+AM_GNU_GETTEXT([external], [need-ngettext])
-
- # This replaces the extensive use of DEFS in the original Makefile.in.
- AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])
diff --git a/steps/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch b/steps/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch
@@ -1,18 +0,0 @@
-SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
-
-SPDX-License-Identifier: GPL-3.0-or-later
-
-GCC 4.7 doesn't have fisolate-erroneous-paths-dereference. Hence
-this line does nothing.
-
---- gcc-10.4.0/libgcc/generic-morestack.c 2023-01-25 16:52:35.382471998 +1100
-+++ gcc-10.4.0/libgcc/generic-morestack.c 2023-01-25 16:52:40.773585043 +1100
-@@ -23,8 +23,6 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
--#pragma GCC optimize ("no-isolate-erroneous-paths-dereference")
--
- /* powerpc 32-bit not supported. */
- #if !defined __powerpc__ || defined __powerpc64__
-
diff --git a/steps/gcc-10.4.0/sources b/steps/gcc-10.4.0/sources
@@ -1 +0,0 @@
-http://mirrors.kernel.org/gnu/gcc/gcc-10.4.0/gcc-10.4.0.tar.xz c9297d5bcd7cb43f3dfc2fed5389e948c9312fd962ef6a4ce455cff963ebe4f1
diff --git a/steps/gcc-10.5.0/files/decDPD.h.preamble b/steps/gcc-10.5.0/files/decDPD.h.preamble
@@ -0,0 +1 @@
+../../gcc-4.7.4/files/decDPD.h.preamble
+\ No newline at end of file
diff --git a/steps/gcc-10.5.0/files/decDPD_generate.c b/steps/gcc-10.5.0/files/decDPD_generate.c
@@ -0,0 +1 @@
+../../gcc-4.7.4/files/decDPD_generate.c
+\ No newline at end of file
diff --git a/steps/gcc-10.5.0/pass1.sh b/steps/gcc-10.5.0/pass1.sh
@@ -0,0 +1,193 @@
+# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_prepare() {
+ default
+
+ # Remove unused pregenerated files
+ rm libsanitizer/include/sanitizer/netbsd_syscall_hooks.h \
+ libsanitizer/sanitizer_common/sanitizer_syscalls_netbsd.inc
+ rm -r libgfortran/generated
+ rm gcc/testsuite/go.test/test/bench/go1/jsondata_test.go \
+ gcc/testsuite/go.test/test/bench/go1/parserdata_test.go \
+ gcc/testsuite/go.test/test/bench/shootout/mandelbrot.txt
+ rm gcc/testsuite/go.test/test/cmplxdivide1.go
+ rm gcc/testsuite/gcc.target/x86_64/abi/test_3_element_struct_and_unions.c \
+ gcc/testsuite/gcc.target/x86_64/abi/test_basic_returning.c \
+ gcc/testsuite/gcc.target/x86_64/abi/test_passing_floats.c \
+ gcc/testsuite/gcc.target/x86_64/abi/test_passing_integers.c
+ rm gcc/config/rs6000/rs6000-tables.opt \
+ gcc/config/h8300/mova.md \
+ gcc/config/aarch64/aarch64-tune.md \
+ gcc/config/nios2/ldstwm.md \
+ gcc/config/riscv/t-elf-multilib \
+ gcc/config/riscv/t-linux-multilib \
+ gcc/config/arm/arm-tune.md \
+ gcc/config/arm/arm-tables.opt \
+ gcc/config/arm/ldmstm.md \
+ gcc/config/arc/t-multilib \
+ gcc/config/m68k/m68k-tables.opt \
+ gcc/config/c6x/c6x-mult.md \
+ gcc/config/c6x/c6x-tables.opt \
+ gcc/config/c6x/c6x-sched.md \
+ gcc/config/csky/csky_tables.opt \
+ gcc/config/mips/mips-tables.opt
+ rm libphobos/src/std/internal/unicode_tables.d
+ rm libgo/go/math/bits/example_test.go \
+ libgo/go/math/bits/bits_tables.go \
+ libgo/go/math/big/accuracy_string.go \
+ libgo/go/math/big/roundingmode_string.go \
+ libgo/go/strconv/isprint.go \
+ libgo/go/sort/zfuncversion.go \
+ libgo/go/golang.org/x/net/route/zsys_*.go \
+ libgo/go/golang.org/x/net/idna/*.go \
+ libgo/go/golang.org/x/text/unicode/bidi/t*.go \
+ libgo/go/golang.org/x/text/unicode/norm/tables*.go \
+ libgo/go/internal/syscall/windows/registry/zsyscall_windows.go \
+ libgo/go/internal/syscall/windows/zsyscall_windows.go \
+ libgo/go/encoding/gob/*_helpers.go \
+ libgo/go/index/suffixarray/sais2.go \
+ libgo/go/net/http/*_bundle.go \
+ libgo/go/runtime/sizeclasses.go \
+ libgo/go/runtime/fastlog2table.go \
+ libgo/go/html/template/*_string.go \
+ libgo/go/crypto/x509/root_darwin_armx.go \
+ libgo/go/crypto/md5/md5block.go \
+ libgo/go/time/zoneinfo_abbrs_windows.go \
+ libgo/go/unicode/tables.go \
+ libgo/go/regexp/syntax/doc.go \
+ libgo/go/regexp/syntax/op_string.go \
+ libgo/go/regexp/syntax/perl_groups.go \
+ libgo/go/image/internal/imageutil/impl.go \
+ libgo/go/image/color/palette/palette.go \
+ libgo/go/cmd/internal/objabi/*_string.go \
+ libgo/go/debug/dwarf/*_string.go \
+ libgo/go/debug/macho/reloctype_string.go
+ rm libgo/go/internal/xcoff/testdata/bigar* \
+ libgo/go/internal/xcoff/testdata/gcc* \
+ libgo/go/internal/trace/testdata/* \
+ libgo/go/compress/bzip2/testdata/*.bin \
+ libgo/go/go/internal/gccgoimporter/testdata/v1reflect.gox \
+ libgo/go/go/internal/gccgoimporter/testdata/time.gox \
+ libgo/go/go/internal/gccgoimporter/testdata/unicode.gox \
+ libgo/go/go/internal/gccgoimporter/testdata/escapeinfo.gox \
+ libgo/go/go/internal/gccgoimporter/testdata/libimportsar.a \
+ libgo/go/go/internal/gcimporter/testdata/versions/*.a
+ rm -r libgo/go/compress/flate/testdata \
+ libgo/go/runtime/pprof/testdata \
+ libgo/go/debug/*/testdata
+ find fixincludes/tests -name "*.h" -delete
+ # Partially generated unused files
+ rm libgcc/config/sh/lib1funcs.S \
+ libgcc/config/sh/lib1funcs-4-300.S \
+ libgcc/config/arc/lib1funcs.S
+
+ # Remove vendored zlib
+ rm -r zlib/
+
+ # Regen gperf file (because GCC's make rules suck)
+ rm gcc/cp/cfns.h
+ # (taken directly from gcc/cp/Make-lang.in)
+ gperf -o -C -E -k '1-6,$' -j1 -D -N 'libc_name_p' -L C++ \
+ gcc/cp/cfns.gperf --output-file gcc/cp/cfns.h
+
+ # Regenerate autogen stuff
+ rm Makefile.in fixincludes/fixincl.x
+ autogen Makefile.def
+ pushd fixincludes
+ ./genfixes
+ popd
+
+ # Regenerate autotools
+ # configure
+ find . -name configure | sed 's:/configure::' | while read d; do
+ pushd "${d}"
+ AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fiv
+ popd
+ done
+ # Because GCC is stupid, copy depcomp back in
+ cp "${PREFIX}/share/automake-1.15/depcomp" .
+ # Makefile.in only
+ BACK="${PWD}"
+ find . -type d \
+ -exec test -e "{}/Makefile.am" -a ! -e "{}/configure" \; \
+ -print | while read d; do
+ d="$(readlink -f "${d}")"
+ cd "${d}"
+ # Find the appropriate configure script for automake
+ while [ ! -e configure ]; do
+ cd ..
+ done
+ automake-1.15 -fai "${d}/Makefile"
+ cd "${BACK}"
+ done
+
+ # Remove bison generated files
+ rm intl/plural.c
+
+ # Remove flex generated files
+ rm gcc/gengtype-lex.c
+
+ # intl/ Makefile is a bit broken because of new gettext
+ sed -i 's/@USE_INCLUDED_LIBINTL@/no/' intl/Makefile.in
+
+ # Regenerate crc table in libiberty/crc32.c
+ pushd libiberty
+ sed -n -e '38,65p' crc32.c > crcgen.c
+ gcc -o crcgen crcgen.c
+ head -n 69 crc32.c > crc32.c.new
+ ./crcgen >> crc32.c.new
+ tail -n +138 crc32.c >> crc32.c.new
+ mv crc32.c.new crc32.c
+ popd
+
+ # Regenerate decDPD.h
+ rm libdecnumber/decDPD.h
+ gcc -std=c99 -o decDPD_generate decDPD_generate.c
+ cp decDPD.h.preamble libdecnumber/decDPD.h
+ ./decDPD_generate >> libdecnumber/decDPD.h
+
+ # Remove docs/translation
+ find . -name "*.gmo" -delete
+ find . -name "*.info" -delete
+ find . -type f -name '*.[1-9]' -delete
+ rm libiberty/functions.texi
+ # Sphinx-generated
+ rm gcc/jit/docs/conf.py
+ rm gcc/jit/docs/_build/texinfo/libgccjit.texi \
+ gcc/ada/gnat_rm.texi \
+ gcc/ada/gnat_ugn.texi
+
+ rm gcc/doc/avr-mmcu.texi
+ gcc -o gen-avr-mmcu-texi gcc/config/avr/gen-avr-mmcu-texi.c
+ ./gen-avr-mmcu-texi > gcc/doc/avr-mmcu.texi
+}
+
+src_configure() {
+ mkdir build
+ cd build
+
+ # std=gnu11 is the default for GCC10, so that is what it makes most
+ # sense to build with. (default, std=gnu90 is too outdated).
+ # For this GCC, we only build one stage, as extra is superfluous,
+ # since we build GCC 12 straight after.
+ CFLAGS="-std=gnu11" \
+ LDFLAGS="-static" \
+ ../configure \
+ --prefix="${PREFIX}" \
+ --libdir="${LIBDIR}" \
+ --build=i386-unknown-linux-musl \
+ --target=i386-unknown-linux-musl \
+ --host=i386-unknown-linux-musl \
+ --disable-bootstrap \
+ --enable-static \
+ --program-transform-name= \
+ --enable-languages=c,c++ \
+ --with-system-zlib \
+ --disable-sjlj-exceptions \
+ --disable-multilib \
+ --enable-threads=posix \
+ --disable-libsanitizer \
+ --disable-libssp
+}
diff --git a/steps/gcc-10.5.0/patches/fix-autoreconf.patch b/steps/gcc-10.5.0/patches/fix-autoreconf.patch
@@ -0,0 +1,37 @@
+SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+SPDX-FileCopyrightText: 2022 Thomas Schwinge <thomas@codesourcery.com>
+
+SPDX-License-Identifier: GPL-3.0-or-later
+
+Backport of commit 25861cf3a88a07c8dca3fb32d098c0ad756bbe38
+
+====
+
+[PATCH] Make 'autoreconf' work for 'gcc', 'libobjc'
+
+With that, we may then run plain 'autoreconf' for all of GCC's subpackages,
+instead of for some of those (that don't use Automake) manually having to run
+the applicable combination of 'aclocal', 'autoconf', 'autoheader'.
+
+See also 'AC_CONFIG_MACRO_DIRS'/'AC_CONFIG_MACRO_DIR' usage elsewhere.
+
+--- gcc-10.5.0/gcc/configure.ac 2023-01-22 16:22:57.833166450 +1100
++++ gcc-10.5.0/gcc/configure.ac 2023-01-22 16:23:08.971274603 +1100
+@@ -25,6 +25,7 @@
+
+ AC_INIT
+ AC_CONFIG_SRCDIR(tree.c)
++AC_CONFIG_MACRO_DIRS([../config] [..])
+ AC_CONFIG_HEADER(auto-host.h:config.in)
+
+ gcc_version=`cat $srcdir/BASE-VER`
+--- gcc-10.5.0/libobjc/configure.ac 2023-01-22 16:23:42.648601085 +1100
++++ gcc-10.5.0/libobjc/configure.ac 2023-01-22 16:23:28.937468262 +1100
+@@ -20,6 +20,7 @@
+
+ AC_INIT(package-unused, version-unused,, libobjc)
+ AC_CONFIG_SRCDIR([objc/objc.h])
++AC_CONFIG_MACRO_DIRS([../config] [..])
+ GCC_TOPLEV_SUBDIRS
+
+ # We need the following definitions because AC_PROG_LIBTOOL relies on them
diff --git a/steps/gcc-10.5.0/patches/includes.patch b/steps/gcc-10.5.0/patches/includes.patch
@@ -0,0 +1,25 @@
+SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-3.0-or-later
+
+Two fold issue.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63966
+Pre-5.0 GCC does not have a cpuid.h header installed on the system, so
+we use the one from this source tree.
+
+https://stackoverflow.com/questions/22160093/inconsistent-operand-constraints-in-an-asm
+Pre-5.0 GCC does not support PIC inline ASM that touches ebx (as
+presumably the cpuid call does); so we must disable PIC.
+
+--- gcc-10.5.0/libgcc/Makefile.in 2023-01-25 16:03:45.928059755 +1100
++++ gcc-10.5.0/libgcc/Makefile.in 2023-01-25 16:04:06.711464255 +1100
+@@ -282,7 +282,7 @@
+ # subdirectory rather than in the source directory.
+ # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file
+ # currently being compiled, in both source trees, to be examined as well.
+-INCLUDES = -I. -I$(@D) -I$(gcc_objdir) \
++INCLUDES = -I. -I$(@D) -I$(gcc_objdir) -I../../gcc/include -fno-pic \
+ -I$(srcdir) -I$(srcdir)/$(@D) -I$(srcdir)/../gcc \
+ -I$(srcdir)/../include $(DECNUMINC)
+
diff --git a/steps/gcc-10.5.0/patches/libgcc-xfmode.patch b/steps/gcc-10.5.0/patches/libgcc-xfmode.patch
@@ -0,0 +1,120 @@
+SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+SPDX-FileCopyrightText: 2022 Christophe Lyon <christophe.lyon@arm.com>
+
+SPDX-License-Identifier: GPL-3.0-or-later
+
+In our context, some construct has decided that we don't support
+XF mode (which is not true for the architecture, in general, as
+this patch supports, but is sufficient for our strange environment).
+
+Backport of commit 43ccb7e445329dd9557b42e7289a87a8071ab0f7.
+
+[PATCH] libgcc: Enable XF mode conversions to/from DFP modes only if
+ supported
+
+Some targets do not support XF mode (eg AArch64), so don't build the
+corresponding to/from DFP modes convertion routines if
+__LIBGCC_HAS_XF_MODE__ is not defined.
+
+diff --git libgcc/config/libbid/_dd_to_xf.c libgcc/config/libbid/_dd_to_xf.c
+index 5a2abbbb1f4..e4b12e8ac4f 100644
+--- gcc-10.5.0/libgcc/config/libbid/_dd_to_xf.c
++++ gcc-10.5.0/libgcc/config/libbid/_dd_to_xf.c
+@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ XFtype
+ __bid_extendddxf (_Decimal64 x) {
+ XFtype res;
+@@ -34,3 +35,4 @@ __bid_extendddxf (_Decimal64 x) {
+ res = __bid64_to_binary80 (ux.i);
+ return (res);
+ }
++#endif
+diff --git libgcc/config/libbid/_sd_to_xf.c libgcc/config/libbid/_sd_to_xf.c
+index 9af09913684..288ccb25075 100644
+--- gcc-10.5.0/libgcc/config/libbid/_sd_to_xf.c
++++ gcc-10.5.0/libgcc/config/libbid/_sd_to_xf.c
+@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ XFtype
+ __bid_extendsdxf (_Decimal32 x) {
+ XFtype res;
+@@ -34,3 +35,4 @@ __bid_extendsdxf (_Decimal32 x) {
+ res = __bid32_to_binary80 (ux.i);
+ return (res);
+ }
++#endif
+diff --git libgcc/config/libbid/_td_to_xf.c libgcc/config/libbid/_td_to_xf.c
+index b0c76a71497..e990282162d 100644
+--- gcc-10.5.0/libgcc/config/libbid/_td_to_xf.c
++++ gcc-10.5.0/libgcc/config/libbid/_td_to_xf.c
+@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ XFtype
+ __bid_trunctdxf (_Decimal128 x) {
+ XFtype res;
+@@ -34,3 +35,4 @@ __bid_trunctdxf (_Decimal128 x) {
+ res = __bid128_to_binary80 (ux.i);
+ return (res);
+ }
++#endif
+diff --git libgcc/config/libbid/_xf_to_dd.c libgcc/config/libbid/_xf_to_dd.c
+index 9feb0f2c3d6..e3246a1c2e1 100644
+--- gcc-10.5.0/libgcc/config/libbid/_xf_to_dd.c
++++ gcc-10.5.0/libgcc/config/libbid/_xf_to_dd.c
+@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ _Decimal64
+ __bid_truncxfdd (XFtype x) {
+ union decimal64 res;
+ res.i = __binary80_to_bid64 (x);
+ return (res.d);
+ }
++#endif
+diff --git libgcc/config/libbid/_xf_to_sd.c libgcc/config/libbid/_xf_to_sd.c
+index 7d46548af6c..9147e979182 100644
+--- gcc-10.5.0/libgcc/config/libbid/_xf_to_sd.c
++++ gcc-10.5.0/libgcc/config/libbid/_xf_to_sd.c
+@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ _Decimal32
+ __bid_truncxfsd (XFtype x) {
+ union decimal32 res;
+ res.i = __binary80_to_bid32 (x);
+ return (res.d);
+ }
++#endif
+diff --git libgcc/config/libbid/_xf_to_td.c libgcc/config/libbid/_xf_to_td.c
+index 07987fdcc3a..c8d102b0b7f 100644
+--- gcc-10.5.0/libgcc/config/libbid/_xf_to_td.c
++++ gcc-10.5.0/libgcc/config/libbid/_xf_to_td.c
+@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #include "bid_functions.h"
+ #include "bid_gcc_intrinsics.h"
+
++#ifdef __LIBGCC_HAS_XF_MODE__
+ _Decimal128
+ __bid_extendxftd (XFtype x) {
+ union decimal128 res;
+ res.i = __binary80_to_bid128 (x);
+ return (res.d);
+ }
++#endif
+--
+2.31.1
+
diff --git a/steps/gcc-10.5.0/patches/new-gettext.patch b/steps/gcc-10.5.0/patches/new-gettext.patch
@@ -0,0 +1,17 @@
+SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-3.0-or-later
+
+In new gettext external is required for AM_GNU_GETTEXT.
+
+--- gcc-10.5.0/intl/configure.ac 2023-02-07 18:43:58.989786230 +1100
++++ gcc-10.5.0/intl/configure.ac 2023-02-07 18:43:02.182632631 +1100
+@@ -4,7 +4,7 @@
+ AC_CONFIG_HEADER(config.h)
+ AC_CONFIG_MACRO_DIR(../config)
+ AM_GNU_GETTEXT_VERSION(0.12.1)
+-AM_GNU_GETTEXT([], [need-ngettext])
++AM_GNU_GETTEXT([external], [need-ngettext])
+
+ # This replaces the extensive use of DEFS in the original Makefile.in.
+ AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])
diff --git a/steps/gcc-10.5.0/patches/no-isolate-erroneous-paths-dereference.patch b/steps/gcc-10.5.0/patches/no-isolate-erroneous-paths-dereference.patch
@@ -0,0 +1,18 @@
+SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-3.0-or-later
+
+GCC 4.7 doesn't have fisolate-erroneous-paths-dereference. Hence
+this line does nothing.
+
+--- gcc-10.5.0/libgcc/generic-morestack.c 2023-01-25 16:52:35.382471998 +1100
++++ gcc-10.5.0/libgcc/generic-morestack.c 2023-01-25 16:52:40.773585043 +1100
+@@ -23,8 +23,6 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+-#pragma GCC optimize ("no-isolate-erroneous-paths-dereference")
+-
+ /* powerpc 32-bit not supported. */
+ #if !defined __powerpc__ || defined __powerpc64__
+
diff --git a/steps/gcc-10.5.0/sources b/steps/gcc-10.5.0/sources
@@ -0,0 +1 @@
+http://ftp.gnu.org/gnu/gcc/gcc-10.5.0/gcc-10.5.0.tar.xz 25109543fdf46f397c347b5d8b7a2c7e5694a5a51cce4b9c6e1ea8a71ca307c1
diff --git a/steps/gcc-13.3.0/files/decDPD.h.preamble b/steps/gcc-13.3.0/files/decDPD.h.preamble
@@ -1 +1 @@
-../../gcc-10.4.0/files/decDPD.h.preamble
-\ No newline at end of file
+../../gcc-10.5.0/files/decDPD.h.preamble
+\ No newline at end of file
diff --git a/steps/gcc-13.3.0/files/decDPD_generate.c b/steps/gcc-13.3.0/files/decDPD_generate.c
@@ -1 +1 @@
-../../gcc-10.4.0/files/decDPD_generate.c
-\ No newline at end of file
+../../gcc-10.5.0/files/decDPD_generate.c
+\ No newline at end of file
diff --git a/steps/manifest b/steps/manifest
@@ -195,7 +195,7 @@ build: python-3.8.16
build: python-3.11.1
uninstall: python-2.0.1 python-2.3.7 python-3.1.5 python-3.3.7 python-3.4.10 python-3.8.16
jump: break ( INTERNAL_CI == pass1 ) # scripts are generated in pass1
-build: gcc-10.4.0
+build: gcc-10.5.0
build: binutils-2.41
build: gcc-13.3.0
build: grub-2.06 ( BUILD_LINUX == True )