From 482f7256fa8e28c653386dae417b868feb1be4c8 Mon Sep 17 00:00:00 2001 From: edoapra Date: Sat, 27 Apr 2024 10:47:27 -0700 Subject: [PATCH] fix for gcc 14 fedora --- src/libext/scalapack/build_scalapa.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libext/scalapack/build_scalapa.sh b/src/libext/scalapack/build_scalapa.sh index 5112c0d6d4..40bbf6aab4 100755 --- a/src/libext/scalapack/build_scalapa.sh +++ b/src/libext/scalapack/build_scalapa.sh @@ -233,7 +233,11 @@ if [[ -z "$PE_ENV" ]] ; then fi #fix for clang 12 error in implicit-function-declaration GOTCLANG=$( "$MPICC" -dM -E - /dev/null |grep __clang__|head -1|cut -c19) -if [[ ${GOTCLANG} == "1" ]] ; then +if [[ `${MPICC} -dM -E - < /dev/null 2> /dev/null | grep -c GNU` > 0 ]] ; then + let GCCVERSIONGT12=$(expr `${MPICC} -dumpversion | cut -f1 -d.` \> 12) +fi + +if [[ ${GOTCLANG} == "1" ]] || [[ ${GCCVERSIONGT12} == "1" ]] ; then C_FLAGS=" -Wno-error=implicit-function-declaration " fi if [[ "$SCALAPACK_SIZE" == 8 ]] ; then