Skip to content

Commit df4a46b

Browse files
committed
Toolchain+Ports: Bump GCC to version 15.1.0
1 parent 8b4e428 commit df4a46b

12 files changed

+37
-31
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "SerenityOS")
1717
endif()
1818

1919
# Check for toolchain mismatch, user might need to rebuild toolchain
20-
set(GCC_VERSION "14.2.0")
20+
set(GCC_VERSION "15.1.0")
2121
set(LLVM_VERSION "20.1.0")
2222
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
2323
set(EXPECTED_COMPILER_VERSION "${GCC_VERSION}")

Meta/CMake/common_compile_options.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
7070

7171
# FIXME: This warning seems useful but has too many false positives with GCC 13.
7272
add_compile_options(-Wno-dangling-reference)
73+
74+
# FIXME: This seems to produce way to many false positives with GCC 15
75+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
76+
add_compile_options(-Wno-array-bounds)
77+
endif()
7378
endif()
7479

7580
if (UNIX AND NOT APPLE AND NOT ENABLE_FUZZERS)

Ports/AvailablePorts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
9393
| [`frotz`](frotz/) | Frotz | 2.54 | https://gitlab.com/DavidGriffith/frotz |
9494
| [`fuse-exfat`](fuse-exfat/) | fuse-exfat | 1.4.0 | https://gitlab.com/relan/exfat |
9595
| [`gawk`](gawk/) | GNU awk | 5.3.1 | https://www.gnu.org/software/gawk/ |
96-
| [`gcc`](gcc/) | GNU Compiler Collection | 14.2.0 | https://gcc.gnu.org/ |
96+
| [`gcc`](gcc/) | GNU Compiler Collection | 15.1.0 | https://gcc.gnu.org/ |
9797
| [`gdb`](gdb/) | GNU Project Debugger | 11.2 | https://sourceware.org/gdb |
9898
| [`gemrb`](gemrb/) | GemRB | 0.9.2 | https://gemrb.org/ |
9999
| [`genemu`](genemu/) | Genesis / MegaDrive Emulator | e39f690 | https://github.com/rasky/genemu |

Ports/gcc/package.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env -S bash ../.port_include.sh
22
port=gcc
3-
version=14.2.0
3+
version=15.1.0
44
useconfigure=true
55
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--enable-languages=c,c++" "--disable-lto" "--disable-nls" "--enable-shared" "--enable-default-pie" "--enable-host-shared" "--enable-threads=posix" "--enable-initfini-array" "--with-linker-hash-style=gnu")
66
files=(
7-
"https://ftpmirror.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz#a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9"
7+
"https://ftpmirror.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz#e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea"
88
)
99
makeopts=("all-gcc" "all-target-libgcc" "all-target-libstdc++-v3" "-j$(nproc)")
1010
installopts=("DESTDIR=${SERENITY_INSTALL_ROOT}" "install-gcc" "install-target-libgcc" "install-target-libstdc++-v3")

Toolchain/BuildGNU.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ BINUTILS_BASE_URL="https://ftpmirror.gnu.org/gnu/binutils"
7676

7777
# Note: If you bump the gcc version, you also have to update the matching
7878
# GCC_VERSION variable in the project's root CMakeLists.txt
79-
GCC_VERSION="14.2.0"
80-
GCC_MD5SUM="2268420ba02dc01821960e274711bde0"
79+
GCC_VERSION="15.1.0"
80+
GCC_MD5SUM="e55d13c55428bca27b4d2ea02f883135"
8181
GCC_NAME="gcc-$GCC_VERSION"
8282
GCC_PKG="${GCC_NAME}.tar.xz"
8383
GCC_BASE_URL="https://ftpmirror.gnu.org/gnu/gcc"

Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ Co-Authored-By: Shannon Booth <[email protected]>
3131
create mode 100644 gcc/config/serenity.opt.urls
3232

