On Wed, Oct 18, 2017 at 11:08 PM, Jeff Layton <jlayton@xxxxxxxxxxxxxxx> wrote: > On Wed, 2017-10-18 at 22:21 +0200, Luc Van Oostenryck wrote: >> On Wed, Oct 18, 2017 at 10:00 PM, Jeff Layton <jlayton@xxxxxxxxxxxxxxx> wrote: >> > >> > Ahh ok...so this is probably the correct fix then? >> >> I guess so but I don't really know how and what you're overriding. >> Something like: >> make CFLAGS="-O3 -some-others-flags" >> > > Yes, quite similar to that. Yes, I saw in your other email. > Overriding is probably the wrong word. We just want to pass in a > baseline set of CFLAGS and then make can add that on to whatever it likes. Yes, very usual. > IIUC, the CFLAGS variable is sort of an autotools-ism. We could call it > something else, but that's sort of the bog-standard way that this is > done. I tend to avoid autotool but CFLAGS and friends are used with (g)make builtin rules, so yes, very standard (and probably predate autotool). > FWIW, the weird bit here is that the ALL_CFLAGS variable gets reexpanded > like you'd expect when you don't pass in CFLAGS on the command line. > It's only when we do that this thing seems to break. > > That seems sort of unexpected, IMO, but since we're passing ALL_CFLAGS > to gcc, it makes sense to add these extra options on there in the > makefile. > > >> To be honest, I don't like much sparse's makefile and I don't see the real need >> for BASIC_CFLAGS & ALL_CFLAGS. >> On the other hand, I understand very well the need for an explicit mechanism for >> adding or changing some CFLAGS's flags >> > > Yeah, even though it's a pretty simple program, using something like > autotools or cmake would give all of this the benefit of better > familiarity for packaging. That also tends to be lower maintenance over > the long haul of a project in my experience. It's really not the way I would go but, yes, some cleanups and standardization would be very welcome. -- Luc -- 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