[lkml]   [2019]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4/7] perf python: Remove -fstack-clash-protection when building with some clang versions
From: Arnaldo Carvalho de Melo <>

These options are not present in some (all?) 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 rawhide (now gearing towards f30), so check
if clang has the and remove the missing ones from CFLAGS.

Cc: Eduardo Habkost <>
Cc: Thiago Macieira <>
Cc: Adrian Hunter <>
Cc: Jiri Olsa <>
Cc: Namhyung Kim <>
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/util/ | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/ b/tools/perf/util/
index 63f758c655d5..64d1f36dee99 100644
--- a/tools/perf/util/
+++ b/tools/perf/util/
@@ -17,6 +17,8 @@ if cc == "clang":
vars[var] = sub("-mcet", "", vars[var])
if not clang_has_option("-fcf-protection"):
vars[var] = sub("-fcf-protection", "", vars[var])
+ if not clang_has_option("-fstack-clash-protection"):
+ vars[var] = sub("-fstack-clash-protection", "", vars[var])

from distutils.core import setup, Extension

 \ /
  Last update: 2019-01-21 19:36    [W:0.044 / U:3.612 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site