Skip to content

Commit cf02bff

Browse files
sam-githubmhdawson
authored andcommitted
Use devtoolset-6 for s390x on node gt 11.x (#1754)
PR-URL: #1754 Reviewed-By: Michael Dawson <[email protected]>
1 parent 657d8cf commit cf02bff

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

jenkins/scripts/select-compiler.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
if [ "$DONTSELECT_COMPILER" != "DONT" ]; then
4+
NODE_NAME=${NODE_NAME:-$HOSTNAME}
5+
echo "Selecting compiler based on $NODE_NAME"
46
case $NODE_NAME in
57
*ppc64_le* ) SELECT_ARCH=PPC64LE ;;
68
*s390x* ) SELECT_ARCH=S390X ;;
@@ -44,22 +46,26 @@ elif [ "$SELECT_ARCH" = "S390X" ]; then
4446

4547
echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on s390x"
4648

47-
if [ "$NODEJS_MAJOR_VERSION" -gt "11" ]; then
48-
export PATH="/data/gcc-6.3/bin:/data/binutils-2.28/bin:$PATH"
49-
export LD_LIBRARY_PATH="/data/gcc-6.3/lib64:$LD_LIBRARY_PATH"
50-
export COMPILER_LEVEL="-6.3"
51-
elif [ "$NODEJS_MAJOR_VERSION" -gt "9" ]; then
52-
export PATH="/data/gcc-4.9/bin:/data/binutils-2.28/bin:$PATH"
49+
if [ "$NODEJS_MAJOR_VERSION" -gt "9" ]; then
50+
export PATH="/data/gcc-4.9/bin:$PATH"
5351
export LD_LIBRARY_PATH="/data/gcc-4.9/lib64:$LD_LIBRARY_PATH"
5452
export COMPILER_LEVEL="-4.9"
5553
fi
5654

57-
# Select the appropriate compiler
58-
export CC="ccache gcc${COMPILER_LEVEL}"
59-
export CXX="ccache g++${COMPILER_LEVEL}"
60-
export LINK="g++${COMPILER_LEVEL}"
61-
62-
echo "Compiler set to $COMPILER_LEVEL"
55+
if [ "$NODEJS_MAJOR_VERSION" -gt "11" ]; then
56+
# Setup devtoolset-6, sets LD_LIBRARY_PATH, PATH, etc.
57+
. /opt/rh/devtoolset-6/enable
58+
export CC="ccache s390x-redhat-linux-gcc"
59+
export CXX="ccache s390x-redhat-linux-g++"
60+
export LINK="s390x-redhat-linux-g++"
61+
echo "Compiler set to devtoolset-6"
62+
else
63+
# Select the appropriate compiler
64+
export CC="ccache gcc${COMPILER_LEVEL}"
65+
export CXX="ccache g++${COMPILER_LEVEL}"
66+
export LINK="g++${COMPILER_LEVEL}"
67+
echo "Compiler set to $COMPILER_LEVEL"
68+
fi
6369

6470
elif [ "$SELECT_ARCH" = "AIXPPC" ]; then
6571
# get node version

0 commit comments

Comments
 (0)