summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-30 18:08:24 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-30 18:08:24 +0200
commit3fff4803a38c9e3ae22844319d6392e96ee7042e (patch)
tree00faee8583a5971c013b0280f9fab9c4d17e384b
parent72708631dafb093e66b9caf893ed8ac6c147694c (diff)
downloadtoolchains-3fff4803a38c9e3ae22844319d6392e96ee7042e.tar.xz
toolchains-3fff4803a38c9e3ae22844319d6392e96ee7042e.zip
gcc: update to 16.1.016.1.0-1
-rw-r--r--Makefile6
-rw-r--r--patches/gcc-16.1.0-x86_64-pc-elf/0001-platform.patch15
-rw-r--r--patches/gcc-16.1.0-x86_64-pc-elf/0002-libstdc++-ranges.patch36
-rwxr-xr-xscripts/0100-download.sh2
-rwxr-xr-xscripts/0150-build-static-deps.sh2
5 files changed, 56 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9c8985e..7bfcec5 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
DEPENDS=.depends.mk
BINUTILS_VERSION ?= 2.46.0
-GCC_VERSION ?= 15.2.0
+GCC_VERSION ?= 16.1.0
GDB_VERSION ?= 17.1
NEWLIB_VERSION ?= 4.6.0.20260123
@@ -13,14 +13,14 @@ EXPAT_VERSION ?= 2.7.5
READLINE_VERSION ?= 8.3
GMP_VERSION ?= 6.3.0
MPFR_VERSION ?= 4.2.2
-MPC_VERSION ?= 1.3.1
+MPC_VERSION ?= 1.4.1
TARGET ?= x86_64-pc-elf
PLATFORM ?= x86-64
REGISTRY ?= registry.gitlab.ost.ch:45023
-IMAGE_BUILD ?= 4
+IMAGE_BUILD ?= 1
IMAGE_BASENAME = teachos/devcontainers
IMAGE_NAME = $(REGISTRY)/$(IMAGE_BASENAME)
diff --git a/patches/gcc-16.1.0-x86_64-pc-elf/0001-platform.patch b/patches/gcc-16.1.0-x86_64-pc-elf/0001-platform.patch
new file mode 100644
index 0000000..2b7961b
--- /dev/null
+++ b/patches/gcc-16.1.0-x86_64-pc-elf/0001-platform.patch
@@ -0,0 +1,15 @@
+--- /dev/null
++++ gcc/config/i386/t-x86_64-pc-elf
+@@ -0,0 +1,2 @@
++MULTILIB_EXTRA_OPTS += mno-red-zone mcmodel=kernel
++CRTSTUFF_T_CFLAGS = -mno-red-zone -mcmodel=kernel
+--- gcc/config.gcc 2024-08-01 10:17:14.000000000 +0200
++++ gcc/config.gcc 2024-09-16 14:03:02.049140896 +0200
+@@ -1960,6 +1960,7 @@
+ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h"
+ ;;
+ x86_64-*-elf*)
++ tmake_file="${tmake_file} i386/t-x86_64-pc-elf"
+ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
+ ;;
+ x86_64-*-rtems*)
diff --git a/patches/gcc-16.1.0-x86_64-pc-elf/0002-libstdc++-ranges.patch b/patches/gcc-16.1.0-x86_64-pc-elf/0002-libstdc++-ranges.patch
new file mode 100644
index 0000000..5d06ad2
--- /dev/null
+++ b/patches/gcc-16.1.0-x86_64-pc-elf/0002-libstdc++-ranges.patch
@@ -0,0 +1,36 @@
+--- libstdc++-v3/include/Makefile.am 2026-04-30 10:33:29.000000000 +0200
++++ libstdc++-v3/include/Makefile.am 2026-04-30 17:31:44.158748323 +0200
+@@ -129,6 +129,7 @@
+ ${bits_srcdir}/alloc_traits.h \
+ ${bits_srcdir}/atomic_base.h \
+ ${bits_srcdir}/c++0x_warning.h \
++ ${bits_srcdir}/binders.h \
+ ${bits_srcdir}/boost_concept_check.h \
+ ${bits_srcdir}/concept_check.h \
+ ${bits_srcdir}/char_traits.h \
+@@ -201,7 +202,6 @@
+ ${bits_srcdir}/basic_ios.tcc \
+ ${bits_srcdir}/basic_string.h \
+ ${bits_srcdir}/basic_string.tcc \
+- ${bits_srcdir}/binders.h \
+ ${bits_srcdir}/charconv.h \
+ ${bits_srcdir}/chrono.h \
+ ${bits_srcdir}/chrono_io.h \
+--- libstdc++-v3/include/Makefile.in 2026-04-30 10:33:29.000000000 +0200
++++ libstdc++-v3/include/Makefile.in 2026-04-30 17:31:25.624360666 +0200
+@@ -488,6 +488,7 @@
+ ${bits_srcdir}/atomic_base.h \
+ ${bits_srcdir}/c++0x_warning.h \
+ ${bits_srcdir}/boost_concept_check.h \
++ ${bits_srcdir}/binders.h \
+ ${bits_srcdir}/concept_check.h \
+ ${bits_srcdir}/char_traits.h \
+ ${bits_srcdir}/cpp_type_traits.h \
+@@ -557,7 +558,6 @@
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/basic_ios.tcc \
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/basic_string.h \
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/basic_string.tcc \
+-@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/binders.h \
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/charconv.h \
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/chrono.h \
+ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/chrono_io.h \
diff --git a/scripts/0100-download.sh b/scripts/0100-download.sh
index 798355e..bd4786d 100755
--- a/scripts/0100-download.sh
+++ b/scripts/0100-download.sh
@@ -15,4 +15,4 @@ mkdir -p /downloads && cd /downloads
[ -f readline-$READLINE_VERSION.tar.gz ] || curl -LO -C - https://ftp.gnu.org/gnu/readline/readline-$READLINE_VERSION.tar.gz
[ -f gmp-$GMP_VERSION.tar.xz ] || curl -LO -C - https://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.xz
[ -f mpfr-$MPFR_VERSION.tar.xz ] || curl -LO -C - https://www.mpfr.org/mpfr-$MPFR_VERSION/mpfr-$MPFR_VERSION.tar.xz
-[ -f mpc-$MPC_VERSION.tar.gz ] || curl -LO -C - https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz
+[ -f mpc-$MPC_VERSION.tar.xz ] || curl -LO -C - https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.xz
diff --git a/scripts/0150-build-static-deps.sh b/scripts/0150-build-static-deps.sh
index cc68ecb..e954d34 100755
--- a/scripts/0150-build-static-deps.sh
+++ b/scripts/0150-build-static-deps.sh
@@ -51,7 +51,7 @@ make -j$(nproc) && make install
cd ..
echo "Building static mpc..."
-tar xf /downloads/mpc-$MPC_VERSION.tar.gz
+tar xf /downloads/mpc-$MPC_VERSION.tar.xz
cd mpc-$MPC_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --with-gmp=$STATIC_DEPS_PREFIX --with-mpfr=$STATIC_DEPS_PREFIX --disable-shared --enable-static
make -j$(nproc) && make install