3333
diff --git a/gcc/config.gcc b/gcc/config.gcc
34-
index 95c91ee02be4403567d63ac566ab8d3b956a6d74..43e2d9b03a5ce4fc2baf6a2268fdbf77467526f5 100644
34+
index 40b50dc969ede4418b305ca01869ec157e054283..550573f66da4982f21334a16157220c6b3bca81f 100644
3535
--- a/gcc/config.gcc
3636
+++ b/gcc/config.gcc
37-
@@ -722,6 +722,18 @@ x86_cpus="generic intel"
37+
@@ -723,6 +723,18 @@ x86_cpus="generic intel"
3838

3939
# Common parts for widely ported systems.
4040
case ${target} in
@@ -53,7 +53,7 @@ index 95c91ee02be4403567d63ac566ab8d3b956a6d74..43e2d9b03a5ce4fc2baf6a2268fdbf77
5353
*-*-darwin*)
5454
tmake_file="t-darwin "
5555
tm_file="${tm_file} darwin.h"
56-
@@ -1189,6 +1201,17 @@ case ${target} in
56+
@@ -1186,6 +1198,17 @@ case ${target} in
5757
esac
5858

5959
case ${target} in

Toolchain/Patches/gcc/0002-fixincludes-Skip-for-SerenityOS-targets.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Our headers don't have such problems, so this hack is of no use for us.
1313
1 file changed, 1 insertion(+)
1414

1515
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
16-
index df90720b716f2386f343f5ba46a2d8d706188dd5..a45cdd0de6833a1e632292722387be453a079053 100755
16+
index 7112f4dcd64b8351343f7af343271d1717bd02e2..9dcd2318a8c8f514fbf594b26e556fee4d13e9ef 100755
1717
--- a/fixincludes/mkfixinc.sh
1818
+++ b/fixincludes/mkfixinc.sh
1919
@@ -11,6 +11,7 @@ target=fixinc.sh
@@ -22,5 +22,5 @@ index df90720b716f2386f343f5ba46a2d8d706188dd5..a45cdd0de6833a1e632292722387be45
2222
case $machine in
2323
+ *-serenity* | \
2424
i?86-*-cygwin* | \
25-
i?86-*-mingw32* | \
26-
x86_64-*-mingw32* | \
25+
*-mingw32* | \
26+
powerpc-*-eabisim* | \

Toolchain/Patches/gcc/0003-libgcc-Build-for-SerenityOS.patch

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ Co-Authored-By: Philip Herron <[email protected]>
1515
Co-Authored-By: Shannon Booth <[email protected]>
1616
---
1717
gcc/configure | 3 +++
18-
libgcc/config.host | 17 +++++++++++++++++
18+
libgcc/config.host | 18 ++++++++++++++++++
1919
libgcc/unwind-dw2-fde-dip.c | 6 ++++++
20-
3 files changed, 26 insertions(+)
20+
3 files changed, 27 insertions(+)
2121

2222
diff --git a/gcc/configure b/gcc/configure
23-
index abc8bfdc24432e766eb05dcd8492b65acc47a65f..0160b4e986a5f58aa30ccc6e275a31fc9ff9c2ae 100755
23+
index 16965953f05160ea4572957144f305cc0cce4e18..63fbeab1be55e2a9bf6718f8a6d826bb7ecf7d27 100755
2424
--- a/gcc/configure
2525
+++ b/gcc/configure
26-
@@ -33652,6 +33652,9 @@ case "$target" in
26+
@@ -33648,6 +33648,9 @@ case "$target" in
2727
*-linux-musl*)
2828
gcc_cv_target_dl_iterate_phdr=yes
2929
;;
@@ -34,10 +34,10 @@ index abc8bfdc24432e766eb05dcd8492b65acc47a65f..0160b4e986a5f58aa30ccc6e275a31fc
3434

