diff options
author | jrm <jrm@FreeBSD.org> | 2017-10-25 03:13:01 +0800 |
---|---|---|
committer | jrm <jrm@FreeBSD.org> | 2017-10-25 03:13:01 +0800 |
commit | ef2e35e03094b67a88326a3096b959174d4cb7e9 (patch) | |
tree | 8b074d4ce6854f86d01490914d71ea8b7d60f04c /Mk/Uses | |
parent | 26a5edfe74a56e4abf7a2d56f1c3b37eb31f60b0 (diff) | |
download | freebsd-ports-gnome-ef2e35e03094b67a88326a3096b959174d4cb7e9.tar.gz freebsd-ports-gnome-ef2e35e03094b67a88326a3096b959174d4cb7e9.tar.zst freebsd-ports-gnome-ef2e35e03094b67a88326a3096b959174d4cb7e9.zip |
Mk/Uses/fortran.mk: Add flang as a non-default USES=fortran argument. Note,
flang is currently only available for amd64.
PR: 220313
Submitted by: yuri@rawbw.com
Reviewed by: db, jmd, mat, swills
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D12529
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/fortran.mk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Mk/Uses/fortran.mk b/Mk/Uses/fortran.mk index 2e3fab0322ac..6e38240bd9a7 100644 --- a/Mk/Uses/fortran.mk +++ b/Mk/Uses/fortran.mk @@ -4,7 +4,7 @@ # # Feature: fortran # Usage: USES=fortran -# Valid ARGS: gcc (default) +# Valid ARGS: flang, gcc (default) # # MAINTAINER: fortran@FreeBSD.org @@ -15,11 +15,20 @@ _INCLUDE_USES_FORTRAN_MK= yes fortran_ARGS= gcc .endif -.if ${fortran_ARGS} == gcc +.if ${fortran_ARGS} == flang +.if ${ARCH} == amd64 +BUILD_DEPENDS+= flang:devel/flang +RUN_DEPENDS+= flang:devel/flang +F77= flang +FC= flang +LDFLAGS+= -L${LOCALBASE}/flang/lib -lflang -lexecinfo +.else +IGNORE= USES=fortran: flang argument only available for amd64 +.endif +.elif ${fortran_ARGS} == gcc _GCC_VER= ${GCC_DEFAULT:S/.//} BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} -USE_BINUTILS= yes F77= gfortran${_GCC_VER} FC= gfortran${_GCC_VER} FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} @@ -30,6 +39,7 @@ LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \ IGNORE= USES=fortran: invalid arguments: ${fortran_ARGS} .endif +USE_BINUTILS= yes CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" |