The devmanual now contains a list of "user environment" variables, https://devmanual.gentoo.org/ebuild-writing/variables/#user-environment including CFLAGS and the like, along with an explanation of how ebuilds should use them. Can someone familiar with fortran in Gentoo please add FCFLAGS and/or FFLAGS to the list? As I wrote on bug #730610, the problem is that, > POSIX/GNU make mention only FC and FFLAGS, whereas autoconf and automake have > adopted their own conventions (F77 vs FC, FFLAGS vs FCFLAGS) to separate the > handling of modern and legacy fortran code. Not all upstreams support the new > names, so we need to decide if ebuilds should take e.g. a user's FCFLAGS and > shoehorn them into FFLAGS if FFLAGS are what some package uses for modern > fortran code. Ultimately, users need to have some idea how to pass flags to their fortran compilers in a consistent way. Assigning to sci@ as the most likely project to be able to answer these questions.
From what I know of, a lot of the more important current projects are still using FC and FFLAGS, i.e. sticking to the old convention, e.g. scipy, reference-lapack and openblas. Then there are projects like openmpi, which seem to have both FCFLAGS and FFLAGS being used, though their official documentation only mentions FCFLAGS. No clue what is good solution here. The problem becomes when we add FCFLAGS to FFLAGS and upstream build system also does that... Not sure what will burn.