From 1aa3121bbb23de785dde003189f1b27d2b36175c 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 dbed409b0..336c13b0a 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 "21" ]; 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"