rj-jesus wrote:
> The solution is to add `-fno-fortran-main` to the linker options via
> `CMAKE_SHARED_LINKER_FLAGS`. This will need PR #74139 land first. But this
> option will be a good way to control if the flang compiler should attempt
> linking in the `main` stub from its library.
>
>
rj-jesus wrote:
> > Chipping into the discussion, since this patch I can also no longer build
> > OpenBLAS or PETSc. OpenBLAS for example fails with
> > ```
> > $ clang -v -O3 -mcpu=native -DHAVE_C11 -Wall -DF_INTERFACE_GFORT -fPIC
> > -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=72
rj-jesus wrote:
Chipping into the discussion, since this patch I can also no longer build
OpenBLAS or PETSc. OpenBLAS for example fails with
```
$ clang -v -O3 -mcpu=native -DHAVE_C11 -Wall -DF_INTERFACE_GFORT -fPIC
-DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=72 -DMAX_PARALLEL_NUMBER=1