* Compiler flags for libapi and libtraceevent
@ 2018-09-11 3:06 Ben Hutchings
2018-09-13 8:04 ` Jiri Olsa
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2018-09-11 3:06 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Hendrik Brueckner; +Cc: LKML
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
I noticed that tools/lib/api/Makefile has these conditional
assignments, similar to tools/perf/Makefile.config:
ifeq ($(DEBUG),0)
ifeq ($(CC_NO_CLANG), 0)
CFLAGS += -O3
else
CFLAGS += -O6
endif
endif
ifeq ($(DEBUG),0)
CFLAGS += -D_FORTIFY_SOURCE
endif
But it doesn't set DEBUG to 0 by default, and nothing under tools/perf
exports its value of CFLAGS or DEBUG.
tools/lib/traceevent/Makefile doesn't seem to have any logic to enable
optimisation or Fortify.
Shouldn't these libraries both have optimisations and Fortify turned on
by default, like perf itself?
Ben.
--
Ben Hutchings
Computers are not intelligent. They only think they are.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Compiler flags for libapi and libtraceevent
2018-09-11 3:06 Compiler flags for libapi and libtraceevent Ben Hutchings
@ 2018-09-13 8:04 ` Jiri Olsa
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Olsa @ 2018-09-13 8:04 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Arnaldo Carvalho de Melo, Hendrik Brueckner, LKML
On Tue, Sep 11, 2018 at 04:06:46AM +0100, Ben Hutchings wrote:
> I noticed that tools/lib/api/Makefile has these conditional
> assignments, similar to tools/perf/Makefile.config:
>
> ifeq ($(DEBUG),0)
> ifeq ($(CC_NO_CLANG), 0)
> CFLAGS += -O3
> else
> CFLAGS += -O6
> endif
> endif
>
> ifeq ($(DEBUG),0)
> CFLAGS += -D_FORTIFY_SOURCE
> endif
>
> But it doesn't set DEBUG to 0 by default, and nothing under tools/perf
> exports its value of CFLAGS or DEBUG.
hum, AFAICS tools/perf/Makefile.perf exports CFLAGS:
export srctree OUTPUT RM CC CXX LD AR CFLAGS CXXFLAGS V BISON FLEX AWK
jirka
>
> tools/lib/traceevent/Makefile doesn't seem to have any logic to enable
> optimisation or Fortify.
>
> Shouldn't these libraries both have optimisations and Fortify turned on
> by default, like perf itself?
>
> Ben.
>
> --
> Ben Hutchings
> Computers are not intelligent. They only think they are.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-13 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11 3:06 Compiler flags for libapi and libtraceevent Ben Hutchings
2018-09-13 8:04 ` Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox