diff --git a/steps-guix/gcc-15.2.0/files/decDPD.h.preamble b/steps-guix/gcc-15.2.0/files/decDPD.h.preamble
new file mode 100644
index 00000000..198049d7
--- /dev/null
+++ b/steps-guix/gcc-15.2.0/files/decDPD.h.preamble
@@ -0,0 +1,59 @@
+// SPDX-FileCopyrightText: 2007, 2009 Free Software Foundation, Inc.
+// SPDX-License-Identifier: GPL-3.0-or-later
+/* Conversion lookup tables for the decNumber C Library.
+ Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Contributed by IBM Corporation. Author Mike Cowlishaw.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+. */
+
+/* ------------------------------------------------------------------------ */
+/* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */
+/* [Automatically generated -- do not edit. 2008.06.21] */
+/* ------------------------------------------------------------------------ */
+/* For details, see DPDecimal.html on the General Decimal Arithmetic page. */
+
+#include "decDPDSymbols.h"
+
+/* This include file defines several DPD and BCD conversion tables: */
+/* */
+/* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */
+/* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */
+/* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */
+/* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */
+/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
+/* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */
+/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
+/* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */
+/* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */
+/* */
+/* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */
+/* in the table entry. BIN2CHAR entries are a single byte length (0 for */
+/* value 0) followed by three digit characters; a trailing terminator is */
+/* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */
+/* are similar with the three BCD8 digits followed by a one-byte length */
+/* (again, length=0 for value 0). */
+/* */
+/* To use a table, its name, prefixed with DEC_, must be defined with a */
+/* value of 1 before this header file is included. For example: */
+/* #define DEC_BCD2DPD 1 */
+/* This mechanism allows software to only include tables that are needed. */
+/* ------------------------------------------------------------------------ */
diff --git a/steps-guix/gcc-15.2.0/files/decDPD_generate.c b/steps-guix/gcc-15.2.0/files/decDPD_generate.c
new file mode 100644
index 00000000..57d4829b
--- /dev/null
+++ b/steps-guix/gcc-15.2.0/files/decDPD_generate.c
@@ -0,0 +1,228 @@
+// SPDX-FileCopyrightText: 2025 Samuel Tyler
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include
+#include
+#include
+
+/*
+ * Creates decDPD.h.
+ * Based upon the algorithm given on;
+ * https://web.archive.org/web/20080308073422/http://www2.hursley.ibm.com/decimal/DPDecimal.html
+ * originally written in the (obsolete) language Rexx.
+ *
+ * Is not bit-for-bit identical to the original decDPD.h, as we don't bother
+ * to follow the same formatting.
+ *
+ * The original Rexx code follows;
+ */
+
+// /* dpdGenerate.rex -- display Densely Packed Decimal table */
+// /* mfc 2000.10.03; Rexx version with new equations 2007.02.01 */
+//
+// do i=0 to 999
+// bcd=right(i, 3, 0) -- make three-digit hexadecimal string
+// bit10=bcd2dpd(x2b(bcd)) -- compress
+// bit12=dpd2bcd(bit10) -- expand
+// say bcd bit10 bit12 -- display
+// end i
+// exit
+//
+// /* bcd2dpd -- Compress BCD to Densely Packed Decimal
+// argument is a string of 12 characters, each 0 or 1, being 3 digits
+// of 4 bits, each being a valid BCD digit (0000-1001)
+// (for example, 923 is 100100100011)
+// result is a string of 10 characters, each 0 or 1
+// (for the example, this would be 1001010011)
+// */
+// bcd2dpd: procedure
+// -- assign each bit to a variable, named as in the description
+// parse arg a +1 b +1 c +1 d +1 e +1 f +1 g +1 h +1 i +1 j +1 k +1 m +1
+//
+// -- derive the result bits, using boolean expressions only
+// -- [the operators are: '&'=AND, '|'=OR, '\'=NOT.]
+// p=b | (a & j) | (a & f & i)
+// q=c | (a & k) | (a & g & i)
+// r=d
+// s=(f & (\a | \i)) | (\a & e & j) | (e & i)
+// t=g | (\a & e &k;) | (a & i)
+// u=h
+// v=a | e | i
+// w=a | (e & i) | (\e & j)
+// x=e | (a & i) | (\a & k)
+// y=m
+// -- concatenate the bits and return
+// return p||q||r||s||t||u||v||w||x||y
+//
+// /* dpd2bcd -- Expand Densely Packed Decimal to BCD
+// argument is a string of 10 characters, each 0 or 1; all 1024
+// possibilities are accepted (non-canonicals -> 999)
+// (for example, 1001010011)
+// result is a string of 12 characters, each 0 or 1
+// (for the example, 100100100011 -- 923)
+// */
+// dpd2bcd: procedure
+// -- assign each bit to a variable, named as in the description
+// parse arg p +1 q +1 r +1 s +1 t +1 u +1 v +1 w +1 x +1 y +1
+//
+// -- derive the result bits, using boolean expressions only
+// a= (v & w) & (\s | t | \x)
+// b=p & (\v | \w | (s & \t & x))
+// c=q & (\v | \w | (s & \t & x))
+// d=r
+// e=v & ((\w & x) | (\t & x) | (s & x))
+// f=(s & (\v | \x)) | (p & \s & t & v & w & x)
+// g=(t & (\v | \x)) | (q & \s & t & w)
+// h=u
+// i=v & ((\w & \x) | (w & x & (s | t)))
+// j=(\v & w) | (s & v & \w & x) | (p & w & (\x | (\s & \t)))
+// k=(\v & x) | (t & \w & x) | (q & v & w & (\x | (\s & \t)))
+// m=y
+// -- concatenate the bits and return
+// return a||b||c||d||e||f||g||h||i||j||k||m
+
+void int2boolarr(uint32_t num, bool *arr, int bits) {
+ int j = 0;
+ for (int i = bits - 1; i >= 0; i--) {
+ arr[j++] = (num >> i) & 0x1;
+ }
+}
+
+uint32_t boolarr2int(bool *dpd, int bits) {
+ uint32_t num = 0;
+ int j = 0;
+ for (int i = bits - 1; i >= 0; i--) {
+ num |= dpd[j++] << i;
+ }
+ return num;
+}
+
+uint32_t bcd2dpd(uint16_t ibcd) {
+ bool bcd[12];
+ int2boolarr(ibcd, bcd, 12);
+
+ bool dpd[10];
+ dpd[0] = bcd[1] | (bcd[0] & bcd[9]) | (bcd[0] & bcd[5] & bcd[8]);
+ dpd[1] = bcd[2] | (bcd[0] & bcd[10]) | (bcd[0] & bcd[6] & bcd[8]);
+ dpd[2] = bcd[3];
+ dpd[3] = (bcd[5] & (~bcd[0] | ~bcd[8])) | (~bcd[0] & bcd[4] & bcd[9]) | (bcd[4] & bcd[8]);
+ dpd[4] = bcd[6] | (~bcd[0] & bcd[4] & bcd[10]) | (bcd[0] & bcd[8]);
+ dpd[5] = bcd[7];
+ dpd[6] = bcd[0] | bcd[4] | bcd[8];
+ dpd[7] = bcd[0] | (bcd[4] & bcd[8]) | (~bcd[4] & bcd[9]);
+ dpd[8] = bcd[4] | (bcd[0] & bcd[8]) | (~bcd[0] & bcd[10]);
+ dpd[9] = bcd[11];
+
+ return boolarr2int(dpd, 10);
+}
+
+uint32_t dpd2bcd(uint32_t idpd) {
+ bool dpd[10];
+ int2boolarr(idpd, dpd, 10);
+
+ bool bcd[12];
+ bcd[0] = (dpd[6] & dpd[7]) & (~dpd[3] | dpd[4] | ~dpd[8]);
+ bcd[1] = dpd[0] & (~dpd[6] | ~dpd[7] | (dpd[3] & ~dpd[4] & dpd[8]));
+ bcd[2] = dpd[1] & (~dpd[6] | ~dpd[7] | (dpd[3] & ~dpd[4] & dpd[8]));
+ bcd[3] = dpd[2];
+ bcd[4] = dpd[6] & ((~dpd[7] & dpd[8]) | (~dpd[4] & dpd[8]) | (dpd[3] & dpd[8]));
+ bcd[5] = (dpd[3] & (~dpd[6] | ~dpd[8])) | (dpd[0] & ~dpd[3] & dpd[4] & dpd[6] & dpd[7] & dpd[8]);
+ bcd[6] = (dpd[4] & (~dpd[6] | ~dpd[8])) | (dpd[1] & ~dpd[3] & dpd[4] & dpd[7]);
+ bcd[7] = dpd[5];
+ bcd[8] = dpd[6] & ((~dpd[7] & ~dpd[8]) | (dpd[7] & dpd[8] & (dpd[3] | dpd[4])));
+ bcd[9] = (~dpd[6] & dpd[7]) | (dpd[3] & dpd[6] & ~dpd[7] & dpd[8]) | (dpd[0] & dpd[7] & (~dpd[8] | (~dpd[3] & ~dpd[4])));
+ bcd[10] = (~dpd[6] & dpd[8]) | (dpd[4] & ~dpd[7] & dpd[8]) | (dpd[1] & dpd[6] & dpd[7] & (~dpd[8] | (~dpd[3] & ~dpd[4])));
+ bcd[11] = dpd[9];
+
+ return boolarr2int(bcd, 12);
+}
+
+uint8_t get_cntrl_char(uint8_t num) {
+ if (num == 0) {
+ return 0;
+ } else if (num < 10) {
+ return 1;
+ } else if (num < 100) {
+ return 2;
+ } else {
+ return 3;
+ }
+}
+
+void bin2char(uint8_t num, uint32_t str[4]) {
+ str[0] = get_cntrl_char(num);
+ str[1] = num / 100 + '0';
+ str[2] = (num % 100) / 10 + '0';
+ str[3] = num % 10 + '0';
+}
+
+void bin2bcd8(uint8_t num, char digit[4], uint32_t arr[4]) {
+ for (int i = 0; i < 3; i++) {
+ arr[i] = digit[i] - '0';
+ }
+ arr[3] = get_cntrl_char(num);
+}
+
+#define TABLES_COUNT 9
+
+int main(void) {
+ uint32_t BCD2DPD[2458] = {0};
+ uint32_t BIN2DPD[1000] = {0};
+ uint32_t BIN2BCD8[4000];
+ uint32_t BIN2CHAR[4001];
+ uint32_t DPD2BCD[1024] = {0};
+ uint32_t DPD2BIN[1024] = {0};
+ uint32_t DPD2BINK[1024] = {0};
+ uint32_t DPD2BINM[1024] = {0};
+ uint32_t DPD2BCD8[4096];
+
+ for (int i = 0; i < 1000; i++) {
+ char digit[4];
+ snprintf(digit, 4, "%03d", i);
+ uint32_t bcd = 0;
+ for (int j = 0; j < 3; j++) {
+ bcd |= (digit[j] - '0') << (4 * (2 - j));
+ }
+
+ uint32_t dpd = bcd2dpd(bcd);
+ BCD2DPD[bcd] = dpd;
+ DPD2BCD[dpd] = bcd;
+ BIN2DPD[i] = dpd;
+ DPD2BIN[dpd] = i;
+ DPD2BINK[dpd] = i * 1000;
+ DPD2BINM[dpd] = i * 1E+6;
+
+ bin2char(i, BIN2CHAR + (4 * i));
+ bin2bcd8(i, digit, BIN2BCD8 + (4 * i));
+ bin2bcd8(i, digit, DPD2BCD8 + (4 * dpd));
+ }
+ BIN2CHAR[4000] = '\0';
+
+ char *names[] = {
+ "BCD2DPD", "BIN2DPD", "BIN2CHAR", "BIN2BCD8", "DPD2BCD", "DPD2BIN",
+ "DPD2BINK", "DPD2BINM", "DPD2BCD8",
+ };
+ char *types[] = {
+ "uint16_t", "uint16_t", "uint8_t", "uint8_t", "uint16_t", "uint16_t",
+ "uint32_t", "uint32_t", "uint8_t",
+ };
+ uint32_t *data[] = {
+ BCD2DPD, BIN2DPD, BIN2CHAR, BIN2BCD8, DPD2BCD, DPD2BIN,
+ DPD2BINK, DPD2BINM, DPD2BCD8,
+ };
+ int lengths[] = {2458, 1000, 4001, 4000, 1024, 1024, 1024, 1024, 4096};
+
+ for (int i = 0; i < TABLES_COUNT; i++) {
+ printf("#if defined(DEC_%s) && DEC_%s==1 && !defined(DEC%s)\n", names[i], names[i], names[i]);
+ printf("#define DEC%s\n", names[i]);
+ printf("const %s %s[%d] = {\n", types[i], names[i], lengths[i]);
+ for (int j = 0; j < lengths[i] / 16; j++) {
+ for (int k = j * 16; k < (j + 1) * 16 && k < lengths[i]; k++) {
+ printf("%s%d,", k == j * 16 ? "" : " ", data[i][k]);
+ }
+ printf("\n");
+ }
+ printf("};\n");
+ printf("#endif\n\n");
+ }
+}
diff --git a/steps-guix/gcc-15.2.0/pass1.sh b/steps-guix/gcc-15.2.0/pass1.sh
new file mode 100644
index 00000000..61111a10
--- /dev/null
+++ b/steps-guix/gcc-15.2.0/pass1.sh
@@ -0,0 +1,279 @@
+# SPDX-FileCopyrightText: 2023 Samuel Tyler
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# This gcc build targets the 64-bit kernel toolchain and keeps multilib enabled
+# so the compiler can emit both 64-bit and 32-bit code.
+
+: "${KERNEL_TARGET:=x86_64-unknown-linux-musl}"
+: "${KERNEL_SYSROOT:=/kernel-toolchain}"
+
+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/cmplxdivide1.go \
+ gcc/testsuite/go.test/test/fixedbugs/issue6866.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 \
+ gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/test_passing_floats.c \
+ gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/test_basic_returning.c \
+ gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c \
+ gcc/testsuite/gcc.target/x86_64/abi/bf16/test_passing_floats.c \
+ gcc/testsuite/gcc.target/x86_64/abi/bf16/test_3_element_struct_and_unions.c
+ rm gcc/testsuite/c-c++-common/analyzer/flex-with-call-summaries.c \
+ gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c
+ rm gcc/testsuite/gdc.test/compilable/dtoh_windows.d
+ rm gcc/testsuite/sarif-replay.dg/2.1.0-valid/malloc-vs-local-4.c.sarif \
+ gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1.c.sarif
+
+ rm gcc/testsuite/gm2/projects/pim/run/pass/tower/advflex.c \
+ gcc/testsuite/gm2/projects/pim/run/pass/tower/AdvParse.mod
+ rm -r gcc/testsuite/gdc.test/compilable
+ rm gcc/config/rs6000/rs6000-tables.opt \
+ gcc/config/rs6000/fusion.md \
+ gcc/config/h8300/mova.md \
+ gcc/config/aarch64/aarch64-tune.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 \
+ gcc/config/nvptx/nvptx-gen.opt \
+ gcc/config/nvptx/nvptx-gen.h
+ rm libphobos/src/std/internal/unicode_tables.d \
+ libphobos/src/std/internal/unicode_decomp.d \
+ libphobos/src/std/internal/unicode_grapheme.d \
+ libphobos/src/std/internal/unicode_norm.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/strconv/eisel_lemire.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/golang.org/x/tools/internal/typeparams/typeterm.go \
+ libgo/go/golang.org/x/tools/internal/typeparams/termlist.go \
+ libgo/go/golang.org/x/crypto/curve25519/internal/field/fe_amd64.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/md5/md5block.go \
+ libgo/go/crypto/tls/common_string.go \
+ libgo/go/crypto/elliptic/internal/fiat/p*.go \
+ libgo/go/crypto/ed25519/internal/edwards25519/field/fe_amd64.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/cmd/go/internal/test/flagdefs.go \
+ libgo/go/debug/dwarf/*_string.go \
+ libgo/go/debug/macho/reloctype_string.go \
+ libgo/go/internal/goexperiment/exp_*.go \
+ libgo/go/time/tzdata/zipdata.go \
+ libgo/go/go/constant/kind_string.go
+ rm 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/*/testdata \
+ libgo/go/runtime/pprof/testdata \
+ libgo/go/debug/*/testdata \
+ libgo/go/internal/trace/testdata \
+ libgo/go/time/testdata \
+ libgo/go/internal/xcoff/testdata \
+ libgo/go/archive/*/testdata
+ rm gcc/d/dmd/common/identifiertables.d
+ rm -r gcc/rust/checks/errors/borrowck/ffi-polonius/vendor \
+ libgrust/libformat_parser/vendor
+ find fixincludes/tests -name "*.h" -delete
+ rm gcc/m2/mc/mcp*.bnf
+ rm -r gcc/m2/pge-boot \
+ gcc/m2/mc-boot
+ # 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/
+
+ # gperf files
+ rm gcc/cp/cfns.h gcc/cp/std-name-hint.h
+ # Generate it now, because gcc doesn't regenerate it for some reason
+ # (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" .
+ # A odd script
+ pushd gcc/m2/gm2-libs
+ autoconf-2.69 -f config-host.in > config-host
+ popd
+ # Makefile.in only
+ local 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 gcc/cobol/parse.{cc,h}
+ rm gcc/cobol/cdf.{cc,h}
+
+ # Remove flex generated files
+ rm gcc/gengtype-lex.cc
+ rm gcc/cobol/scan.cc
+
+ # Regenerate crc table in libiberty/crc32.c
+ pushd libiberty
+ sed -n '/^ #include /,/^ \}$/p' crc32.c > crcgen.c
+ gcc -o crcgen crcgen.c
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
+ ./crcgen >> crc32.c.new
+ sed '1,/^};$/d' 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
+
+ # Regenerate sarif-spec-urls.def
+ rm gcc/sarif-spec-urls.def
+ cp -t contrib ../sarif-v2.1.0-errata01-os-complete.html
+ pushd contrib
+ # windows-1252 is not supported by our Python build
+ sed -i "s/'windows-1252'/'latin-1'/g" regenerate-sarif-spec-index.py
+ python3 regenerate-sarif-spec-index.py
+ popd
+
+ # Regenerate box-drawing-chars.inc
+ rm gcc/text-art/box-drawing-chars.inc
+ python3 contrib/unicode/gen-box-drawing-chars.py > gcc/text-art/box-drawing-chars.inc
+
+ # Regenerate combining-chars.inc
+ rm libcpp/combining-chars.inc
+ python3 contrib/unicode/gen-combining-chars.py > libcpp/combining-chars.inc
+
+ # Regenerate printable-chars.inc
+ rm libcpp/printable-chars.inc
+ python3 contrib/unicode/gen-printable-chars.py > libcpp/printable-chars.inc
+
+ # Regenerate unicode-data.h
+ rm libstdc++-v3/include/bits/unicode-data.h
+ pushd contrib/unicode
+ python3 gen_libstdcxx_unicode_data.py > ../../libstdc++-v3/include/bits/unicode-data.h
+ popd
+
+ # Regenerate loongarch files
+ pushd gcc/config/loongarch
+ rm loongarch-evolution.{cc,h} loongarch-str.h loongarch.opt
+ ./genopts/genstr.sh evolution_c > loongarch-evolution.cc
+ ./genopts/genstr.sh evolution_h > loongarch-evolution.h
+ ./genopts/genstr.sh header > loongarch-str.h
+ ./genopts/genstr.sh opt > loongarch.opt
+ popd
+
+ # Regenerate gcn files
+ pushd gcc/config/gcn
+ rm gcn-tables.opt
+ awk -f gen-opt-tables.awk gcn-devices.def > gcn-tables.opt
+ popd
+
+ # 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.cc
+ ./gen-avr-mmcu-texi > gcc/doc/avr-mmcu.texi
+}
+
+src_configure() {
+ export PATH="${KERNEL_SYSROOT}/bin:${PATH}"
+
+ mkdir build
+ cd build
+
+ LDFLAGS="-static" \
+ ../configure \
+ --target="${KERNEL_TARGET}" \
+ --prefix="${KERNEL_SYSROOT}" \
+ --disable-nls \
+ --enable-languages=c \
+ --without-headers \
+ --enable-multilib
+}
+
+src_compile() {
+ make "${MAKEJOBS}" all-gcc
+ make "${MAKEJOBS}" all-target-libgcc
+}
+
+src_install() {
+ make install-gcc DESTDIR="${DESTDIR}"
+ make install-target-libgcc DESTDIR="${DESTDIR}"
+}
diff --git a/steps-guix/gcc-15.2.0/sources b/steps-guix/gcc-15.2.0/sources
new file mode 100644
index 00000000..8e7c9579
--- /dev/null
+++ b/steps-guix/gcc-15.2.0/sources
@@ -0,0 +1,2 @@
+f https://mirrors.kernel.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz 438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e
+f https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/sarif-v2.1.0-errata01-os-complete.html 835a4d043e4415a76668c8f38d5605f4e6f8ac2279dfab7e61c3f06e9228dd1c
diff --git a/steps-guix/manifest b/steps-guix/manifest
index 126e82dc..b1b1e706 100644
--- a/steps-guix/manifest
+++ b/steps-guix/manifest
@@ -4,4 +4,4 @@
# We need a 64-bit kernel to enable Guix to run 64-bit programs.
build: binutils-2.41
-
+build: gcc-15.2.0