Skip to content

Commit

Permalink
Merge pull request #4178 from martin-frbg/llvm17
Browse files Browse the repository at this point in the history
Add (gmake) support for LLVM17's new flang
  • Loading branch information
martin-frbg authored Aug 4, 2023
2 parents ef23240 + e8bc8a0 commit 8a17135
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,9 @@ endif
endif
endif

ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(F_COMPILER), $(filter $(F_COMPILER),GFORTRAN FLANGNEW))
CCOMMON_OPT += -DF_INTERFACE_GFORT
ifeq ($(F_COMPILER), GFORTRAN)
FCOMMON_OPT += -Wall
# make single-threaded LAPACK calls thread-safe #1847
FCOMMON_OPT += -frecursive
Expand All @@ -1102,6 +1103,7 @@ EXTRALIB += -lgfortran
endif
endif
endif
endif
ifdef NO_BINARY_MODE
ifeq ($(ARCH), $(filter $(ARCH),mips64))
ifdef BINARY64
Expand Down
9 changes: 8 additions & 1 deletion f_check
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ else
*flang*)
vendor=FLANG
openmp='-fopenmp'
;;
data=`$compiler -v 2>&1 > /dev/null `
v="${data#*version *}"
v="${v%%*.}"
major="${v%%.*}"
if [ "$major" -ge 17 ]; then
vendor=FLANGNEW
fi
;;
*ifort*|*ifx*)
vendor=INTEL
openmp='-fopenmp'
Expand Down

0 comments on commit 8a17135

Please sign in to comment.