On Wed, May 08 2019, Brian Callahan <call...@rpi.edu> wrote:
> On 5/8/19 1:30 PM, Brian Callahan wrote:
>>
>>
>> On 5/8/19 1:25 PM, Steven Mestdagh wrote:
>>> Brian Callahan [2019-05-08, 00:42:02]:
>>>> Hi ports --
>>>>
>>>> Attached are two diffs. The first turns on flang support in the fortran
>>>> module. This has been brought up before but stalled. It is now
>>>> necessary for
>>>> R to build on arm64. The second uses flang as the Fortran compiler
>>>> on arm64
>>>> when building R. This allows R to successfully build and package and
>>>> install.
>>>>
>>>> OK?
>>>>
>>>> ~Brian
>>>>
>>>> Index: fortran.port.mk
>>>> ===================================================================
>>>> RCS file: /cvs/ports/infrastructure/mk/fortran.port.mk,v
>>>> retrieving revision 1.15
>>>> diff -u -p -r1.15 fortran.port.mk
>>>> --- fortran.port.mk    14 Jan 2019 21:27:37 -0000    1.15
>>>> +++ fortran.port.mk    8 May 2019 04:32:27 -0000
>>>> @@ -17,6 +17,10 @@ MODGCC4_LANGS += fortran
>>>>   MODFORTRAN_BUILD_DEPENDS += ${MODGCC4_FORTRANDEP}
>>>>   MODFORTRAN_LIB_DEPENDS += ${MODGCC4_FORTRANLIBDEP}
>>>>   MODFORTRAN_WANTLIB += ${MODGCC4_FORTRANWANTLIB}
>>>> +.elif ${MODFORTRAN_COMPILER:L} == "flang"
>>>> +MODFORTRAN_BUILD_DEPENDS += lang/flang/flang
>>>> +MODFORTRAN_LIB_DEPENDS += lang/flang/flang
>>>> +MODFORTRAN_WANTLIB += compiler_rt flang flangmain flangrti pgmath
>>>>   .else
>>>> -ERRORS += "Fatal: MODFORTRAN_COMPILER must be one of: g77 gfortran"
>>>> +ERRORS += "Fatal: MODFORTRAN_COMPILER must be one of: g77 gfortran
>>>> flang"
>>>>   .endif
>>>> Index: Makefile
>>>> ===================================================================
>>>> RCS file: /cvs/ports/math/R/Makefile,v
>>>> retrieving revision 1.109
>>>> diff -u -p -r1.109 Makefile
>>>> --- Makefile    29 Apr 2019 08:52:47 -0000    1.109
>>>> +++ Makefile    8 May 2019 04:38:25 -0000
>>>> @@ -37,7 +37,11 @@ MASTER_SITES=    https://cran.r-project.org
>>>>   MODULES=    fortran \
>>>>           x11/tk
>>>>   +.if ${MACHINE_ARCH:Maarch64}
>>>> +MODFORTRAN_COMPILER = flang
>>>> +.else
>>>>   MODFORTRAN_COMPILER = gfortran
>>>> +.endif
>>>>     BUILD_DEPENDS=    ${MODFORTRAN_BUILD_DEPENDS} \
>>>>           archivers/gtar \
>>>
>>> ok.  have you built any other ports using flang?
>>
>> Thanks. I'm working through the list jca@ posted. But the RPi3B+ is
>> slow...
>>
>> ~Brian
>>
>
> Before I forget, adding flang to the fortran module requires this man
> page diff too.

ok jca@ (also ok for math/R and fortran.port.mk)

> ~Brian
>
> Index: port-modules.5
> ===================================================================
> RCS file: /cvs/src/share/man/man5/port-modules.5,v
> retrieving revision 1.239
> diff -u -p -r1.239 port-modules.5
> --- port-modules.5    23 Apr 2019 12:31:33 -0000      1.239
> +++ port-modules.5    8 May 2019 18:43:01 -0000
> @@ -848,7 +848,7 @@ Sets
>  .Ev MODFORTRAN_BUILD_DEPENDS .
>  Set
>  .Ev MODFORTRAN_COMPILER
> -to `g77' or `gfortran', depending on what the port requires.
> +to `g77', `gfortran', or `flang', depending on what the port requires.
>  The default is `g77'.
>  The dependencies are chosen according to
>  .Ev MODFORTRAN_COMPILER .
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to