lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: fix wrong DEBUG configuration

* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Em Wed, May 20, 2015 at 03:29:37PM +0200, Martin Liška escreveu:
> > On 05/20/2015 03:17 PM, Arnaldo Carvalho de Melo wrote:
> > >Em Wed, May 20, 2015 at 03:07:39PM +0200, Martin Liška escreveu:
> > >>Currently, GCC optimizes -O6 same as -O3 level. Right optimize debugging
> > >>experience is given by passing -Og to compiler.
>
> > >Is this is this -Og available in old gcc versions? When was it
> > >introduced? Do you know?
>
> > GCC 4.8.0 is the first version capable of the option: https://gcc.gnu.org/gcc-4.8/changes.html.
> > That can be problematic, which GCC version do you support in linux/perf?
>
> So the rule has been: What are the kernel requirements for the
> toolchain? tools/perf/ should build with that.

So we could use -Og if it works, like Kbuild does it:

KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)

the 'cc-option' Make function does some magic of silently calling GCC
with that option and observing the result.

See:

scripts/Kbuild.include:cc-option = $(call try-run,\

et al.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-05-20 17:41    [W:0.056 / U:2.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site