Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building Sage with the Flang Fortran compiler #32176

Open
slel opened this issue Jul 11, 2021 · 6 comments
Open

Support building Sage with the Flang Fortran compiler #32176

slel opened this issue Jul 11, 2021 · 6 comments

Comments

@slel
Copy link
Member

slel commented Jul 11, 2021

Part of:

CC: @dimpase @mkoeppe @slel

Component: build

Keywords: fortran, flang

Issue created by migration from https://trac.sagemath.org/ticket/32176

@slel slel added this to the sage-9.4 milestone Jul 11, 2021
@slel
Copy link
Member Author

slel commented Jul 11, 2021

comment:1

From a discussion at #30835 comment:11.

Please confirm we are talking about this Flang:

rather than this one:

@slel
Copy link
Member Author

slel commented Jul 11, 2021

Changed keywords from none to fortran, flang

@dimpase
Copy link
Member

dimpase commented Jul 11, 2021

comment:2

The former is not yet a real compiler.

@mkoeppe mkoeppe removed this from the sage-9.4 milestone Jul 11, 2021
@slel

This comment has been minimized.

@williamstein
Copy link
Contributor

comment:5

Replying to @dimpase:

The former is not yet a real compiler.

Can you elaborate?

@dimpase
Copy link
Member

dimpase commented Sep 24, 2021

comment:6

Replying to @williamstein:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants