On Tue, May 25, 2010 at 03:39:29PM -0400, Steven Rostedt wrote: > [ Added Michal to Cc ] > > > > > ok, here's what we've come up with based on Ingo's suggestion. Any > > chance this feature can be considered for 2.6.35? I've a got a few > > other small fixes too... > > > > thanks, > > > > -Jason > > > > diff --git a/Makefile b/Makefile > > index 85edb67..b51ddfb 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -582,6 +582,11 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) > > # conserve stack if available > > KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) > > > > +# check for 'asm goto' > > +ifeq ($(shell sh -c "(echo 'int main(void) { entry: asm goto (\"\"::::entry); return 0; }') | $(CC) -x c - >/dev/null 2>&1 && echo y"), y) > > + KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO > > +endif > > Yeah, also this would help prevent bugs with other archs where the GCC > version may not have supported it either. > > Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx> Could we move this to a small well-commented helper script like we do with gcc-version.sh? Then we could simply do something like this in the top-level Makefile: # Check if gcc support' asm goto' ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC))),y) KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO endif The top-level Makefile needs to be simpler - not more complicated. PS. I think Michal is away until the end of this month. 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