Created attachment 647486 [details, diff] 0001-ebuild-writing-variables-add-a-User-environment-sect.patch Per https://archives.gentoo.org/gentoo-dev/message/7550d3e2c372da5f861bb04d9a751f2d I've CC'ed toolchain/sci for some advice on FFLAGS/FCFLAGS. Autoconf seems to use FCFLAGS as a replacement for FFLAGS with modern implementations, but I've left it out of the list for now because I'm not sure how to document it. Here's the autoconf documentation: https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Fortran-Compiler.html But note that POSIX pairs up "FC" for the fortran compiler with "FFLAGS".
Some remarks: - Most of the external links are repeated multiple times. Would it be an option to mention them only on their first occurence? - Certainly there must be a better reference for as than some third-party http url (which looks like a copyright violation)? - Use the Gentoo ${FOO} convention for variable references. Currently there are references like $FOO or $(FOO). - Use <c> where appropriate in examples (i.e., almost everywhere). - Whitespace issues, look at https://devmanual.gentoo.org/appendices/devbook-guide/index.html#coding-style
Created attachment 649480 [details, diff] 0001-ebuild-writing-variables-add-a-User-environment-sect.patch Here's a new version. I think I've fixed the whitespace coding style issues. The links now only appear once, in a list above the table. And I've used <c> and ${FOO} everywhere. That leaves the reference for "as", which really is the best I could find. I'm open to suggestions. I've also removed the fortran stuff for now. A decision needs to be made here, but it should be made by people who use fortran. 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.
Created attachment 649494 [details, diff] 0001-ebuild-writing-variables-add-a-User-environment-sect.patch Just kidding, here's the updated patch. GTK's file picker loves to show me the last thing I uploaded two weeks ago instead of the directory I'm in.
Any chance of getting this merged? sci-mathematics/maxima is using LDFLAGS incorrectly and it would be nice to have a place to send them.
Yeah, the "as" reference shouldn't be a blocker. OK if I omit that link altogether?
(In reply to Ulrich Müller from comment #5) > OK if I omit that link altogether? Yeah, sure.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d9793d70892f5107f4a140e14dfec15997ef65cc commit d9793d70892f5107f4a140e14dfec15997ef65cc Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-07-02 19:48:52 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2021-03-26 19:05:36 +0000 ebuild-writing/variables: add a "User environment" section. Gentoo has always tried to respect a user's CFLAGS environment variable, ensuring that it is passed to the underlying build system. Likewise, CC and LDFLAGS are well-respected these days. Recently, we have added some other variables to this list, like NM, RANLIB, LD, and AS. The meanings of most of these are enshrined in toolchain-funcs.eclass, but in order to properly support them, we must document their intended use so that user's can set them to the correct value and developers can inject them into the right spot in the upstream build system. One motivating example package is PARI, whose build system interprets the LD environment variable in a different way than GNU librool interprets it. If a user sets LD to something appropriate for libtool, the PARI build will fail, and conversely; that is, without help from the ebuild. This commit adds a new section to the ebuild-writing/variables page documenting the origin and intended use of these variables within Gentoo. This should ensure that users and Gentoo developers agree on their meanings, and will guide ebuild development when a problematic upstream build system is encountered. Closes: https://bugs.gentoo.org/730610 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> [Remove URI for "as". Whitespace fixes.] Signed-off-by: Ulrich Müller <ulm@gentoo.org> ebuild-writing/variables/text.xml | 163 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+)