public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 05/27] perf tools: Move compiler and linker flags check into config/Makefile
Date: Tue, 2 Apr 2013 01:06:27 +0200	[thread overview]
Message-ID: <20130401230627.GD20943@krava.redhat.com> (raw)
In-Reply-To: <1364854825.1728.19.camel@leonhard>

On Tue, Apr 02, 2013 at 07:20:25AM +0900, Namhyung Kim wrote:
> 2013-04-01 (월), 21:18 +0200, Jiri Olsa:
> > Moving compiler and linker flags check into config/Makefile.
> 
> [SNIP]
> 
> > diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> > index 8dd3320..dcae71b 100644
> > --- a/tools/perf/Makefile
> > +++ b/tools/perf/Makefile
> > @@ -52,6 +52,20 @@ include config/utilities.mak
> >  #
> >  # Define NO_LIBNUMA if you do not want numa perf benchmark
> >  
> > +ifeq ($(srctree),)
> > +srctree := $(patsubst %/,%,$(dir $(shell pwd)))
> > +srctree := $(patsubst %/,%,$(dir $(srctree)))
> > +#$(info Determined 'srctree' to be $(srctree))
> > +endif
> > +
> > +ifneq ($(objtree),)
> > +#$(info Determined 'objtree' to be $(objtree))
> > +endif
> > +
> > +ifneq ($(OUTPUT),)
> > +#$(info Determined 'OUTPUT' to be $(OUTPUT))
> > +endif
> > +
> 
> Question, what's the difference between objtree and OUTPUT?

check top stuff at 'tools/scripts/Makefile.include'

OUTPUT ties with $(subdir), while objtree is pure $(O)

I didn't use the 'tools/scripts/Makefile.include' include
the Makefile.kbuild, just defined OUTPUT variable

The Makefile.kbuild processing is allways based on git tree root,
and all binaries are prefixed $(objtree) or $(obj-perf) and all
source code is prefixed with $(srctree) or $(src-perf)

> 
> 
> > +ifndef PERF_DEBUG
> > +	CFLAGS_OPTIMIZE = -O6
> > +endif
> 
> Is this -O6 really supported by gcc?

hmm, no doc.. and quick google found just your question ;)

> 
> > +
> > +ifdef PARSER_DEBUG
> > +	PARSER_DEBUG_BISON  := -t
> > +	PARSER_DEBUG_FLEX   := -d
> > +	PARSER_DEBUG_CFLAGS := -DPARSER_DEBUG
> > +endif
> > +
> > +CFLAGS = -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
> 
> Please break this line into multiple CFLAGS += ... lines as Sam said.
> 

ok

SNIP

> > +
> > +BASIC_CFLAGS = \
> > +	-Iutil/include \
> > +	-Iarch/$(ARCH)/include \
> > +	$(if $(objtree),-I$(objtree)/arch/$(ARCH)/include/generated/uapi) \
> > +	-I$(srctree)/arch/$(ARCH)/include/uapi \
> > +	-I$(srctree)/arch/$(ARCH)/include \
> > +	$(if $(objtree),-I$(objtree)/include/generated/uapi) \
> > +	-I$(srctree)/include/uapi \
> > +	-I$(srctree)/include \
> > +	-I$(OUTPUT)util \
> > +	-Iutil \
> > +	-I. \
> > +	-I$(TRACE_EVENT_DIR) \
> > +	-I../lib/ \mktemp
> > +	-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> 
> And this too.  Btw do we really need this many include directories?
> 
ok, I tried to sort it out in another patch:
    perf tools: Switch to full patch C include directories

