The Flang (Fortran 2018 compiler) is the part of the latest LLVM-11 project release. Could llvm@gentoo project add this package to portage tree? Reproducible: Always
Related release notes: https://releases.llvm.org/11.0.0/tools/flang/docs/ReleaseNotes.html
Note: "Flang is not yet able to generate LLVM IR for the source code and thus is unable to compile a running binary. Flang is able to unparse the input source code into a canonical form and emit it to allow testing. Flang can also invoke an external Fortran compiler on this canonical input." I'll tentatively assign this to llvm@ but they may not want the workload. If that's the case, llvm@, just assign to maintainer-wanted@.
I think that last I checked it, flang depended on mlir, and mlir did not support standalone builds.
LLVM 13 marks the official release of Flang. Any chance we can get an ebuild? It's been 2 releases and maybe mlir can be built stand alone now?
(In reply to unhappy-ending from comment #4) > LLVM 13 marks the official release of Flang. Any chance we can get an > ebuild? It's been 2 releases and maybe mlir can be built stand alone now? I'll verify that and try to package them today.
Nope, it's not ready yet. It doesn't explode right away but it needs a lot of hacks to even build correctly. I've gotten as far as to having tools installed and I've decided it's not worth the effort. Someone really needs to start fixing this upstream. For a start, make tools buildable and installable without hacks and linking to libMLIR.so. If someone wants to play with it, the ebuild's on 'mlir-wip' branch of https://github.com/mgorny/gentoo.
(In reply to Michał Górny from comment #6) > Nope, it's not ready yet. It doesn't explode right away but it needs a lot > of hacks to even build correctly. I've gotten as far as to having tools > installed and I've decided it's not worth the effort. > > Someone really needs to start fixing this upstream. For a start, make tools > buildable and installable without hacks and linking to libMLIR.so. > > If someone wants to play with it, the ebuild's on 'mlir-wip' branch of > https://github.com/mgorny/gentoo. Is it current problem to provide the both proper build and slotted installation of mril for further use of it? Or is mril almost ready to use and is problem with flang build itself?
Maybe it could help anyone: I found fedora spec files for mlir [1] and flang [2] with their patches. The mlir is compile for me not fast ('dev-python/lit' should be installed before src_configure() phase to run tests). The one of the main difference from mlir ebuild provided by Michał Górny is option `-DBUILD_SHARED_LIBS=OFF`. With this option enabled build provides smaller number of .so files with many static libs. The list of syn libs after src_install() phase is: ``` # tree | grep "\.so" │ ├── libMLIR.so -> libMLIR.so.13 │ ├── libMLIR.so.13 │ ├── libmlir_async_runtime.so -> libmlir_async_runtime.so.13 │ ├── libmlir_async_runtime.so.13 │ ├── libmlir_c_runner_utils.so -> libmlir_c_runner_utils.so.13 │ ├── libmlir_c_runner_utils.so.13 │ ├── libmlir_runner_utils.so -> libmlir_runner_utils.so.13 │ └── libmlir_runner_utils.so.13 ``` instead of list of 177 dynamic libraries (+ symlinks) without `-DBUILD_SHARED_LIBS=OFF` option. My cpu is slow so testing of trying to create flang ebuild will take long time. [1] : https://src.fedoraproject.org/rpms/mlir/blob/rawhide/f/mlir.spec [2] : https://src.fedoraproject.org/rpms/flang/blob/rawhide/f/flang.spec