summaryrefslogtreecommitdiff
path: root/tools/perf/Makefile.config
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-02-16 22:53:13 +0300
committerIngo Molnar <mingo@kernel.org>2017-02-16 22:53:13 +0300
commit0c8967c9df230d2c4dde6649f410b62e01806c22 (patch)
tree7a0909ee1d9551640aa0427cdad610d8d1dacd4f /tools/perf/Makefile.config
parent277d6f1dcae09aed63cd4c7900a280b0e18cf2ca (diff)
parent34a0548f01626b01c9e98d9627812c3c9f6b6f7d (diff)
downloadlinux-0c8967c9df230d2c4dde6649f410b62e01806c22.tar.xz
Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core clang fixes from Arnaldo Carvalho de Melo: Changes to make tools/{perf,lib/{bpf,traceevent,api}} build with CC=clang, to, for instance, take advantage of warnings (Arnaldo Carvalho de Melo): - Conditionally request some warning options not available on clang - Set the maximum optimization level to -O3 when using CC=clang, leave the previous setting of -O6 otherwise. - Make it an error to pass a signed value to OPTION_UINTEGER, so that we can remove abs(unsigned int) calls in 'perf bench futex'. - Make sure dprintf() is not defined before using that name in 'perf bench numa' - Avoid using field after variable sized type, its a GNU extension, use equivalent code. - Fix some bugs where some variables could be used unitialized, something not caught by gcc. - Fix some spots where we were testing struct->array[] members against NULL, it will always evaluate to 'true'. - Add missing parse_events_error() prototype in the bison file. There are still one problem when trying to build the python support, but this are the 'size' outputs for 'make -C tools/perf NO_LIBPYTHON' for gcc and clang builds: DW_AT_producer: clang version 4.0.0 (http://llvm.org/git/clang.git f5be8ba13adc4ba1011a7ccd60c844bd60427c1c) (ht $ size ~/bin/perf text data bss dec hex filename 3447514 831320 23901696 28180530 1ae0032 /home/acme/bin/perf DW_AT_producer: GNU C99 6.3.1 20161221 (Red Hat 6.3.1-1) -mtune=generic -march=x86-64 -ggdb3 -O6 -std=gnu99 +-fno-omit-frame-pointer -funwind-tables -fstack-protector-all $ size ~/bin/perf text data bss dec hex filename 3671662 836480 23902752 28410894 1b1840e /home/acme/bin/perf Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/Makefile.config')
-rw-r--r--tools/perf/Makefile.config4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 03cf947755b9..2b941efadb04 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -144,8 +144,12 @@ ifndef DEBUG
endif
ifeq ($(DEBUG),0)
+ifeq ($(CC), clang)
+ CFLAGS += -O3
+else
CFLAGS += -O6
endif
+endif
ifdef PARSER_DEBUG
PARSER_DEBUG_BISON := -t