diff options
-rw-r--r-- | classes/clang.bbclass | 9 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/0026-clang-Use-python3-in-python-scripts.patch | 115 | ||||
-rw-r--r-- | recipes-devtools/clang/common.inc | 1 |
3 files changed, 125 insertions, 0 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass index c7995f4..e81adad 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass | |||
@@ -102,4 +102,13 @@ set( CMAKE_CLANG_TIDY ${CLANG_TIDY} ) | |||
102 | EOF | 102 | EOF |
103 | sed -i 's/ -mmusl / /g' ${WORKDIR}/toolchain.cmake | 103 | sed -i 's/ -mmusl / /g' ${WORKDIR}/toolchain.cmake |
104 | } | 104 | } |
105 | # | ||
106 | # dump recipes which still use gcc | ||
107 | #python __anonymous() { | ||
108 | # toolchain = d.getVar("TOOLCHAIN") | ||
109 | # if not toolchain or toolchain == "clang" or 'class-target' not in d.getVar('OVERRIDES').split(':'): | ||
110 | # return | ||
111 | # pkgn = d.getVar("PN") | ||
112 | # bb.warn("%s - %s" % (pkgn, toolchain)) | ||
113 | #} | ||
105 | 114 | ||
diff --git a/recipes-devtools/clang/clang/0026-clang-Use-python3-in-python-scripts.patch b/recipes-devtools/clang/clang/0026-clang-Use-python3-in-python-scripts.patch new file mode 100644 index 0000000..63e3a64 --- /dev/null +++ b/recipes-devtools/clang/clang/0026-clang-Use-python3-in-python-scripts.patch | |||
@@ -0,0 +1,115 @@ | |||
1 | From dec703abdd0503edcc513bdb45eb36402792b47a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 14 Oct 2020 22:19:57 -0700 | ||
4 | Subject: [PATCH 26/26] clang: Use python3 in python scripts | ||
5 | |||
6 | Some scripts ask for python, but they work fine with python3 | ||
7 | and in OE python symlink is not exposed to build, only python3 is | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | .../find-all-symbols/tool/run-find-all-symbols.py | 2 +- | ||
13 | clang-tools-extra/clang-tidy/add_new_check.py | 2 +- | ||
14 | clang-tools-extra/clang-tidy/rename_check.py | 2 +- | ||
15 | clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 2 +- | ||
16 | clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +- | ||
17 | clang/tools/clang-format/clang-format-diff.py | 2 +- | ||
18 | clang/tools/clang-format/git-clang-format | 2 +- | ||
19 | clang/tools/scan-view/bin/scan-view | 2 +- | ||
20 | clang/utils/hmaptool/hmaptool | 2 +- | ||
21 | 9 files changed, 9 insertions(+), 9 deletions(-) | ||
22 | |||
23 | diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
24 | index 8655af137bb..e95ba59a421 100755 | ||
25 | --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
26 | +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py | ||
27 | @@ -1,4 +1,4 @@ | ||
28 | -#!/usr/bin/env python | ||
29 | +#!/usr/bin/env python3 | ||
30 | # | ||
31 | #=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# | ||
32 | # | ||
33 | diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py | ||
34 | index 231f43c0b8f..fb8477b037a 100755 | ||
35 | --- a/clang-tools-extra/clang-tidy/add_new_check.py | ||
36 | +++ b/clang-tools-extra/clang-tidy/add_new_check.py | ||
37 | @@ -1,4 +1,4 @@ | ||
38 | -#!/usr/bin/env python | ||
39 | +#!/usr/bin/env python3 | ||
40 | # | ||
41 | #===- add_new_check.py - clang-tidy check generator ---------*- python -*--===# | ||
42 | # | ||
43 | diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py | ||
44 | index 4d5311c9a29..c869744dd94 100755 | ||
45 | --- a/clang-tools-extra/clang-tidy/rename_check.py | ||
46 | +++ b/clang-tools-extra/clang-tidy/rename_check.py | ||
47 | @@ -1,4 +1,4 @@ | ||
48 | -#!/usr/bin/env python | ||
49 | +#!/usr/bin/env python3 | ||
50 | # | ||
51 | #===- rename_check.py - clang-tidy check renamer ------------*- python -*--===# | ||
52 | # | ||
53 | diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
54 | index 17086d15053..a20b1f1f46b 100755 | ||
55 | --- a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
56 | +++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | ||
57 | @@ -1,4 +1,4 @@ | ||
58 | -#!/usr/bin/env python | ||
59 | +#!/usr/bin/env python3 | ||
60 | # | ||
61 | #===- clang-tidy-diff.py - ClangTidy Diff Checker -----------*- python -*--===# | ||
62 | # | ||
63 | diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
64 | index 7e23419cd91..3e5986d0f7d 100755 | ||
65 | --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
66 | +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | ||
67 | @@ -1,4 +1,4 @@ | ||
68 | -#!/usr/bin/env python | ||
69 | +#!/usr/bin/env python3 | ||
70 | # | ||
71 | #===- run-clang-tidy.py - Parallel clang-tidy runner --------*- python -*--===# | ||
72 | # | ||
73 | diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py | ||
74 | index c5331202fc1..374253cf234 100755 | ||
75 | --- a/clang/tools/clang-format/clang-format-diff.py | ||
76 | +++ b/clang/tools/clang-format/clang-format-diff.py | ||
77 | @@ -1,4 +1,4 @@ | ||
78 | -#!/usr/bin/env python | ||
79 | +#!/usr/bin/env python3 | ||
80 | # | ||
81 | #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# | ||
82 | # | ||
83 | diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format | ||
84 | index f3cd585e7f4..63899c6f54a 100755 | ||
85 | --- a/clang/tools/clang-format/git-clang-format | ||
86 | +++ b/clang/tools/clang-format/git-clang-format | ||
87 | @@ -1,4 +1,4 @@ | ||
88 | -#!/usr/bin/env python | ||
89 | +#!/usr/bin/env python3 | ||
90 | # | ||
91 | #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===# | ||
92 | # | ||
93 | diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view | ||
94 | index 04ad518a60c..07effbca596 100755 | ||
95 | --- a/clang/tools/scan-view/bin/scan-view | ||
96 | +++ b/clang/tools/scan-view/bin/scan-view | ||
97 | @@ -1,4 +1,4 @@ | ||
98 | -#!/usr/bin/env python2 | ||
99 | +#!/usr/bin/env python3 | ||
100 | |||
101 | from __future__ import print_function | ||
102 | |||
103 | diff --git a/clang/utils/hmaptool/hmaptool b/clang/utils/hmaptool/hmaptool | ||
104 | index 58baab2f774..00296f11a16 100755 | ||
105 | --- a/clang/utils/hmaptool/hmaptool | ||
106 | +++ b/clang/utils/hmaptool/hmaptool | ||
107 | @@ -1,4 +1,4 @@ | ||
108 | -#!/usr/bin/env python | ||
109 | +#!/usr/bin/env python3 | ||
110 | from __future__ import absolute_import, division, print_function | ||
111 | |||
112 | import json | ||
113 | -- | ||
114 | 2.28.0 | ||
115 | |||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 2fd2a18..919cc86 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -33,6 +33,7 @@ SRC_URI = "\ | |||
33 | file://0023-fix-path-to-libffi.patch \ | 33 | file://0023-fix-path-to-libffi.patch \ |
34 | file://0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ | 34 | file://0024-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch \ |
35 | file://0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch \ | 35 | file://0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch \ |
36 | file://0026-clang-Use-python3-in-python-scripts.patch \ | ||
36 | " | 37 | " |
37 | 38 | ||
38 | # Fallback to no-PIE if not set | 39 | # Fallback to no-PIE if not set |