lkml.org 
[lkml]   [2019]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/10] libperf: Add _GNU_SOURCE define to compilation
On Fri, Oct 18, 2019 at 03:07:38PM -0300, Arnaldo Carvalho de Melo wrote:
>
> Why?

it's passed when the library is compiled with perf, but not
when you compile it standalone.. and 2 '-D_GNU_SOURCE' on
command line are ok

jirka

>
>
> Em Thu, Oct 17, 2019 at 12:59:13PM +0200, Jiri Olsa escreveu:
> > Link: http://lkml.kernel.org/n/tip-m7t1e9kgea4jc3piyvjju7ps@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > tools/perf/lib/Makefile | 1 +
> > tools/perf/lib/tests/Makefile | 2 ++
> > 2 files changed, 3 insertions(+)
> >
> > diff --git a/tools/perf/lib/Makefile b/tools/perf/lib/Makefile
> > index 0f233638ef1f..20396f68fcad 100644
> > --- a/tools/perf/lib/Makefile
> > +++ b/tools/perf/lib/Makefile
> > @@ -73,6 +73,7 @@ override CFLAGS += -Werror -Wall
> > override CFLAGS += -fPIC
> > override CFLAGS += $(INCLUDES)
> > override CFLAGS += -fvisibility=hidden
> > +override CFLAGS += -D_GNU_SOURCE
> >
> > all:
> >
> > diff --git a/tools/perf/lib/tests/Makefile b/tools/perf/lib/tests/Makefile
> > index a43cd08c5c03..78c3d8c83c53 100644
> > --- a/tools/perf/lib/tests/Makefile
> > +++ b/tools/perf/lib/tests/Makefile
> > @@ -12,6 +12,8 @@ else
> > CFLAGS := -g -Wall
> > endif
> >
> > +CFLAGS += -D_GNU_SOURCE
> > +
> > all:
> >
> > include $(srctree)/tools/scripts/Makefile.include
> > --
> > 2.21.0
>
> --
>
> - Arnaldo

\
 
 \ /
  Last update: 2019-10-19 19:39    [W:0.052 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site