From 1b7155f7de119870f0d3fad89f125de2ff6c16be Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Tue, 29 Mar 2011 20:02:57 +0200 Subject: perf tools: Fix NO_NEWT=1 python build error Fix the following build error: GEN python/perf.so In file included from util/evsel.h:10, from util/python.c:6: util/hist.h:106:18: error: newt.h: No such file or directory error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 make: *** [python/perf.so] Error 1 by passing BASIC_CFLAGS to setup.py. BASIC_CFLAGS variable contains the -DNO_NEWT_SUPPORT switch which prevents building python c extension with newt. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian LKML-Reference: <20110329180236.GA19366@erda.amd.com> Signed-off-by: Robert Richter Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/perf/util/setup.py') diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index e24ffad..bbc982f 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -1,13 +1,18 @@ #!/usr/bin/python2 from distutils.core import setup, Extension +from os import getenv + +cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] +cflags += getenv('CFLAGS', '').split() perf = Extension('perf', sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], include_dirs = ['util/include'], - extra_compile_args = ['-fno-strict-aliasing', '-Wno-write-strings']) + extra_compile_args = cflags, + ) setup(name='perf', version='0.1', -- cgit v1.1