]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Apr 2020 14:44:48 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Apr 2020 14:44:48 +0000 (16:44 +0200)
added patches:
perf-python-fix-clang-detection-to-strip-out-options-passed-in-cc.patch

queue-5.6/perf-python-fix-clang-detection-to-strip-out-options-passed-in-cc.patch [new file with mode: 0644]
queue-5.6/series

diff --git a/queue-5.6/perf-python-fix-clang-detection-to-strip-out-options-passed-in-cc.patch b/queue-5.6/perf-python-fix-clang-detection-to-strip-out-options-passed-in-cc.patch
new file mode 100644 (file)
index 0000000..6f9e738
--- /dev/null
@@ -0,0 +1,63 @@
+From 9ff76cea4e9e6d49a6f764ae114fc0fb8de97816 Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Wed, 1 Apr 2020 09:33:59 -0300
+Subject: perf python: Fix clang detection to strip out options passed in $CC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+commit 9ff76cea4e9e6d49a6f764ae114fc0fb8de97816 upstream.
+
+The clang check in the python setup.py file expected $CC to be just the
+name of the compiler, not the compiler + options, i.e. all options were
+expected to be passed in $CFLAGS, this ends up making it fail in systems
+where CC is set to, e.g.:
+
+ "aarch64-linaro-linux-gcc --sysroot=/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot"
+
+Like this:
+
+  $ python3
+  >>> from subprocess import Popen
+  >>> a = Popen(["aarch64-linux-gnu-gcc --sysroot=/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot", "-v"])
+  Traceback (most recent call last):
+    File "<stdin>", line 1, in <module>
+    File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
+      restore_signals, start_new_session)
+    File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
+      raise child_exception_type(errno_num, err_msg, err_filename)
+  FileNotFoundError: [Errno 2] No such file or directory: 'aarch64-linux-gnu-gcc --sysroot=/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot': 'aarch64-linux-gnu-gcc --sysroot=/oe/build/tmp/work/juno-linaro-linux/perf/1.0-r9/recipe-sysroot'
+  >>>
+
+Make it more robust, covering this case, by passing cc.split()[0] as the
+first arg to popen().
+
+Fixes: a7ffd416d804 ("perf python: Fix clang detection when using CC=clang-version")
+Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
+Tested-by: Daniel Díaz <daniel.diaz@linaro.org>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Ilie Halip <ilie.halip@gmail.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Link: http://lore.kernel.org/lkml/20200401124037.GA12534@kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/setup.py |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/perf/util/setup.py
++++ b/tools/perf/util/setup.py
+@@ -3,7 +3,7 @@ from subprocess import Popen, PIPE
+ from re import sub
+ cc = getenv("CC")
+-cc_is_clang = b"clang version" in Popen([cc, "-v"], stderr=PIPE).stderr.readline()
++cc_is_clang = b"clang version" in Popen([cc.split()[0], "-v"], stderr=PIPE).stderr.readline()
+ def clang_has_option(option):
+     return [o for o in Popen([cc, option], stderr=PIPE).stderr.readlines() if b"unknown argument" in o] == [ ]
index 7be6a0c93a14262117244806169c1999480efcb9..1ac8d705a1b15c54f69a687196483c160537331c 100644 (file)
@@ -8,7 +8,6 @@ net-fix-fraglist-segmentation-reference-count-leak.patch
 udp-initialize-is_flist-with-0-in-udp_gro_receive.patch
 padata-fix-uninitialized-return-value-in-padata_repl.patch
 brcmfmac-abort-and-release-host-after-error.patch
-bpf-fix-tnum-constraints-for-32-bit-comparisons.patch
 xarray-fix-xa_find_next-for-large-multi-index-entrie.patch
 drm-bridge-analogix-anx6345-avoid-duplicate-supply-suffix.patch
 drm-i915-display-fix-mode-private_flags-comparison-at-atomic_check.patch
@@ -27,3 +26,4 @@ revert-alsa-uapi-drop-asound.h-inclusion-from-asoc.h.patch
 revert-dm-always-call-blk_queue_split-in-dm_process_bio.patch
 alsa-hda-ca0132-add-recon3di-quirk-to-handle-integrated-sound-on-evga-x99-classified-motherboard.patch
 soc-mediatek-knows_txdone-needs-to-be-set-in-mediatek-cmdq-helper.patch
+perf-python-fix-clang-detection-to-strip-out-options-passed-in-cc.patch