Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLD: fortran: only use
-std=legacy
for gfortran
Support in other compilers for this flag is quite patchy, leading to build errors and requiring workarounds in distros - see for example: - scipy#19447 - mesonbuild/meson#12306 - https://github.com/conda-forge/scipy-feedstock/blob/1a8ff378bebd3f0b0bc6a2d1662a77d194ac59a1/recipe/bld.bat#L25 - https://github.com/spack/spack/blob/73316c3e286d548b22dc65667810e4631479c3ea/var/spack/repos/builtin/packages/py-scipy/package.py#L235-L238 Compilers that do not support it include at least Flang and AOCC (the AMD Fortran compiler). This should be fixed upstream in Meson by not passing the flag for compilers that don't support it, and then we can revert this change. But for now it's very useful to avoid bothering users of these compilers with having to override that flag manually. This does give the following warning with `gfortran` now, but that can't be helped unfortunately: ``` WARNING: Consider using the built-in option for language standard version instead of using "-std=legacy". ```
- Loading branch information