Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442056 - Additional checks for sanity of user-supplied *FLAGS variables in make.conf
Summary: Additional checks for sanity of user-supplied *FLAGS variables in make.conf
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
Reported: 2012-11-06 16:00 UTC by Petr Polezhaev
Modified: 2012-11-06 16:12 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Polezhaev 2012-11-06 16:00:28 UTC
There is well known issue with badly written build systems which are expecting space to be mandatory separator for tokens in *FLAGS variables.

Namely boost-build (but many others, including hand-written).

In many cases extra spaces and, especially, new line characters may confuse build systems and lead to strange errors or, which is worse, to silently ignoring user's flags.

Proper separation of "extra spaces" from not "extra spaces" in automatic way could not be possible, but, at least, simple cases like trailing or initial spaces, tabs and new lines characters are possible to detect.

As example of such variable:


     -march=native -mtune=native

As misbehavior of build-system in case of for such formatted variables are upstream bugs, I suggest not to try auto-fix this issues, but simply warn users about possible problems with ability to disable warning for developers/users who want to test software.

Please refer #441866 comment 5 and 6 by Jeroen Roovers and consult him for his vast knowledge about this issue.