Skip to content

Commit

Permalink
Toolchain: Upgrade to GCC 11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Aug 12, 2021
1 parent e489c1d commit dba3a66
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 52 deletions.
40 changes: 0 additions & 40 deletions tools/toolchain/scripts/stage0/gcc-10.2.0-cpp-__has_include.patch

This file was deleted.

12 changes: 2 additions & 10 deletions tools/toolchain/scripts/stage0/install_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

gcc_ver="10.2.0"
gcc_sha256="27e879dccc639cd7b0cc08ed575c1669492579529b53c9ff27b0b96265fa867d"

patches=(
"${SCRIPT_DIR}/stage0/gcc-${gcc_ver}-cpp-__has_include.patch"
)
gcc_ver="11.2.0"
gcc_sha256="f0837f1bf8244a5cc23bd96ff6366712a791cfae01df8e25b137698aca26efc1"

source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
Expand Down Expand Up @@ -54,10 +50,6 @@ case "$with_gcc" in
echo "Installing GCC from scratch into ${pkg_install_dir}"
cd gcc-${gcc_ver}

for patch in "${patches[@]}"; do
patch -p1 < "${patch}"
done

./contrib/download_prerequisites > prereq.log 2>&1
GCCROOT=${PWD}
mkdir obj
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchain/scripts/stage1/install_mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ case "$with_mpich" in
unset F90
unset F90FLAGS

# workaround for compilation with GCC-10, until properly fixed:
# workaround for compilation with GCC >= 10, until properly fixed:
# https://github.com/pmodels/mpich/issues/4300
("${FC}" --version | grep -Eq 'GNU.+\s10\.') && compat_flag="-fallow-argument-mismatch" || compat_flag=""
("${FC}" --version | grep -q 'GNU') && compat_flag="-fallow-argument-mismatch" || compat_flag=""
./configure \
--prefix="${pkg_install_dir}" \
--libdir="${pkg_install_dir}/lib" \
Expand Down
3 changes: 3 additions & 0 deletions tools/toolchain/scripts/stage5/install_pexsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ case "$with_pexsi" in
# Seemingly this should've been moved together with the other fortran files.
mv ./src/f_interface.f90 ./fortran/

# Patch to include <limits> explicitly as required by gcc >= 11.
sed -i '/^#include <numeric>/a #include <limits>' ./include/pexsi/utility_impl.hpp

make finstall > make.log 2>&1 # still issues with parallel make (fortran_examples target)

ln -sf "${pkg_install_dir}/lib/libpexsi_${OPENBLAS_ARCH}.a" \
Expand Down
3 changes: 3 additions & 0 deletions tools/toolchain/scripts/stage6/install_plumed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ case "$with_plumed" in
libs=""
[ -n "${MKL_LIBS}" ] && libs+="$(resolve_string "${MKL_LIBS}" "MPI")"

# Patch to include <limits> explicitly as required by gcc >= 11.
sed -i '/^#include <algorithm>/a #include <limits>' ./src/lepton/Operation.h

./configure \
CXX="${MPICXX}" \
CXXFLAGS="${CXXFLAGS//-g/-g0} ${GSL_CFLAGS}" \
Expand Down

0 comments on commit dba3a66

Please sign in to comment.