As many of you probably know, ago@ has been expanding the scope of our
CFLAGS/CC support to include some other common build variables:

  * CC
  * CXX
  * AR
  * CPP
  * NM
  * RANLIB
  * AS
  * LD

Some of those are POSIX standards[0],

  * CC
  * AR

Others are de-facto GNU make standards[1],

  * CXX
  * CPP
  * AS

and a few are de-facto GNU libtool standards[2]:

  * NM
  * RANLIB
  * LD

If we expect them all to work properly in Gentoo, we have to agree on
what they mean, and thus how they should be injected into build systems.
For example, we had a problem with sci-mathematics/pari, whose upstream
is using the LD environment variable for something other than what GNU
libtool uses it for. With LD set to something libtooly in the
environment, the pari build fails. We can solve that by unsetting LD in
the ebuild, but for that to be The Right Thing To Do, we should be
expecting LD to contain something libtooly, and thus something
inappropriate to be passed to the pari build.

To avoid these issues, I suggest creating a list of "Gentoo environment
variables" in the devmanual with descriptions of how they should be used
and pointers to the references (for why we chose that meaning). That way
a user can export LD, for example, and know that it will be used how he
thinks it will be used.


[0] https://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html

[1]
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

[2] https://www.gnu.org/software/libtool/manual/libtool.html

Reply via email to