perf python: Remove -mcet and -fcf-protection when building with clang
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Aug 2018 21:00:40 +0000 (18:00 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Aug 2018 21:50:20 +0000 (18:50 -0300)
commit5508672d7f4949f15c316ffd947228f130498534
treeb087e2cb8503499d890f6924ed45c45bdc3fecf4
parent344353366591acf659a0d0dea498611da78d67e2
perf python: Remove -mcet and -fcf-protection when building with clang

These options are not present in older clang versions, so when we build
for a distro that has a gcc new enough to have these options and that
the distro python build config settings use them but clang doesn't
support, b00m.

This is the case with fedora 28 and rawhide, so check if clang has the
options and remove the missing ones from CFLAGS.

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: https://lkml.kernel.org/n/tip-7asds7yn6gzg6ns1lw17ukul@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/setup.py