linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Andi Kleen <andi@firstfloor.org>,
	William Cohen <wcohen@redhat.com>,
	Stephane Eranian <eranian@google.com>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH 1/3] tools build: Add CFLAGS_REMOVE_* support
Date: Mon, 14 Nov 2016 11:37:14 -0300	[thread overview]
Message-ID: <20161114143714.GA22291@kernel.org> (raw)
In-Reply-To: <20161114143614.GE27058@kernel.org>

Em Mon, Nov 14, 2016 at 11:36:14AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Nov 02, 2016 at 02:35:47PM +0100, Jiri Olsa escreveu:
> > Adding support to remove options from final CFLAGS
> > for both object file and build target. It's now
> > possible to remove CFLAGS options like:
> > 
> >   CFLAGS_REMOVE_krava.o += -Wstrict-prototypes
> 
> That is cool, and I just looked and this comes from the kernel sources,
> is there some place where the subset of such features that is supported
> in tools/build is being documented?
> 
> Applying it, thanks.

Duh, yeah:

tools/build/Documentation/Build.txt

Nevermind, I'll add a note to the cset log.

- Arnaldo
 
> - Arnaldo
>  
> > Link: http://lkml.kernel.org/n/tip-0t59dihg30fh035xo69df3m8@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  tools/build/Build.include           | 4 +++-
> >  tools/build/Documentation/Build.txt | 6 ++++--
> >  2 files changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/build/Build.include b/tools/build/Build.include
> > index 1dcb95e76f70..c4ae12a5d0a5 100644
> > --- a/tools/build/Build.include
> > +++ b/tools/build/Build.include
> > @@ -89,7 +89,9 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)),             \
> >  # - per target C flags
> >  # - per object C flags
> >  # - BUILD_STR macro to allow '-D"$(variable)"' constructs
> > -c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
> > +c_flags_1 = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
> > +c_flags_2 = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(c_flags_1))
> > +c_flags   = $(filter-out $(CFLAGS_REMOVE_$(obj)), $(c_flags_2))
> >  cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj))
> >  
> >  ###
> > diff --git a/tools/build/Documentation/Build.txt b/tools/build/Documentation/Build.txt
> > index a47bffbae159..a22587475dbe 100644
> > --- a/tools/build/Documentation/Build.txt
> > +++ b/tools/build/Documentation/Build.txt
> > @@ -135,8 +135,10 @@ CFLAGS
> >  
> >  It's possible to alter the standard object C flags in the following way:
> >  
> > -  CFLAGS_perf.o += '...' - alters CFLAGS for perf.o object
> > -  CFLAGS_gtk += '...'    - alters CFLAGS for gtk build object
> > +  CFLAGS_perf.o        += '...'  - adds CFLAGS for perf.o object
> > +  CFLAGS_gtk           += '...'  - adds CFLAGS for gtk build object
> > +  CFLAGS_REMOVE_perf.o += '...'  - removes CFLAGS for perf.o object
> > +  CFLAGS_REMOVE_gtk    += '...'  - removes CFLAGS for gtk build object
> >  
> >  This C flags changes has the scope of the Build makefile they are defined in.
> >  
> > -- 
> > 2.7.4

  reply	other threads:[~2016-11-14 14:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 13:35 [PATCH 0/3] perf tools: Plug jvmti compilation into perf build Jiri Olsa
2016-11-02 13:35 ` [PATCH 1/3] tools build: Add CFLAGS_REMOVE_* support Jiri Olsa
2016-11-14 14:36   ` Arnaldo Carvalho de Melo
2016-11-14 14:37     ` Arnaldo Carvalho de Melo [this message]
2016-11-15 10:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-11-02 13:35 ` [PATCH 2/3] tools build: Add jvmti feature detection support Jiri Olsa
2016-11-15 10:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-11-02 13:35 ` [PATCH 3/3] perf tools: Plug jvmti compilation into perf build Jiri Olsa
2016-11-15 10:43   ` [tip:perf/core] perf jvmti: Plug " tip-bot for Jiri Olsa
2016-11-11  9:51 ` [PATCH 0/3] perf tools: Plug jvmti " Jiri Olsa
2016-11-11 15:13   ` Stephane Eranian
2016-11-11 23:18 ` Stephane Eranian
2016-11-12 12:10   ` [PATCH] perf tools: Remove jvmti/Makefile file Jiri Olsa
2016-11-15 10:43     ` [tip:perf/core] perf kvmti: Remove unused Makefile file tip-bot for 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=20161114143714.GA22291@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wcohen@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).