From 8b5223d6d1a35fa5aa7cec01e5c15f0aaba2e7f9 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 21 Mar 2024 17:22:33 +0000 Subject: [PATCH] jenkins: use gcc 12 on rhel8-s390x for Node.js 22 To avoid a compiler bug in gcc, use gcc-toolset-12 on rhel8-s390x. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Refs: https://github.com/nodejs/build/issues/3630 --- jenkins/scripts/select-compiler.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index fd570f6ca..a3ba6489c 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -47,6 +47,16 @@ case $NODE_NAME in ;; *) echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION on" `cat /etc/redhat-release` + if [ "$NODEJS_MAJOR_VERSION" -gt "22" ]; then + # s390x, use later toolset to avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 + if [ "$SELECT_ARCH" == "S390X" ]; then + . /opt/rh/gcc-toolset-12/enable + export CC="ccache gcc" + export CXX="ccache g++" + echo "Selected compiler:" `${CXX} -dumpversion` + return + fi + fi if [ "$NODEJS_MAJOR_VERSION" -gt "19" ]; then . /opt/rh/gcc-toolset-10/enable export CC="ccache gcc"