3535
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
3636
diff --git a/libgcc/config.host b/libgcc/config.host
37-
index e75a7af647f6004ce004b4a9eb46949507727dff..3261e8e47184a3b5d6d21685e2d64f234b46bc4a 100644
37+
index 6a88ee5a2dd0b1386b2a5f2fbb579953f8ce9441..5fc80843a52ba80469df05fd5162964c8d7ae322 100644
3838
--- a/libgcc/config.host
3939
+++ b/libgcc/config.host
40-
@@ -1356,6 +1356,11 @@ riscv*-*-freebsd*)
40+
@@ -1358,6 +1358,11 @@ riscv*-*-freebsd*)
4141
tmake_file="${tmake_file} riscv/t-crtstuff riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-slibgcc-libgcc"
4242
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
4343
;;
@@ -49,7 +49,7 @@ index e75a7af647f6004ce004b4a9eb46949507727dff..3261e8e47184a3b5d6d21685e2d64f23
4949
riscv*-*-*)
5050
tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
5151
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
52-
@@ -1569,6 +1574,18 @@ nvptx-*)
52+
@@ -1571,6 +1576,19 @@ nvptx-*)
5353
tmake_file="$tmake_file nvptx/t-nvptx"
5454
extra_parts="crt0.o"
5555
;;
@@ -63,13 +63,14 @@ index e75a7af647f6004ce004b4a9eb46949507727dff..3261e8e47184a3b5d6d21685e2d64f23
6363
+ tmake_file="$tmake_file ${cpu_type}/t-aarch64"
6464
+ tmake_file="$tmake_file ${cpu_type}/t-lse t-slibgcc t-slibgcc-libgcc t-slibgcc-gld-nover"
6565
+ tmake_file="$tmake_file ${cpu_type}/t-softfp t-softfp t-crtfm"
66+
+ md_unwind_def_header=aarch64/aarch64-unwind-def.h
6667
+ md_unwind_header=aarch64/aarch64-unwind.h
6768
+ ;;
6869
*)
6970
echo "*** Configuration ${host} not supported" 1>&2
7071
exit 1
7172
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
72-
index 57d0c8812b13a2bfa8ff9b5e031347ad9afd7032..729fd29d4a233950b2c836d91d02ea335875ac6b 100644
73+
index 5c19838e0a3c34ea3b0420c552c0100276e5aab4..01138feee2a1c2c69a931c785a6f6614b7239c0f 100644
7374
--- a/libgcc/unwind-dw2-fde-dip.c
7475
+++ b/libgcc/unwind-dw2-fde-dip.c
7576
@@ -57,6 +57,12 @@

Toolchain/Patches/gcc/0004-libgcc-Do-not-link-libgcc_s-to-LibC.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Co-Authored-By: Shannon Booth <[email protected]>
1717
1 file changed, 1 deletion(-)
1818

1919
diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
20-
index e8e6c7ddecade26f21d335d4eb7dcc8a04866f7e..bbc99027ac12a2424866e051724a32c61b92eb03 100644
20+
index 68cb3b31eeed48283af798febf88347f313f2db9..9fd05974fd0fb98eae36a8c215f5692ff6954769 100644
2121
--- a/libgcc/config/t-slibgcc
2222
+++ b/libgcc/config/t-slibgcc
2323
@@ -26,7 +26,6 @@ SHLIB_MAP = @shlib_map_file@

Toolchain/Patches/gcc/0005-i386-Disable-math-errno-for-SerenityOS.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ has the effect of setting -fno-math-errno by default.
1111
1 file changed, 4 insertions(+)
1212

1313
diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
14-
index d578918dfb7964cbb178f08a5876c75f7b92815b..56c094a91c9cf34c33eea88b622f05004a1b3f4c 100644
14+
index 4815fbc4d3593c60585fdcc4ec90aeda025f848a..8e42b5a3acf330a17eeacfdcf369ba8e5187293e 100644
1515
--- a/gcc/common/config/i386/i386-common.cc
1616
+++ b/gcc/common/config/i386/i386-common.cc
17-
@@ -2032,6 +2032,10 @@ ix86_option_init_struct (struct gcc_options *opts)
17+
@@ -2072,6 +2072,10 @@ ix86_option_init_struct (struct gcc_options *opts)
1818
avoid calling them when that's the only reason we would. */
1919
opts->x_flag_errno_math = 0;
2020

Toolchain/Patches/gcc/0006-libstdc-Support-SerenityOS.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Co-Authored-By: Shannon Booth <[email protected]>
2727
4 files changed, 14 insertions(+), 6 deletions(-)
2828

2929
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
30-
index 51a08bcc8b1d07d8ab9144caf80ba0406ae12fca..f1c816d2b6d5b070383a3b7d0e40d26ddb54147f 100644
30+
index a0094c2dd95b43abc80d78cd87b85bc39ddf9eaf..d69a9eac17b868b9c726b3d6b0d80e53d3af68ea 100644
3131
--- a/libstdc++-v3/acinclude.m4
3232
+++ b/libstdc++-v3/acinclude.m4
3333
@@ -1792,7 +1792,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
@@ -49,7 +49,7 @@ index 51a08bcc8b1d07d8ab9144caf80ba0406ae12fca..f1c816d2b6d5b070383a3b7d0e40d26d
4949
;;
5050
*)
5151
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
52-
index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..d5de656cc3cd7b3a9c4b82c292263426195b157d 100755
52+
index 819a1d82876a156e27a831bdaa695d155c34e31f..0cd50a29ab76d8af432aefdcb07b43f15f70688a 100755
5353
--- a/libstdc++-v3/configure
5454
+++ b/libstdc++-v3/configure
5555
@@ -12003,6 +12003,11 @@ else
@@ -64,7 +64,7 @@ index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..d5de656cc3cd7b3a9c4b82c292263426
6464
darwin*)
6565
# if libdl is installed we need to link against it
6666
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
67-
@@ -16679,7 +16684,7 @@ fi
67+
@@ -16680,7 +16685,7 @@ fi
6868
dragonfly* | freebsd*)
6969
enable_clocale_flag=dragonfly
7070
;;
@@ -73,7 +73,7 @@ index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..d5de656cc3cd7b3a9c4b82c292263426
7373
enable_clocale_flag=newlib
7474
;;
7575
*)
76-
@@ -21374,7 +21379,7 @@ fi
76+
@@ -21377,7 +21382,7 @@ fi
7777
ac_has_nanosleep=yes
7878
ac_has_sched_yield=yes
7979
;;
@@ -82,7 +82,7 @@ index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..d5de656cc3cd7b3a9c4b82c292263426
8282
ac_has_clock_monotonic=yes
8383
ac_has_clock_realtime=yes
8484
ac_has_nanosleep=yes
85-
@@ -28620,7 +28625,7 @@ case "${host}" in
85+
@@ -28654,7 +28659,7 @@ case "${host}" in
8686
# This is a freestanding configuration; there is nothing to do here.
8787
;;
8888

@@ -92,10 +92,10 @@ index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..d5de656cc3cd7b3a9c4b82c292263426
9292

9393
$as_echo "#define HAVE_ASINF 1" >>confdefs.h
9494
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
95-
index 7bc430716168748b96053d0c4d7785268706dd1c..546c72a474c1d8dcf20c22ee09d7a0ba941b0e1c 100644
95+
index 253e5a9ad0dbe0698e3672cbee1c89eab8f2702d..45a22282657499d3a3c747f19110f63cbb044995 100644
9696
--- a/libstdc++-v3/configure.host
9797
+++ b/libstdc++-v3/configure.host
98-
@@ -297,6 +297,9 @@ case "${host_os}" in
98+
@@ -307,6 +307,9 @@ case "${host_os}" in
9999
# Use libatomic if necessary and avoid libstdc++ specific atomicity support
100100
atomicity_dir="cpu/generic/atomicity_builtins"
101101
;;

Toolchain/Patches/gcc/0007-libstdc-Build-static-library-with-fPIC.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This hack is from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638
1313
1 file changed, 2 insertions(+), 2 deletions(-)
1414

1515
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
16-
index d5de656cc3cd7b3a9c4b82c292263426195b157d..e2939c4d152670ce59798ba5aed02a3abbfbe628 100755
16+
index 0cd50a29ab76d8af432aefdcb07b43f15f70688a..472b7ed7093aeb37233f2d98a37ddd9d24899b51 100755
1717
--- a/libstdc++-v3/configure
1818
+++ b/libstdc++-v3/configure
1919
@@ -15789,8 +15789,8 @@ if test "$enable_shared" = yes; then

0 commit comments

Comments
 (0)