svn commit: r452811 - head/Mk/Uses
Joseph Mingrone
jrm at FreeBSD.org
Tue Oct 24 19:13:03 UTC 2017
Author: jrm
Date: Tue Oct 24 19:13:01 2017
New Revision: 452811
URL: https://svnweb.freebsd.org/changeset/ports/452811
Log:
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 at rawbw.com
Reviewed by: db, jmd, mat, swills
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D12529
Modified:
head/Mk/Uses/fortran.mk
Modified: head/Mk/Uses/fortran.mk
==============================================================================
--- head/Mk/Uses/fortran.mk Tue Oct 24 19:11:30 2017 (r452810)
+++ head/Mk/Uses/fortran.mk Tue Oct 24 19:13:01 2017 (r452811)
@@ -4,7 +4,7 @@
#
# Feature: fortran
# Usage: USES=fortran
-# Valid ARGS: gcc (default)
+# Valid ARGS: flang, gcc (default)
#
# MAINTAINER: fortran at 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}"
More information about the svn-ports-head
mailing list