[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120412194016.GA30558@merkur.ravnborg.org>
Date: Thu, 12 Apr 2012 21:40:16 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org, x86@...nel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/2] Add CONFIG_READABLE_ASM
On Thu, Apr 12, 2012 at 09:08:36PM +0200, Geert Uytterhoeven wrote:
> Hi Andi,
>
> On Wed, Mar 28, 2012 at 20:51, Andi Kleen <andi@...stfloor.org> wrote:
> > +ifdef CONFIG_READABLE_ASM
> > +# Disable optimizations that make assembler listings hard to read.
> > +# reorder blocks reorders the control in the function
> > +# ipa clone creates specialized cloned functions
> > +# partial inlining inlines only parts of functions
> > +KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
> > + $(call cc-option,-fno-ipa-cp-clone,) \
> > + $(call cc-option,-fno-partial-inlining)
> > +endif
Could people move to this century and drop these ugly "\" line-continuations please...
People seems to get along in C without but think they should be used in Makefiles..
> This (now in linux-next) causes m68k/allmodconfig to fail for me:
>
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CC kernel/bounds.s
> cc1: error: unrecognized command line option "-fno-ipa-cp-clone"
>
> Somehow, "$(call cc-option,-fno-ipa-cp-clone,)" doesn't detect that my
> toolchain (gcc version 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21))
> doesn't support this option.
>
> I tried playing with the trailing comma (why do the first 2 tests have it,
> and the 3rd one doesn't?), but that didn't make a difference.
The trailing comma does not have any affect - it is only ugly and should be dropped.
You should try cc-diasable-warning like this:
KBUILD_CFLAGS += $(call cc-disable-warning, ipa-cp-clone)
from Documentation/kbuild/makefiles.txt:
cc-disable-warning
cc-disable-warning checks if gcc supports a given warning and returns
the commandline switch to disable it. This special function is needed,
because gcc 4.4 and later accept any unknown -Wno-* option and only
warn about it if there is another warning in the source file.
Example:
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
In the above example, -Wno-unused-but-set-variable will be added to
KBUILD_CFLAGS only if gcc really accepts it.
The documentation refer to gcc 4.4 - but maybe the older gcc you have
has the same behaviour.
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists