From f39aa5ea25f44fab8757cbb8972997845092f0a4 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 6 Sep 2024 15:06:23 +0100 Subject: [PATCH] jenkins: select gcc 12 on Ubuntu 22.04 for Node.js 23 (#3890) Refs: https://github.com/nodejs/build/issues/3806 --- jenkins/scripts/select-compiler.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index b5d905912..0b4d871d9 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -105,6 +105,19 @@ case $NODE_NAME in ;; esac ;; + *ubuntu2204*) + if [ "$NODEJS_MAJOR_VERSION" -gt "22" ]; then + export CC="ccache gcc-12" + export CXX="ccache g++-12" + echo "" + else + # Default gcc on Ubuntu 22.04 is gcc 11. + export CC="ccache gcc" + export CXX="ccache g++" + fi + echo "Compiler set to GCC" `$CXX -dumpversion` + return + ;; esac if [ "$SELECT_ARCH" = "PPC64LE" ]; then