Re: lang/llvm15 -- Why is flang being built?

From: Brooks Davis <brooks_at_freebsd.org>
Date: Mon, 30 Jan 2023 19:38:22 UTC
On Mon, Jan 30, 2023 at 02:18:20PM -0500, Theron wrote:
> On 1/30/23 13:37, Brooks Davis wrote:
> > On Mon, Jan 30, 2023 at 09:17:07PM +0300, Gleb Popov wrote:
> >> On Mon, Jan 30, 2023 at 7:59 PM Steve Kargl
> >> <sgk@troutmask.apl.washington.edu> wrote:
> >>> % flang15 -o z a.f90
> >>> error: /usr/ports/devel/llvm15/work/llvm-project-15.0.7.src/flang/lib/Optimizer/CodeGen/Target.cpp:312: not yet implemented: target not implemented
> >>> % flang-new15 -o z a.f90
> >>> error: /usr/ports/devel/llvm15/work/llvm-project-15.0.7.src/flang/lib/Optimizer/CodeGen/Target.cpp:312: not yet implemented: target not implemented
> >>>
> >>> Inspection of Target.cpp shows that the word "FreeBSD"
> >>> does not appear anywhere.
> >>>
> >>> --
> >>> Steve
> >>>
> >> This was fixed shortly after the release, but Flang itself still isn't
> >> capable of producing working executables. It should probably be turned
> >> off for now.
> > I'll turn it off by default in llvm15 and the upcoming llvm16.
> >
> > -- Brooks
> 
> with llvm-devel 16.0.d20230109 :
> 
> % /usr/local/llvm-devel/bin/flang -o orbit orbit.f90?? -O3 -Wall -Wextra 
> -Werror?? -L/usr/local/llvm-devel/lib -lFortran_main -lFortranRuntime 
> -lFortranDecimal -lm
> 
> produces a working executable for me, with results agreeing within 1ULP 
> with those of the executable compiled by devel/flang (expired).?? 
> Performance is reasonable (though inferior, but this is only one test).
> Thus basic executable functionality, and at least one real world program 
> work.?? I do not see a reason to omit flang from upcoming llvm16.

Excellent.  Thank you for the report.

-- Brooks