Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684894 - Add wrappers for cc/c++ and other compilers and build tools to portage's PATH to catch ebuilds that don't respect CC
Summary: Add wrappers for cc/c++ and other compilers and build tools to portage's PATH...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-01 18:54 UTC by Patrick McLean
Modified: 2020-05-30 09:33 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2019-05-01 18:54:52 UTC
We could easily catch ebuilds that don't respect CC (and LD and other system programs) by adding shell scripts (or a single script with a bunch of symlinks) to portage's PATH that record when they are called. then exec the "proper" program (like "cc" would 'exec "${CC}"''. If the scripts ever get called during a phase, then we could trigger a QA warning for that phase.

The standard portage install should include wrappers for all common programs that build systems often call that should be overridden.

We could even make a FEATURE (say call it strict-progs) that makes these shell scripts simply "exit 1" so the build will fail if a package doesn't respect one of the program variables. Developers could be encouraged to enable this feature so they catch any ebuilds that aren't respecting variables such as CC.