Mk/Uses/fortran.mk: Make gfortran respect USE_GCC

Allow choosing a specific version of gfortran through USE_GCC variable.

PR:		266196
Approved by:	thierry (fortran)
Co-authored by:	thierry
This commit is contained in:
Lorenzo Salvadore 2022-11-16 15:43:40 +01:00
parent 223e207711
commit 4191c71fbd
No known key found for this signature in database
GPG Key ID: B58F7C3CF6DB8A38

View File

@ -14,7 +14,11 @@ fortran_ARGS= ${FORTRAN_DEFAULT}
. endif
. if ${fortran_ARGS} == gfortran
. if empty(USE_GCC)
_GCC_VER= ${GCC_DEFAULT:S/.//}
. else
_GCC_VER= ${_USE_GCC}
. endif
BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER}
RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER}
F77= gfortran${_GCC_VER}