Skip to content

Commit cf708fc

Browse files
committed
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: #3630
1 parent 633257a commit cf708fc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

jenkins/scripts/select-compiler.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ case $NODE_NAME in
4747
;;
4848
*)
4949
echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION on" `cat /etc/redhat-release`
50+
if [ "$NODEJS_MAJOR_VERSION" -gt "21" ]; then
51+
# s390x, use later toolset to avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355
52+
if [ "$SELECT_ARCH" = "S390X" ]; then
53+
. /opt/rh/gcc-toolset-12/enable
54+
export CC="ccache gcc"
55+
export CXX="ccache g++"
56+
echo "Selected compiler:" `${CXX} -dumpversion`
57+
return
58+
fi
59+
fi
5060
if [ "$NODEJS_MAJOR_VERSION" -gt "19" ]; then
5161
. /opt/rh/gcc-toolset-10/enable
5262
export CC="ccache gcc"

0 commit comments

Comments
 (0)