lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161114143714.GA22291@kernel.org>
Date:   Mon, 14 Nov 2016 11:37:14 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Andi Kleen <andi@...stfloor.org>,
        William Cohen <wcohen@...hat.com>,
        Stephane Eranian <eranian@...gle.com>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 1/3] tools build: Add CFLAGS_REMOVE_* support

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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