Skip to content

Commit

Permalink
jenkins: use gcc 12 on rhel8-s390x for Node.js 22
Browse files Browse the repository at this point in the history
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: nodejs#3630
  • Loading branch information
richardlau committed Mar 21, 2024
1 parent 633257a commit cf708fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jenkins/scripts/select-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cf708fc

Please sign in to comment.