[Flang-dev] First sucessful build and use.

bunbury28+john john at bunbury28.plus.com
Thu Aug 24 11:37:53 EDT 2017


I have just succeeded to run flang for the first time.

I built LLVM + modified clang + openmp using gcc 4.9.2

I have then build flang separately, again using gcc 4.9.2 rather than
clang itself. I put in the command -DCMAKE_Fortran_COMPILER=flang and I
notice the build does do some fortran compiles.  That has all run.

make install included a couple of strange things in the output.

-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/lib/libflangrti.a
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/lib/libflangrti.so
-- Set runtime path of
"/home/fletcher/LLVM/flang-4.0.0/local/lib/libflangrti.so" to ""
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/lib/libflang.a
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/lib/libflang.so
-- Set runtime path of
"/home/fletcher/LLVM/flang-4.0.0/local/lib/libflang.so" to ""
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/lib/libflangmain.a
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/bin/flang1
-- Installing: /home/fletcher/LLVM/flang-4.0.0/local/bin/flang2

I was puzzled at setting strings to ""

I then made the example and compiled it like this:

../local/bin/flang hello.f90 -Xlinker -R../local/lib -L../local/lib -o
hello_flang

where the command to linker was needed to find libomp.so

So I am up and running and very pleased to have this.

John





More information about the flang-dev mailing list