On Mon, Oct 30, 2017 at 6:11 AM, Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote: > `make CFLAGS='-arbitrary -flags'` is quite common, and people generally > expect it to work, though it isn't *shocking* when it breaks. Though the > exact boundary for what should get overridden by that and what should > remain seems a bit fuzzy. Roughly speaking, if the application normally > wants to build with "-O2 -ffooish-bar -Wall -Wanother -I/some/path" , > then `make CFLAGS='-Os -arbitrary -flags'` should build with "-Os > -arbitrary -flags -Wall -Wanother -Isome-path`. I think. Thanks for the feed back. Yes, there is some project do that. Those project also document it. On the other hand, some cmake project don't use CFLAGS at all as far as I can tell. So I think as long as the project provide clear document for what it expect to be override from command line, the package builder use it consistently. That is fine. > I think it's worth not putting anything into CFLAGS that would break the > build if missing. > > For instance, git's Makefile specifically says "# CFLAGS and LDFLAGS are > for the users to override from the command line.", and then just has > "CFLAGS = -g -O2 -Wall". It then has additional variables like We can do that for sparse if some one want to use it his way. On the other hand, I think it is up to the package to decide what to be allow to override. The package builder should not take it for granted that very package should work in this way. Some project don't use CFLAGS at all. Provide the interface as needed, then document it. That seems to be the right thing to do. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html