From 5bb3b570b8c72b31deb85d3b530adea5249b2032 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 5 Sep 2024 17:36:33 +0100 Subject: [PATCH 1/2] jenkins: select gcc 12 on Ubuntu 22.04 for Node.js 23 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..bcadeb0e6 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 CC="ccache g++" + fi + echo "Compiler set to GCC" `$CXX -dumpversion` + return + ;; esac if [ "$SELECT_ARCH" = "PPC64LE" ]; then From 54ee003e5d8572377ed8cc8703e084a61b4b36a2 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 5 Sep 2024 17:39:37 +0100 Subject: [PATCH 2/2] fixup! jenkins: select gcc 12 on Ubuntu 22.04 for Node.js 23 --- jenkins/scripts/select-compiler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index bcadeb0e6..0b4d871d9 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -113,7 +113,7 @@ case $NODE_NAME in else # Default gcc on Ubuntu 22.04 is gcc 11. export CC="ccache gcc" - export CC="ccache g++" + export CXX="ccache g++" fi echo "Compiler set to GCC" `$CXX -dumpversion` return