Yes, flang-new is still not widely supported in fpm.
I have opened a PR to introduce flang-new syntax in the openmp metapackage.
Contributions welcome!
However, please note that:
federico@Federicos-MBP tmp % flang-new --version
Homebrew flang-new version 19.1.7
Target: arm64-apple-darwin24.3.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/flang/19.1.7/libexec
Configuration file: /opt/homebrew/Cellar/flang/19.1.7/libexec/flang.cfg
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
federico@Federicos-MBP tmp % cat to.f90 && flang-new -fopenmp to.f90
program openmp_test
use omp_lib, only: omp_get_thread_num
implicit none
!$omp parallel
print *, 'Hello from tread ',omp_get_thread_num()
!$omp end parallel
! Successful return
stop 0
end program openmp_test
ld: library 'omp' not found
flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
federico@Federicos-MBP tmp %
I am no flang-new user but it looks like (at least on macOS with homebrew) there are some missing libraries that the compiler can’t link against.
Please also note that fpm maps flang to “classic flang”. I am no expert in this family of compilers, but I believe the community will soon have to decide and settle on how to differentiate between “classic flang” and “flang-new” which seems it may become the mainstream “flang”.
Last I recall looking at this, fpm currently only recognizes the new LLVM flang if it is named flang-new, and treats other flang executables as though they are classic flang.