Skip to content

Commit

Permalink
jenkins: select gcc-12 on RHEL for Node.js 23 (nodejs#3886)
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored Sep 3, 2024
1 parent 499c78e commit 93aa475
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions jenkins/scripts/select-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ fi
case $NODE_NAME in
*rhel9*|*ubi9*)
echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION on" `cat /etc/redhat-release`
if [ "$NODEJS_MAJOR_VERSION" -gt "21" ]; then
if [ "$NODEJS_MAJOR_VERSION" -gt "22" ]; then
. /opt/rh/gcc-toolset-12/enable
elif [ "$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
Expand All @@ -52,14 +54,25 @@ case $NODE_NAME in
case "$CONFIG_FLAGS" in
*--enable-lto*)
echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION (LTO) on" `cat /etc/redhat-release`
. /opt/rh/gcc-toolset-11/enable
if [ "$NODEJS_MAJOR_VERSION" -gt "22" ]; then
. /opt/rh/gcc-toolset-12/enable
else
. /opt/rh/devtoolset-11/enable
fi
export CC="ccache gcc"
export CXX="ccache g++"
echo "Selected compiler:" `${CXX} -dumpversion`
return
;;
*)
echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION on" `cat /etc/redhat-release`
if [ "$NODEJS_MAJOR_VERSION" -gt "22" ]; then
. /opt/rh/gcc-toolset-12/enable
export CC="ccache gcc"
export CXX="ccache g++"
echo "Selected compiler:" `${CXX} -dumpversion`
return
fi
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
Expand Down

0 comments on commit 93aa475

Please sign in to comment.