[v2,2/4] perf python: fix clang feature detection littering

Message ID fef2531b8fd62727cd7e8a1b77a1b07b6610a135.1672192591.git.nabijaczleweli@nabijaczleweli.xyz
State New
Headers
Series None |

Commit Message

Ahelenia Ziemiańska Dec. 28, 2022, 1:57 a.m. UTC
  This left behind tools/perf/a.out,
not .gitignored and not removed by make clean.

Fixes: commit 5508672d7f4949f15c316ffd947228f130498534 ("perf python:
 Remove -mcet and -fcf-protection when building with clang")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 tools/perf/util/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index 1cee26c63613..ba0b1e078855 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -6,7 +6,7 @@  cc_is_clang = b"clang version" in Popen(["/bin/sh", "-c", "$CC -v"], stderr=PIPE
 src_feature_tests  = getenv('srctree') + '/tools/build/feature'
 
 def clang_has_option(option):
-    cc_output = Popen(["/bin/sh", "-c", '$CC "$@"', "", option, path.join(src_feature_tests, "test-hello.c")], stderr=PIPE).stderr.readlines()
+    cc_output = Popen(["/bin/sh", "-c", '$CC "$@"', "", option, "-o", "/dev/null", path.join(src_feature_tests, "test-hello.c")], stderr=PIPE).stderr.readlines()
     return [o for o in cc_output if ((b"unknown argument" in o) or (b"is not supported" in o))] == [ ]
 
 if cc_is_clang: