aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile.config
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-02-15 21:31:40 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-02-17 10:31:13 -0300
commit8bd8c6533369a013297e0eec7898b37290852a73 (patch)
tree3fae56cf0601f50126df3d8cb236c69b2b1aaa2b /tools/perf/Makefile.config
parentMerge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (diff)
downloadlinux-dev-8bd8c6533369a013297e0eec7898b37290852a73.tar.xz
linux-dev-8bd8c6533369a013297e0eec7898b37290852a73.zip
tools perf scripting python: clang doesn't have -spec, remove it
Gcc has a -spec option to override what options to pass to cc, etc, and in some distros this is used, like in fedora, where we end up getting this passed to gcc that makes clang, that doesn't have this option to stop the build: CC /tmp/build/perf/util/scripting-engines/trace-event-python.o clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] So filter this out when the compiler used is clang, this way we can build the python scripting support in tools/perf/. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-2gosxoiouf24pnlknp7w7q4z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.config')
-rw-r--r--tools/perf/Makefile.config7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 2b941efadb04..27c9fbca7bd9 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -175,6 +175,10 @@ PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+ifeq ($(CC), clang)
+ PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+endif
+
FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS)
FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS)
@@ -601,6 +605,9 @@ else
PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+ ifeq ($(CC), clang)
+ PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+ endif
FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
ifneq ($(feature-libpython), 1)