Opened 13 months ago

Last modified 11 months ago

#32176 new enhancement

Support building Sage with the Flang Fortran compiler

Reported by: slelievre Owned by:
Priority: major Milestone: sage-wishlist
Component: build Keywords: fortran, flang
Cc: dimpase, mkoeppe, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

Part of:

  • #23926: Meta-ticket: allow more Fortran compilers

Change History (6)

comment:1 Changed 13 months ago by slelievre

  • Cc dimpase mkoeppe slelievre added
  • Keywords fortran flang added

From a discussion at ticket:30835#comment:11.

Please confirm we are talking about this Flang:

rather than this one:

comment:2 follow-up: Changed 13 months ago by dimpase

The former is not yet a real compiler.

comment:3 Changed 13 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-wishlist

comment:4 Changed 13 months ago by slelievre

  • Description modified (diff)

comment:5 in reply to: ↑ 2 ; follow-up: Changed 11 months ago by was

Replying to dimpase:

The former is not yet a real compiler.

Can you elaborate?

comment:6 in reply to: ↑ 5 Changed 11 months ago by dimpase

Replying to was:

Replying to dimpase:

The former is not yet a real compiler.

Can you elaborate?

https://releases.llvm.org/11.0.0/tools/flang/docs/ReleaseNotes.html says that it needs an "external Fortran compiler", defaulted to gfortran, to operate

Using Flang

Usage: flang hello.f90 -o hello.bin

By default, Flang will parse the Fortran file hello.f90 then unparse it to a canonical Fortran source file. 
Flang will then invoke an external Fortran compiler to compile this source file and link it, placing the resulting executable in hello.bin.

To specify the external Fortran compiler, set the F18_FC environment variable to the name of the compiler binary and ensure that it is on your PATH. 
The default value for F18_FC is gfortran.
Note: See TracTickets for help on using tickets.