thanks,
jirka

  reply	other threads:[~2013-04-01 23:07 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 19:18 [RFC 00/27] perf tools: Build changes and kbuild support Jiri Olsa
2013-04-01 19:18 ` [PATCH 01/27] perf tools: Add automated make test suite Jiri Olsa
2013-04-01 19:53   ` Sam Ravnborg
2013-04-01 21:09     ` Jiri Olsa
2013-04-01 19:18 ` [PATCH 02/27] perf tools: Fix tab vs spaces issue in Makefile ifdef/endif Jiri Olsa
2013-04-01 19:49   ` Sam Ravnborg
2013-04-01 21:11     ` Jiri Olsa
2013-04-01 19:18 ` [PATCH 03/27] perf tools: Move arch check into config/Makefile Jiri Olsa
2013-04-01 19:54   ` Sam Ravnborg
2013-04-01 21:07     ` Jiri Olsa
2013-04-01 21:54   ` Namhyung Kim
2013-04-01 22:00     ` Jiri Olsa
2013-04-01 19:18 ` [PATCH 04/27] perf tools: Move programs " Jiri Olsa
2013-04-01 22:09   ` Namhyung Kim
2013-04-01 22:27     ` Jiri Olsa
2013-04-02  3:59       ` Namhyung Kim
2013-04-01 19:18 ` [PATCH 05/27] perf tools: Move compiler and linker flags " Jiri Olsa
2013-04-01 22:20   ` Namhyung Kim
2013-04-01 23:06     ` Jiri Olsa [this message]
2013-04-01 19:18 ` [PATCH 06/27] perf tools: Move libelf check config " Jiri Olsa
2013-04-01 19:18 ` [PATCH 07/27] perf tools: Move libdw " Jiri Olsa
2013-04-01 19:18 ` [PATCH 08/27] perf tools: Move libunwind " Jiri Olsa
2013-04-01 19:18 ` [PATCH 09/27] perf tools: Move libaudit " Jiri Olsa
2013-04-01 19:18 ` [PATCH 10/27] perf tools: Move slang " Jiri Olsa
2013-04-01 19:18 ` [PATCH 11/27] perf tools: Move gtk2 " Jiri Olsa
2013-04-01 19:18 ` [PATCH 12/27] perf tools: Move libperl " Jiri Olsa
2013-04-01 19:18 ` [PATCH 13/27] perf tools: Move libpython " Jiri Olsa
2013-04-01 19:18 ` [PATCH 14/27] perf tools: Move libbfd " Jiri Olsa
2013-04-01 19:18 ` [PATCH 15/27] perf tools: Move stdlib " Jiri Olsa
2013-04-01 19:18 ` [PATCH 16/27] perf tools: Move libnuma " Jiri Olsa
2013-04-01 19:18 ` [PATCH 17/27] perf tools: Move paths " Jiri Olsa
2013-04-01 19:18 ` [PATCH 18/27] perf tools: Final touches for CHK config move Jiri Olsa
2013-04-01 19:18 ` [PATCH 19/27] perf tools: Merge all *CFLAGS* make variable into CFLAGS Jiri Olsa
2013-04-01 19:18 ` [PATCH 20/27] perf tools: Merge all *LDFLAGS* make variable into LDFLAGS Jiri Olsa
2013-04-01 19:18 ` [PATCH 21/27] perf tools: Switch to full patch C include directories Jiri Olsa
2013-04-01 19:18 ` [PATCH 22/27] perf tools: Add NO_BIONIC variable to confiure bionic setup Jiri Olsa
2013-04-01 19:18 ` [PATCH 23/27] kbuild: Introduce KBUILD_AUTOCONF variable for auto.conf include Jiri Olsa
2013-04-01 19:18 ` [PATCH 24/27] kbuild: Introduce KCONFIG_AUTOCONFIGDEP variable for conf tool Jiri Olsa
2013-04-11 10:29   ` Michal Marek
2013-04-01 19:18 ` [PATCH 25/27] perf tools: Kbuild builtin source related fixies Jiri Olsa
2013-04-01 19:18 ` [PATCH 26/27] perf tools: Kbuild " Jiri Olsa
2013-04-01 19:18 ` [PATCH 27/27] perf tools: Add kbuild support into Makefile.kbuild Jiri Olsa
2013-04-01 20:03   ` Sam Ravnborg
2013-04-01 21:05     ` Jiri Olsa
2013-04-01 20:45 ` [RFC 00/27] perf tools: Build changes and kbuild support David Ahern
2013-04-01 21:18   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130401230627.GD20943@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=bp@alien8.de \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox