From b4af851c746bf7f93edf2d1924f73e81e7b5b527 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 17 May 2024 09:40:40 -0400 Subject: [PATCH] Meta: Update gcc version requirement to 13+ The project can no longer be compiled with gcc-12. --- Documentation/BuildInstructions.md | 13 +++++++------ Documentation/BuildInstructionsLadybird.md | 4 ++-- Meta/find_compiler.sh | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index 02549eabfa3..fc80b51eeee 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -11,12 +11,13 @@ sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2 ``` Optional: `fuse2fs` for [building images without root](https://github.com/SerenityOS/serenity/pull/11224). -#### GCC 12 or Clang 17 +#### GCC 13 or Clang 17 -A host compiler that supports C++23 features is required for building host tools, the newer the better. Tested versions include gcc-12 and clang-17. +A host compiler that supports C++23 features is required for building host tools, the newer the better. Tested versions include gcc-13 and clang-17. -On Ubuntu gcc-12 is available in the repositories of 22.04 (Jammy) and later. -If you are running an older version, you will either need to upgrade, or find an alternative installation source. +On Ubuntu gcc-13 is available in the repositories of 24.04 (Noble) and later. +If you are running an older version, you will either need to upgrade, or find an alternative installation source +(i.e. from the [ubuntu-toolchain-r/test PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test)). Next, update your local package information from this repository: @@ -24,10 +25,10 @@ Next, update your local package information from this repository: sudo apt update ``` -Now on Ubuntu or Debian you can install gcc-12 with apt like this: +Now on Ubuntu or Debian you can install gcc-13 with apt like this: ```console -sudo apt install gcc-12 g++-12 +sudo apt install gcc-13 g++-13 ``` #### QEMU 6.2 or later diff --git a/Documentation/BuildInstructionsLadybird.md b/Documentation/BuildInstructionsLadybird.md index 57bcb5ab88c..70127d54838 100644 --- a/Documentation/BuildInstructionsLadybird.md +++ b/Documentation/BuildInstructionsLadybird.md @@ -2,7 +2,7 @@ ## Build Prerequisites -Qt6 development packages and a C++23 capable compiler are required. g++-12 or clang-17 are required at a minimum for c++23 support. +Qt6 development packages and a C++23 capable compiler are required. g++-13 or clang-17 are required at a minimum for c++23 support. NOTE: In all of the below lists of packages, the Qt6 multimedia package is not needed if your Linux system supports PulseAudio. @@ -147,7 +147,7 @@ The install rules in Ladybird/cmake/InstallRules.cmake define which binaries and installed into the configured CMAKE_PREFIX_PATH or path passed to ``cmake --install``. Note that when using a custom build directory rather than Meta/serenity.sh, the user may need to provide -a suitable C++ compiler (g++ >= 12, clang >= 14, Apple Clang >= 14.3) via the CMAKE_CXX_COMPILER and +a suitable C++ compiler (g++ >= 13, clang >= 14, Apple Clang >= 14.3) via the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER cmake options. ``` diff --git a/Meta/find_compiler.sh b/Meta/find_compiler.sh index e9428d0e5f1..2524c1e7486 100644 --- a/Meta/find_compiler.sh +++ b/Meta/find_compiler.sh @@ -22,7 +22,7 @@ is_supported_compiler() { [ "$MAJOR_VERSION" -ge 17 ] && return 0 else # GCC version check - [ "$MAJOR_VERSION" -ge 12 ] && return 0 + [ "$MAJOR_VERSION" -ge 13 ] && return 0 fi return 1 } @@ -63,7 +63,7 @@ pick_host_compiler() { return fi - find_newest_compiler egcc gcc gcc-12 gcc-13 gcc-14 /usr/local/bin/gcc-{12,13,14} /opt/homebrew/bin/gcc-{12,13,14} + find_newest_compiler egcc gcc gcc-13 gcc-14 /usr/local/bin/gcc-{13,14} /opt/homebrew/bin/gcc-{13,14} if is_supported_compiler "$HOST_COMPILER"; then export CC="${HOST_COMPILER}" export CXX="${HOST_COMPILER/gcc/g++}" @@ -73,6 +73,6 @@ pick_host_compiler() { if [ "$(uname -s)" = "Darwin" ]; then die "Please make sure that Xcode 14.3, Homebrew Clang 17, or higher is installed." else - die "Please make sure that GCC version 12, Clang version 17, or higher is installed." + die "Please make sure that GCC version 13, Clang version 17, or higher is installed." fi }