On Thu, Jul 23, 2009 at 02:46:44PM +0200, Frans Pop wrote: > On Saturday 18 July 2009, Sam Ravnborg wrote: > > > I based my patch on arch/x86/Makefile: > > > 35: KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \ > > > 36: echo $(call cc-option,-fno-unit-at-a-time); fi ;) > > > > > > Guess that could be improved to use cc-ifversion then. > > > > Yes, please... > > I've got patches for x86, ia64, powerpc and um, but have a couple of > questions before I submit them. > > Can the patches go through your kbuild tree or should they go through the > arch trees (they will be CCed of course)? Preferably the arch tress, but I will take what they do not apply. > > In my patches I've left the cc-option check where it existed, so for x86 > you get (tested to work): > - KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \ > - echo $(call cc-option,-fno-unit-at-a-time); fi ;) > + KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0400, \ > + $(call cc-option,-fno-unit-at-a-time)) > > Or is it safe to simplify that to just: > + KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0400, -fno-unit-at-a-time) > ? I think not. The latter would require all gcc versions > 4.00 to support that, option and looking at the oroginal code it does not. > > > > And a quick git grep gives a few other potential candidates: > > > arch/parisc/Makefile:129: @if test "$(call cc-version)" -lt "0303"; then \ > > I left this one unchanged as it does not add a compiler option; instead it > displays an "unsupported' message. Yes - this is something different. [I'm away for a few days - will check up on your patches when I'm back]. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html