Meta: Update gcc version requirement to 13+

The project can no longer be compiled with gcc-12.
This commit is contained in:
Timothy Flynn 2024-05-17 09:40:40 -04:00 committed by Andrew Kaster
parent 688599af57
commit b4af851c74
Notes: sideshowbarker 2024-07-17 03:18:29 +09:00
3 changed files with 12 additions and 11 deletions

View file

@ -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

View file

@ -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.
```

View file

@ -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
}