浏览代码

Travis: Update host GCC to version 10

This allows us to use the latest C++20 features in programs which we
compile and run as part of Lagom.
Linus Groh 4 年之前
父节点
当前提交
21912123c4
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 5 2
      .travis.yml
  2. 4 0
      Meta/Lagom/ReadMe.md

+ 5 - 2
.travis.yml

@@ -24,9 +24,12 @@ notifications:
 before_install:
 before_install:
 - sudo apt-get update -qq
 - sudo apt-get update -qq
 # These packages are already part of the Travis image:
 # These packages are already part of the Travis image:
-#- sudo apt-get install -y g++-9 libstdc++-9-dev cmake shellcheck
+#- sudo apt-get install -y cmake shellcheck
+# Remove GCC 9 (installed by default) and replace it with GCC 10:
+- sudo apt-get purge -y g++-9 libstdc++-9-dev
 # These aren't:
 # These aren't:
-- sudo apt-get install -y libmpfr-dev libmpc-dev libgmp-dev clang-format-10
+- sudo apt-get install -y g++-10 libstdc++-10-dev libmpfr-dev libmpc-dev libgmp-dev clang-format-10
+- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave /usr/bin/g++ g++ /usr/bin/g++-10
 # If we ever do any qemu-emulation on Travis, we should re-enable this:
 # If we ever do any qemu-emulation on Travis, we should re-enable this:
 #- e2fsprogs qemu-system-i386 qemu-utils
 #- e2fsprogs qemu-system-i386 qemu-utils
 - g++ --version
 - g++ --version

+ 4 - 0
Meta/Lagom/ReadMe.md

@@ -8,6 +8,10 @@ If you want to bring the comfortable Serenity classes with you to another system
 
 
 *Lagom* is a Swedish word that means "just the right amount." ([Wikipedia](https://en.wikipedia.org/wiki/Lagom))
 *Lagom* is a Swedish word that means "just the right amount." ([Wikipedia](https://en.wikipedia.org/wiki/Lagom))
 
 
+## Prerequisites
+
+You'll need a compiler as capable as the one used for the toolchain - which might differ from the compiler you used *to compile* the toolchain. Check `GCC_VERSION` in [`BuildIt.sh`](../../Toolchain/BuildIt.sh).
+
 ## Fuzzing
 ## Fuzzing
 
 
 Lagom can be used to fuzz parts of SerenityOS's code base. This requires buildling with `clang`, so it's convenient to use a different build directory for that. Run CMake like this:
 Lagom can be used to fuzz parts of SerenityOS's code base. This requires buildling with `clang`, so it's convenient to use a different build directory for that. Run CMake like this: