diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-26 19:39:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-26 19:39:16 -0800 |
commit | 0c393398a91713a108f319ac75337c02b7ebeaa7 (patch) | |
tree | d63647e0b4d2e6f9069eb62c34d1a57dc81aa55b | |
parent | ef7db76196c48aabe1bfbabfa365da45bcd16047 (diff) | |
parent | de294c479418bc7f8e63fe3d2f4f6061bdf08a91 (diff) | |
download | meta-clang-0c393398a91713a108f319ac75337c02b7ebeaa7.tar.gz |
Merge pull request #266 from YoeDistro/kraj/zeus
Zeus sync from master
-rw-r--r-- | .drone.yml | 2 | ||||
-rw-r--r-- | conf/nonclangable.conf | 22 | ||||
-rw-r--r-- | recipes-devtools/clang/clang.inc | 20 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/0025-llvm-Let-llvm-ar-name-contain-lib.patch | 136 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/0026-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch | 33 | ||||
-rw-r--r-- | recipes-devtools/clang/clang/0027-Fix-sanitizer-common-build-with-glibc-2.31.patch | 81 | ||||
-rw-r--r-- | recipes-devtools/clang/clang_git.bb | 7 | ||||
-rw-r--r-- | recipes-devtools/clang/common.inc | 2 | ||||
-rw-r--r-- | recipes-devtools/clang/compiler-rt_git.bb | 13 | ||||
-rw-r--r-- | recipes-devtools/clang/libcxx_git.bb | 6 | ||||
-rw-r--r-- | recipes-devtools/clang/openmp_git.bb | 1 | ||||
-rw-r--r-- | recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch | 28 | ||||
-rw-r--r-- | recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | 3 | ||||
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch | 40 | ||||
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend | 4 |
15 files changed, 361 insertions, 37 deletions
@@ -11,7 +11,7 @@ clone: | |||
11 | 11 | ||
12 | trigger: | 12 | trigger: |
13 | branch: | 13 | branch: |
14 | - master | 14 | - zeus |
15 | event: | 15 | event: |
16 | - push | 16 | - push |
17 | - pull_request | 17 | - pull_request |
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index ac51481..70336bb 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf | |||
@@ -17,12 +17,23 @@ TOOLCHAIN_pn-glibc-scripts = "gcc" | |||
17 | TOOLCHAIN_pn-glibc-testsuite = "gcc" | 17 | TOOLCHAIN_pn-glibc-testsuite = "gcc" |
18 | TOOLCHAIN_pn-grub = "gcc" | 18 | TOOLCHAIN_pn-grub = "gcc" |
19 | TOOLCHAIN_pn-grub-efi = "gcc" | 19 | TOOLCHAIN_pn-grub-efi = "gcc" |
20 | |||
21 | # Clang crashes on musl/x86_64 | ||
22 | # Running pass 'Function Pass Manager' on module '/mnt/b/yoe/build/tmp/work/core2-64- | ||
23 | # yoe-linux-musl/hdf5/1.8.21-r0/hdf5-1.8.21/src/H5detect.c'. | ||
24 | # Running pass 'X86 Assembly Printer' on function '@detect_C99_floats' | ||
25 | # clang-9: error: unable to execute command: Segmentation fault (core dumped) | ||
26 | TOOLCHAIN_pn-hdf5_libc-musl_x86-64 = "gcc" | ||
27 | |||
20 | # VLAs | 28 | # VLAs |
21 | #| control.c:286:19: error: fields must have a constant size: 'variable length array in structure' extension will never be supported | 29 | #| control.c:286:19: error: fields must have a constant size: 'variable length array in structure' extension will never be supported |
22 | #| __u32 buffer[cam->max_response_quads]; | 30 | #| __u32 buffer[cam->max_response_quads]; |
23 | #| ^ | 31 | #| ^ |
24 | #| 1 error generated. | 32 | #| 1 error generated. |
25 | TOOLCHAIN_pn-libdc1394 = "gcc" | 33 | TOOLCHAIN_pn-libdc1394 = "gcc" |
34 | |||
35 | # error: return address can be determined only for current frame | ||
36 | TOOLCHAIN_pn-libexecinfo_mipsarch = "gcc" | ||
26 | TOOLCHAIN_pn-libgcc = "gcc" | 37 | TOOLCHAIN_pn-libgcc = "gcc" |
27 | TOOLCHAIN_pn-libgcc-initial = "gcc" | 38 | TOOLCHAIN_pn-libgcc-initial = "gcc" |
28 | TOOLCHAIN_pn-libgfortran = "gcc" | 39 | TOOLCHAIN_pn-libgfortran = "gcc" |
@@ -42,6 +53,8 @@ TOOLCHAIN_pn-mesa_powerpc = "gcc" | |||
42 | TOOLCHAIN_pn-mongodb = "gcc" | 53 | TOOLCHAIN_pn-mongodb = "gcc" |
43 | # variant-impl.hpp:309:36: error: 'is_variant' does not name a template but is followed by template arguments | 54 | # variant-impl.hpp:309:36: error: 'is_variant' does not name a template but is followed by template arguments |
44 | TOOLCHAIN_pn-omxplayer = "gcc" | 55 | TOOLCHAIN_pn-omxplayer = "gcc" |
56 | # error: return address can be determined only for current frame | ||
57 | TOOLCHAIN_pn-openflow_mipsarch = "gcc" | ||
45 | TOOLCHAIN_pn-opensbi = "gcc" | 58 | TOOLCHAIN_pn-opensbi = "gcc" |
46 | TOOLCHAIN_pn-openjdk-8 = "gcc" | 59 | TOOLCHAIN_pn-openjdk-8 = "gcc" |
47 | TOOLCHAIN_pn-openjre-8 = "gcc" | 60 | TOOLCHAIN_pn-openjre-8 = "gcc" |
@@ -103,10 +116,6 @@ TOOLCHAIN_pn-pulseaudio_armv7a = "gcc" | |||
103 | # clang++ 6.0 crashes during link phase of a shared library | 116 | # clang++ 6.0 crashes during link phase of a shared library |
104 | TOOLCHAIN_pn-wpewebkit = "gcc" | 117 | TOOLCHAIN_pn-wpewebkit = "gcc" |
105 | 118 | ||
106 | # x264 causes a infinite loop when compiling 1 source file | ||
107 | # | ||
108 | TOOLCHAIN_pn-x264_x86 = "gcc" | ||
109 | |||
110 | #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:191: undefined reference to `__atomic_fetch_or_4' | 119 | #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:191: undefined reference to `__atomic_fetch_or_4' |
111 | #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:210: undefined reference to `__atomic_fetch_or_4' | 120 | #| /usr/src/debug/qemu/2.6.0-r1/qemu-2.6.0/util/bitmap.c:210: undefined reference to `__atomic_fetch_or_4' |
112 | #| libqemuutil.a(bitmap.o): In function `bitmap_test_and_clear_atomic': | 121 | #| libqemuutil.a(bitmap.o): In function `bitmap_test_and_clear_atomic': |
@@ -117,10 +126,6 @@ TOOLCHAIN_pn-x264_x86 = "gcc" | |||
117 | # to compile qemu for target | 126 | # to compile qemu for target |
118 | TOOLCHAIN_pn-qemu_arm = "gcc" | 127 | TOOLCHAIN_pn-qemu_arm = "gcc" |
119 | 128 | ||
120 | # llvm-profdata fails see | ||
121 | # | error: Could not read profile code.profd: No such file or directory | ||
122 | TOOLCHAIN_pn-python3 = "gcc" | ||
123 | |||
124 | #| ./dsp/v4f_IIR2.h:554:12: error: no matching function for call to 'v4f_map' | 129 | #| ./dsp/v4f_IIR2.h:554:12: error: no matching function for call to 'v4f_map' |
125 | #| a[5] = v4f_map<__builtin_cosf> (f); | 130 | #| a[5] = v4f_map<__builtin_cosf> (f); |
126 | #| ^~~~~~~~~~~~~~~~~~~~~~~ | 131 | #| ^~~~~~~~~~~~~~~~~~~~~~~ |
@@ -217,6 +222,7 @@ TUNE_CCARGS_remove_pn-omxplayer_toolchain-clang = "-no-integrated-as" | |||
217 | #| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) | 222 | #| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) |
218 | COMPILER_RT_pn-ruby_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" | 223 | COMPILER_RT_pn-ruby_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" |
219 | COMPILER_RT_pn-m4_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" | 224 | COMPILER_RT_pn-m4_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" |
225 | COMPILER_RT_pn-cpio_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" | ||
220 | COMPILER_RT_pn-webkitgtk_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" | 226 | COMPILER_RT_pn-webkitgtk_toolchain-clang = "--rtlib=compiler-rt ${UNWINDLIB}" |
221 | COMPILER_RT_remove_pn-m4_powerpc = "--rtlib=compiler-rt" | 227 | COMPILER_RT_remove_pn-m4_powerpc = "--rtlib=compiler-rt" |
222 | COMPILER_RT_remove_pn-ruby_powerpc = "--rtlib=compiler-rt" | 228 | COMPILER_RT_remove_pn-ruby_powerpc = "--rtlib=compiler-rt" |
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 248ff28..3fd0723 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -8,7 +8,7 @@ MAJOR_VER = "9" | |||
8 | MINOR_VER = "0" | 8 | MINOR_VER = "0" |
9 | PATCH_VER = "1" | 9 | PATCH_VER = "1" |
10 | 10 | ||
11 | SRCREV ?= "aa0ed8dac77bf205f2b376a44a0d161f4dafcb5a" | 11 | SRCREV ?= "c1a0a213378a458fbea1a5c77b315c7dce08fd05" |
12 | 12 | ||
13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" | 13 | PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" |
14 | BRANCH = "release/${MAJOR_VER}.x" | 14 | BRANCH = "release/${MAJOR_VER}.x" |
@@ -18,4 +18,22 @@ CLANGMD5SUM = "ff42885ed2ab98f1ecb8c1fc41205343" | |||
18 | LLDMD5SUM = "ae7dc7c027b1fa89b5b013d391d3ee2b" | 18 | LLDMD5SUM = "ae7dc7c027b1fa89b5b013d391d3ee2b" |
19 | LLDBMD5SUM = "2e0d44968471fcde980034dbb826bea9" | 19 | LLDBMD5SUM = "2e0d44968471fcde980034dbb826bea9" |
20 | 20 | ||
21 | def get_libdir_suffix(d, arch_var): | ||
22 | import re | ||
23 | multilibs = (d.getVar("MULTILIB_VARIANTS") or "").split() | ||
24 | if multilibs: | ||
25 | a = d.getVar(arch_var, True) | ||
26 | if re.match('(i.86|athlon)$', a): return '32' | ||
27 | elif re.match('x86.64$', a): return '64' | ||
28 | elif re.match('(arm|armbe)$', a): return '32' | ||
29 | elif re.match('(aarch64|aarch64_be)$', a): return '64' | ||
30 | elif re.match('mips(isa|)32(r6|)(el|)$', a): return '32' | ||
31 | elif re.match('mips(isa|)64(r6|)(el|)$', a): return '64' | ||
32 | elif re.match('p(pc|owerpc)', a): return '32' | ||
33 | elif re.match('p(pc|owerpc)64', a): return '64' | ||
34 | else: | ||
35 | return '' | ||
36 | |||
37 | LLVM_LIBDIR_SUFFIX="${@get_libdir_suffix(d, 'TARGET_ARCH')}" | ||
38 | |||
21 | require common.inc | 39 | require common.inc |
diff --git a/recipes-devtools/clang/clang/0025-llvm-Let-llvm-ar-name-contain-lib.patch b/recipes-devtools/clang/clang/0025-llvm-Let-llvm-ar-name-contain-lib.patch index 5edf8ad..0d5baab 100644 --- a/recipes-devtools/clang/clang/0025-llvm-Let-llvm-ar-name-contain-lib.patch +++ b/recipes-devtools/clang/clang/0025-llvm-Let-llvm-ar-name-contain-lib.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From fa44b5037ceac5d201b5ab0395ec9c5b928f79bf Mon Sep 17 00:00:00 2001 | 1 | From e709fa8c221d21bce717b22fa4076c94d51f011e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Fangrui Song <maskray@google.com> |
3 | Date: Wed, 4 Dec 2019 11:50:09 -0800 | 3 | Date: Tue, 10 Dec 2019 15:56:05 -0800 |
4 | Subject: [PATCH] llvm: Let llvm-ar name contain 'lib' | 4 | Subject: [PATCH] llvm: Let llvm-ar name contain 'lib' |
5 | 5 | ||
6 | In cross-compile cases canonical names are created using symlinks but | 6 | In cross-compile cases canonical names are created using symlinks but |
@@ -11,34 +11,140 @@ qc: no such file or directory | |||
11 | 11 | ||
12 | Which is because when the llvm-ar symbol link's name contains "lib", it would be considered as llvm-lib: | 12 | Which is because when the llvm-ar symbol link's name contains "lib", it would be considered as llvm-lib: |
13 | 13 | ||
14 | Signed-off-by: Michael Davis <michael.davis@essvote.com> | 14 | Signed-off-by: Fangrui Song <maskray@google.com> |
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
16 | --- | 16 | --- |
17 | llvm/tools/llvm-ar/llvm-ar.cpp | 8 ++++---- | 17 | llvm/test/tools/llvm-ar/tool-name.test | 15 ++++++++++++++ |
18 | 1 file changed, 4 insertions(+), 4 deletions(-) | 18 | llvm/test/tools/llvm-dlltool/tool-name.test | 13 ++++++++++++ |
19 | llvm/test/tools/llvm-lib/tool-name.test | 14 +++++++++++++ | ||
20 | llvm/test/tools/llvm-ranlib/tool-name.test | 13 ++++++++++++ | ||
21 | llvm/tools/llvm-ar/llvm-ar.cpp | 23 ++++++++++++++------- | ||
22 | 5 files changed, 71 insertions(+), 7 deletions(-) | ||
23 | create mode 100644 llvm/test/tools/llvm-ar/tool-name.test | ||
24 | create mode 100644 llvm/test/tools/llvm-dlltool/tool-name.test | ||
25 | create mode 100644 llvm/test/tools/llvm-lib/tool-name.test | ||
26 | create mode 100644 llvm/test/tools/llvm-ranlib/tool-name.test | ||
19 | 27 | ||
28 | diff --git a/llvm/test/tools/llvm-ar/tool-name.test b/llvm/test/tools/llvm-ar/tool-name.test | ||
29 | new file mode 100644 | ||
30 | index 00000000000..cb656d3b47f | ||
31 | --- /dev/null | ||
32 | +++ b/llvm/test/tools/llvm-ar/tool-name.test | ||
33 | @@ -0,0 +1,15 @@ | ||
34 | +## Don't make symlinks on Windows. | ||
35 | +# UNSUPPORTED: system-windows | ||
36 | + | ||
37 | +# RUN: rm -rf %t | ||
38 | +# RUN: mkdir %t | ||
39 | +# RUN: ln -s llvm-ar %t/llvm-ar-9 | ||
40 | +# RUN: ln -s llvm-ar %t/ar.exe | ||
41 | +# RUN: ln -s llvm-ar %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 | ||
42 | + | ||
43 | +# RUN: llvm-ar h | FileCheck %s | ||
44 | +# RUN: %t/llvm-ar-9 h | FileCheck %s | ||
45 | +# RUN: %t/ar.exe h | FileCheck %s | ||
46 | +# RUN: %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 h | FileCheck %s | ||
47 | + | ||
48 | +# CHECK: USAGE: llvm-ar | ||
49 | diff --git a/llvm/test/tools/llvm-dlltool/tool-name.test b/llvm/test/tools/llvm-dlltool/tool-name.test | ||
50 | new file mode 100644 | ||
51 | index 00000000000..e9d8680322d | ||
52 | --- /dev/null | ||
53 | +++ b/llvm/test/tools/llvm-dlltool/tool-name.test | ||
54 | @@ -0,0 +1,13 @@ | ||
55 | +## Don't make symlinks on Windows. | ||
56 | +# UNSUPPORTED: system-windows | ||
57 | + | ||
58 | +# RUN: rm -rf %t | ||
59 | +# RUN: mkdir %t | ||
60 | +# RUN: ln -s llvm-dlltool %t/dlltool.exe | ||
61 | +# RUN: ln -s llvm-dlltool %t/dlltool-10 | ||
62 | + | ||
63 | +# RUN: not llvm-dlltool 2>&1 | FileCheck %s | ||
64 | +# RUN: not %t/dlltool.exe 2>&1 | FileCheck %s | ||
65 | +# RUN: not %t/dlltool-10 2>&1 | FileCheck %s | ||
66 | + | ||
67 | +# CHECK: USAGE: llvm-dlltool | ||
68 | diff --git a/llvm/test/tools/llvm-lib/tool-name.test b/llvm/test/tools/llvm-lib/tool-name.test | ||
69 | new file mode 100644 | ||
70 | index 00000000000..9c0f7b5de73 | ||
71 | --- /dev/null | ||
72 | +++ b/llvm/test/tools/llvm-lib/tool-name.test | ||
73 | @@ -0,0 +1,14 @@ | ||
74 | +## Don't make symlinks on Windows. | ||
75 | +# UNSUPPORTED: system-windows | ||
76 | + | ||
77 | +# RUN: rm -rf %t | ||
78 | +# RUN: mkdir %t | ||
79 | +## See D44808, MSBuild runs Lib.exe | ||
80 | +# RUN: ln -s llvm-lib %t/Lib.exe | ||
81 | +# RUN: ln -s llvm-lib %t/llvm-lib-10 | ||
82 | + | ||
83 | +# RUN: llvm-lib '/?' | FileCheck %s | ||
84 | +# RUN: %t/Lib.exe '/?' | FileCheck %s | ||
85 | +# RUN: %t/llvm-lib-10 '/?' | FileCheck %s | ||
86 | + | ||
87 | +# CHECK: USAGE: llvm-lib | ||
88 | diff --git a/llvm/test/tools/llvm-ranlib/tool-name.test b/llvm/test/tools/llvm-ranlib/tool-name.test | ||
89 | new file mode 100644 | ||
90 | index 00000000000..bd2b4965331 | ||
91 | --- /dev/null | ||
92 | +++ b/llvm/test/tools/llvm-ranlib/tool-name.test | ||
93 | @@ -0,0 +1,13 @@ | ||
94 | +## Don't make symlinks on Windows. | ||
95 | +# UNSUPPORTED: system-windows | ||
96 | + | ||
97 | +# RUN: rm -rf %t | ||
98 | +# RUN: mkdir %t | ||
99 | +# RUN: ln -s llvm-ranlib %t/llvm-ranlib-9 | ||
100 | +# RUN: ln -s llvm-ranlib %t/ranlib.exe | ||
101 | + | ||
102 | +# RUN: llvm-ranlib -h | FileCheck %s | ||
103 | +# RUN: %t/llvm-ranlib-9 -h | FileCheck %s | ||
104 | +# RUN: %t/ranlib.exe -h | FileCheck %s | ||
105 | + | ||
106 | +# CHECK: USAGE: llvm-ranlib | ||
20 | diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp | 107 | diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp |
21 | index 91746d0fab3..daef39ede79 100644 | 108 | index 91746d0fab3..a7118371f1e 100644 |
22 | --- a/llvm/tools/llvm-ar/llvm-ar.cpp | 109 | --- a/llvm/tools/llvm-ar/llvm-ar.cpp |
23 | +++ b/llvm/tools/llvm-ar/llvm-ar.cpp | 110 | +++ b/llvm/tools/llvm-ar/llvm-ar.cpp |
24 | @@ -1125,16 +1125,16 @@ int main(int argc, char **argv) { | 111 | @@ -11,6 +11,7 @@ |
112 | // | ||
113 | //===----------------------------------------------------------------------===// | ||
114 | |||
115 | +#include "llvm/ADT/StringExtras.h" | ||
116 | #include "llvm/ADT/StringSwitch.h" | ||
117 | #include "llvm/ADT/Triple.h" | ||
118 | #include "llvm/IR/LLVMContext.h" | ||
119 | @@ -1125,16 +1126,24 @@ int main(int argc, char **argv) { | ||
25 | llvm::InitializeAllAsmParsers(); | 120 | llvm::InitializeAllAsmParsers(); |
26 | 121 | ||
27 | Stem = sys::path::stem(ToolName); | 122 | Stem = sys::path::stem(ToolName); |
28 | - if (Stem.contains_lower("dlltool")) | 123 | - if (Stem.contains_lower("dlltool")) |
29 | + if (Stem.endswith("dlltool") || Stem.contains("dlltool-")) | 124 | + auto Is = [](StringRef Tool) { |
125 | + // We need to recognize the following filenames. | ||
126 | + // | ||
127 | + // Lib.exe -> lib (see D44808, MSBuild runs Lib.exe) | ||
128 | + // dlltool.exe -> dlltool | ||
129 | + // arm-pokymllib32-linux-gnueabi-llvm-ar-10 -> ar | ||
130 | + auto I = Stem.rfind_lower(Tool); | ||
131 | + return I != StringRef::npos && | ||
132 | + (I + Tool.size() == Stem.size() || !isAlnum(Stem[I + Tool.size()])); | ||
133 | + }; | ||
134 | + | ||
135 | + if (Is("dlltool")) | ||
30 | return dlltoolDriverMain(makeArrayRef(argv, argc)); | 136 | return dlltoolDriverMain(makeArrayRef(argv, argc)); |
31 | 137 | - | |
32 | - if (Stem.contains_lower("ranlib")) | 138 | - if (Stem.contains_lower("ranlib")) |
33 | + if (Stem.endswith("ranlib") || Stem.contains("ranlib-")) | 139 | + if (Is("ranlib")) |
34 | return ranlib_main(argc, argv); | 140 | return ranlib_main(argc, argv); |
35 | 141 | - | |
36 | - if (Stem.contains_lower("lib")) | 142 | - if (Stem.contains_lower("lib")) |
37 | + if (Stem.endswith("lib") || Stem.contains("lib-")) | 143 | + if (Is("lib")) |
38 | return libDriverMain(makeArrayRef(argv, argc)); | 144 | return libDriverMain(makeArrayRef(argv, argc)); |
39 | 145 | - | |
40 | - if (Stem.contains_lower("ar")) | 146 | - if (Stem.contains_lower("ar")) |
41 | + if (Stem.endswith("ar") || Stem.contains("ar-")) | 147 | + if (Is("ar")) |
42 | return ar_main(argc, argv); | 148 | return ar_main(argc, argv); |
43 | fail("Not ranlib, ar, lib or dlltool!"); | 149 | fail("Not ranlib, ar, lib or dlltool!"); |
44 | } | 150 | } |
diff --git a/recipes-devtools/clang/clang/0026-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch b/recipes-devtools/clang/clang/0026-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch new file mode 100644 index 0000000..18008c3 --- /dev/null +++ b/recipes-devtools/clang/clang/0026-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 9c37e644d96de108d931a6bcce1819a666ae91d8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 11 Dec 2019 10:23:15 -0800 | ||
4 | Subject: [PATCH] libclang: Use CMAKE_DL_LIBS for deducing libdl | ||
5 | |||
6 | This helps in getting right settings for libdl irrespective of platform | ||
7 | it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON | ||
8 | |||
9 | Fixes | ||
10 | |||
11 | tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o: In function clang::CIndexer::getClangResourcesPath[abi:cxx11]()': 2019-12-06T06:04:39.2987601Z | CIndexer.cpp:(.text._ZN5clang8CIndexer21getClangResourcesPathB5cxx11Ev+0x8b): undefined reference to dladdr' | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | clang/tools/libclang/CMakeLists.txt | 5 ++--- | ||
16 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt | ||
19 | index 613ead1a36b..9d5cd0ba9df 100644 | ||
20 | --- a/clang/tools/libclang/CMakeLists.txt | ||
21 | +++ b/clang/tools/libclang/CMakeLists.txt | ||
22 | @@ -58,9 +58,8 @@ if (TARGET clangTidyPlugin) | ||
23 | endif() | ||
24 | endif () | ||
25 | |||
26 | -find_library(DL_LIBRARY_PATH dl) | ||
27 | -if (DL_LIBRARY_PATH) | ||
28 | - list(APPEND LIBS dl) | ||
29 | +if (HAVE_LIBDL) | ||
30 | + list(APPEND LIBS ${CMAKE_DL_LIBS}) | ||
31 | endif() | ||
32 | |||
33 | option(LIBCLANG_BUILD_STATIC | ||
diff --git a/recipes-devtools/clang/clang/0027-Fix-sanitizer-common-build-with-glibc-2.31.patch b/recipes-devtools/clang/clang/0027-Fix-sanitizer-common-build-with-glibc-2.31.patch new file mode 100644 index 0000000..4c05fc6 --- /dev/null +++ b/recipes-devtools/clang/clang/0027-Fix-sanitizer-common-build-with-glibc-2.31.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 322766bb272ca8f818fe26a74ac1254a3d2b0201 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgenii Stepanov <eugenis@google.com> | ||
3 | Date: Mon, 25 Nov 2019 13:52:17 -0800 | ||
4 | Subject: [PATCH] Fix sanitizer-common build with glibc 2.31 | ||
5 | |||
6 | Summary: | ||
7 | As mentioned in D69104, glibc changed ABI recently with the [[ https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2f959dfe849e0646e27403f2e4091536496ac0f0| 2f959dfe ]] change. | ||
8 | D69104 dealt with just 32-bit ARM, but that is just one of the many affected architectures. | ||
9 | E.g. x86_64, i?86, riscv64, sparc 32-bit, s390 31-bit are affected too (and various others). | ||
10 | |||
11 | This patch instead of adding a long list of further architectures that wouldn't be checked ever next to arm 32-bit changes the structures to match the 2.31 layout and performs the checking on Linux for ipc_perm mode position/size only on non-Linux or on Linux with glibc 2.31 or later. I think this matches what is done for aarch64 already. | ||
12 | If needed, we could list architectures that haven't changed ABI (e.g. powerpc), so that they would be checked even with older glibcs. AFAIK sanitizers don't actually use ipc_perm.mode and | ||
13 | so all they care about is the size and alignment of the whole structure. | ||
14 | |||
15 | Note, s390 31-bit and arm 32-bit big-endian changed ABI even further, there will now be shmctl with old symbol version and shmctl@@GLIBC_2.31 which will be incompatible. I'm afraid this isn't really solvable unless the sanitizer libraries are symbol versioned and use matching symbol versions to glibc symbols for stuff they intercept, plus use dlvsym. | ||
16 | This patch doesn't try to address that. | ||
17 | |||
18 | Patch by Jakub Jelinek. | ||
19 | |||
20 | Reviewers: kcc, eugenis, dvyukov | ||
21 | |||
22 | Reviewed By: eugenis | ||
23 | |||
24 | Subscribers: jyknight, kristof.beyls, fedor.sergeev, simoncook, PkmX, s.egerton, steven.zhang, #sanitizers, llvm-commits | ||
25 | |||
26 | Tags: #sanitizers, #llvm | ||
27 | |||
28 | Differential Revision: https://reviews.llvm.org/D70662 | ||
29 | --- | ||
30 | .../sanitizer_platform_limits_posix.cc | 5 +++-- | ||
31 | .../sanitizer_platform_limits_posix.h | 15 +-------------- | ||
32 | 2 files changed, 4 insertions(+), 16 deletions(-) | ||
33 | |||
34 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
35 | index b7fa6e8f7e0..abdf7941b5c 100644 | ||
36 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
37 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | ||
38 | @@ -1126,8 +1126,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); | ||
39 | CHECK_SIZE_AND_OFFSET(ipc_perm, gid); | ||
40 | CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); | ||
41 | CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); | ||
42 | -#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) | ||
43 | -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ | ||
44 | +#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) | ||
45 | +/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit | ||
46 | + on many architectures. */ | ||
47 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode); | ||
48 | #endif | ||
49 | |||
50 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h | ||
51 | index f1a4fd7d370..029a209fc03 100644 | ||
52 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h | ||
53 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h | ||
54 | @@ -203,26 +203,13 @@ namespace __sanitizer { | ||
55 | u64 __unused1; | ||
56 | u64 __unused2; | ||
57 | #elif defined(__sparc__) | ||
58 | -#if defined(__arch64__) | ||
59 | unsigned mode; | ||
60 | - unsigned short __pad1; | ||
61 | -#else | ||
62 | - unsigned short __pad1; | ||
63 | - unsigned short mode; | ||
64 | unsigned short __pad2; | ||
65 | -#endif | ||
66 | unsigned short __seq; | ||
67 | unsigned long long __unused1; | ||
68 | unsigned long long __unused2; | ||
69 | -#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) | ||
70 | - unsigned int mode; | ||
71 | - unsigned short __seq; | ||
72 | - unsigned short __pad1; | ||
73 | - unsigned long __unused1; | ||
74 | - unsigned long __unused2; | ||
75 | #else | ||
76 | - unsigned short mode; | ||
77 | - unsigned short __pad1; | ||
78 | + unsigned int mode; | ||
79 | unsigned short __seq; | ||
80 | unsigned short __pad2; | ||
81 | #if defined(__x86_64__) && !defined(_LP64) | ||
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index f33b78a..13138c1 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -55,7 +55,7 @@ PACKAGECONFIG ??= "compiler-rt libcplusplus shared-libs lldb-wchar \ | |||
55 | rtti eh libedit \ | 55 | rtti eh libedit \ |
56 | " | 56 | " |
57 | PACKAGECONFIG_class-native = "rtti eh libedit" | 57 | PACKAGECONFIG_class-native = "rtti eh libedit" |
58 | PACKAGECONFIG_class-nativesdk = "rtti eh libedit thin-lto" | 58 | PACKAGECONFIG_class-nativesdk = "rtti eh libedit ${@bb.utils.filter('DISTRO_FEATURES', 'thin-lto full-lto', d)}" |
59 | 59 | ||
60 | PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,,libcxx,compiler-rt" | 60 | PACKAGECONFIG[compiler-rt] = "-DCLANG_DEFAULT_RTLIB=compiler-rt,,libcxx,compiler-rt" |
61 | PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,,libcxx" | 61 | PACKAGECONFIG[libcplusplus] = "-DCLANG_DEFAULT_CXX_STDLIB=libc++,,libcxx" |
@@ -68,6 +68,7 @@ PACKAGECONFIG[lldb-wchar] = "-DLLDB_EDITLINE_USE_WCHAR=1,-DLLDB_EDITLINE_USE_WCH | |||
68 | PACKAGECONFIG[bootstrap] = "-DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH='${PASSTHROUGH}' -DBOOTSTRAP_LLVM_ENABLE_LTO=Thin -DBOOTSTRAP_LLVM_ENABLE_LLD=ON,,," | 68 | PACKAGECONFIG[bootstrap] = "-DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH='${PASSTHROUGH}' -DBOOTSTRAP_LLVM_ENABLE_LTO=Thin -DBOOTSTRAP_LLVM_ENABLE_LLD=ON,,," |
69 | PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF,," | 69 | PACKAGECONFIG[eh] = "-DLLVM_ENABLE_EH=ON,-DLLVM_ENABLE_EH=OFF,," |
70 | PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF,," | 70 | PACKAGECONFIG[rtti] = "-DLLVM_ENABLE_RTTI=ON,-DLLVM_ENABLE_RTTI=OFF,," |
71 | PACKAGECONFIG[split-dwarf] = "-DLLVM_USE_SPLIT_DWARF=ON,-DLLVM_USE_SPLIT_DWARF=OFF,," | ||
71 | PACKAGECONFIG[libedit] = "-DLLVM_ENABLE_LIBEDIT=ON -DLLDB_DISABLE_LIBEDIT=0,-DLLVM_ENABLE_LIBEDIT=OFF -DLLDB_DISABLE_LIBEDIT=1,libedit libedit-native" | 72 | PACKAGECONFIG[libedit] = "-DLLVM_ENABLE_LIBEDIT=ON -DLLDB_DISABLE_LIBEDIT=0,-DLLVM_ENABLE_LIBEDIT=OFF -DLLDB_DISABLE_LIBEDIT=1,libedit libedit-native" |
72 | 73 | ||
73 | BUILDTARGET = "${@bb.utils.contains('PACKAGECONFIG', 'bootstrap', 'stage2', '', d)}" | 74 | BUILDTARGET = "${@bb.utils.contains('PACKAGECONFIG', 'bootstrap', 'stage2', '', d)}" |
@@ -181,7 +182,7 @@ do_install_append_class-target () { | |||
181 | if(DEFINED ENV{YOCTO_ALTERNATE_EXE_PATH})\n\ | 182 | if(DEFINED ENV{YOCTO_ALTERNATE_EXE_PATH})\n\ |
182 | execute_process(COMMAND \"llvm-config\" \"--bindir\" OUTPUT_VARIABLE _IMPORT_PREFIX_BIN OUTPUT_STRIP_TRAILING_WHITESPACE)\n\ | 183 | execute_process(COMMAND \"llvm-config\" \"--bindir\" OUTPUT_VARIABLE _IMPORT_PREFIX_BIN OUTPUT_STRIP_TRAILING_WHITESPACE)\n\ |
183 | else()\n\ | 184 | else()\n\ |
184 | set(_IMPORT_PREFIX_BINARY \"\${_IMPORT_PREFIX}/bin\")\n\ | 185 | set(_IMPORT_PREFIX_BIN \"\${_IMPORT_PREFIX}/bin\")\n\ |
185 | endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake | 186 | endif()\n" ${D}${libdir}/cmake/llvm/LLVMExports-release.cmake |
186 | } | 187 | } |
187 | 188 | ||
@@ -210,8 +211,6 @@ do_install_append_class-nativesdk () { | |||
210 | rm -rf ${D}${datadir}/llvm | 211 | rm -rf ${D}${datadir}/llvm |
211 | } | 212 | } |
212 | 213 | ||
213 | PACKAGE_DEBUG_SPLIT_STYLE_class-nativesdk = "debug-without-src" | ||
214 | |||
215 | PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python libclang" | 214 | PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python libclang" |
216 | 215 | ||
217 | PROVIDES += "llvm llvm${PV}" | 216 | PROVIDES += "llvm llvm${PV}" |
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index c5e8d48..044a9ab 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -33,6 +33,8 @@ SRC_URI = "\ | |||
33 | file://0023-openmp-Recognise-ARMv7ve-machine-arch.patch \ | 33 | file://0023-openmp-Recognise-ARMv7ve-machine-arch.patch \ |
34 | file://0024-Check-for-atomic-double-intrinsics.patch \ | 34 | file://0024-Check-for-atomic-double-intrinsics.patch \ |
35 | file://0025-llvm-Let-llvm-ar-name-contain-lib.patch \ | 35 | file://0025-llvm-Let-llvm-ar-name-contain-lib.patch \ |
36 | file://0026-libclang-Use-CMAKE_DL_LIBS-for-deducing-libdl.patch \ | ||
37 | file://0027-Fix-sanitizer-common-build-with-glibc-2.31.patch \ | ||
36 | " | 38 | " |
37 | 39 | ||
38 | # Fallback to no-PIE if not set | 40 | # Fallback to no-PIE if not set |
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index e76a560..3c0f214 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb | |||
@@ -31,6 +31,7 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ | |||
31 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ | 31 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ |
32 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ | 32 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ |
33 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ | 33 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ |
34 | -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ | ||
34 | -G Ninja ${S}/llvm \ | 35 | -G Ninja ${S}/llvm \ |
35 | " | 36 | " |
36 | 37 | ||
@@ -75,12 +76,12 @@ sysroot_stage_all_append_class-target() { | |||
75 | } | 76 | } |
76 | 77 | ||
77 | FILES_SOLIBSDEV = "" | 78 | FILES_SOLIBSDEV = "" |
78 | FILES_${PN} += "${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ | 79 | FILES_${PN} += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ |
79 | ${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ | 80 | ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ |
80 | ${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" | 81 | ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" |
81 | FILES_${PN}-staticdev += "${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" | 82 | FILES_${PN}-staticdev += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" |
82 | FILES_${PN}-dev += "${datadir} ${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ | 83 | FILES_${PN}-dev += "${datadir} ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ |
83 | ${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ | 84 | ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ |
84 | " | 85 | " |
85 | INSANE_SKIP_${PN} = "dev-so libdir" | 86 | INSANE_SKIP_${PN} = "dev-so libdir" |
86 | 87 | ||
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 2d530c5..7325e4f 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb | |||
@@ -32,6 +32,8 @@ LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da39 | |||
32 | file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ | 32 | file://libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ |
33 | " | 33 | " |
34 | 34 | ||
35 | LLVM_LIBDIR_SUFFIX_powerpc64 = "64" | ||
36 | |||
35 | EXTRA_OECMAKE += "\ | 37 | EXTRA_OECMAKE += "\ |
36 | -DCMAKE_CROSSCOMPILING=ON \ | 38 | -DCMAKE_CROSSCOMPILING=ON \ |
37 | -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ | 39 | -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ |
@@ -46,12 +48,12 @@ EXTRA_OECMAKE += "\ | |||
46 | -DLIBCXX_CXX_ABI=libcxxabi \ | 48 | -DLIBCXX_CXX_ABI=libcxxabi \ |
47 | -DLIBCXX_USE_COMPILER_RT=ON \ | 49 | -DLIBCXX_USE_COMPILER_RT=ON \ |
48 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/libcxxabi/include \ | 50 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/libcxxabi/include \ |
49 | -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/${baselib} \ | 51 | -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib${LLVM_LIBDIR_SUFFIX} \ |
50 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ | 52 | -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \ |
51 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ | 53 | -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${NM} \ |
52 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ | 54 | -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \ |
53 | -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi;libunwind' \ | 55 | -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi;libunwind' \ |
54 | -DLLVM_LIBDIR_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ | 56 | -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ |
55 | -G Ninja \ | 57 | -G Ninja \ |
56 | ${S}/llvm \ | 58 | ${S}/llvm \ |
57 | " | 59 | " |
diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index 4de2f4a..d2c3909 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb | |||
@@ -35,3 +35,4 @@ INSANE_SKIP_${PN} = "dev-so" | |||
35 | 35 | ||
36 | COMPATIBLE_HOST_riscv64 = "null" | 36 | COMPATIBLE_HOST_riscv64 = "null" |
37 | COMPATIBLE_HOST_riscv32 = "null" | 37 | COMPATIBLE_HOST_riscv32 = "null" |
38 | COMPATIBLE_HOST_mips64 = "null" | ||
diff --git a/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch b/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch new file mode 100644 index 0000000..9206af1 --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Disable fpu using code when using clang/mips64 combo | ||
2 | it works around clang's inline asm error | ||
3 | |||
4 | error: couldn't allocate output register for constraint 'r' | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | |||
9 | --- a/libavcodec/mips/aacdec_mips.c | ||
10 | +++ b/libavcodec/mips/aacdec_mips.c | ||
11 | @@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *a | ||
12 | } | ||
13 | } | ||
14 | |||
15 | -#if HAVE_MIPSFPU | ||
16 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
17 | static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) | ||
18 | { | ||
19 | /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ | ||
20 | @@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) | ||
21 | #if HAVE_INLINE_ASM | ||
22 | c->imdct_and_windowing = imdct_and_windowing_mips; | ||
23 | c->apply_ltp = apply_ltp_mips; | ||
24 | -#if HAVE_MIPSFPU | ||
25 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
26 | c->update_ltp = update_ltp_mips; | ||
27 | #endif /* HAVE_MIPSFPU */ | ||
28 | #endif /* HAVE_INLINE_ASM */ | ||
diff --git a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend new file mode 100644 index 0000000..2077fda --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI_append_toolchain-clang_mips64 = " file://clang_mips64.patch" | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch new file mode 100644 index 0000000..93ab73f --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 91c980d4cf88b0c12fe5971fe16c7b97b5a942af Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 17 Dec 2019 14:57:55 -0800 | ||
4 | Subject: [PATCH] Disable fpu using code when using clang/mips64 combo | ||
5 | |||
6 | it works around clang's inline asm error | ||
7 | |||
8 | error: couldn't allocate output register for constraint 'r' | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
17 | index 253cdeb..df4f25d 100644 | ||
18 | --- a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
19 | +++ b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
20 | @@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce) | ||
21 | } | ||
22 | } | ||
23 | |||
24 | -#if HAVE_MIPSFPU | ||
25 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
26 | static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) | ||
27 | { | ||
28 | /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ | ||
29 | @@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) | ||
30 | #if HAVE_INLINE_ASM | ||
31 | c->imdct_and_windowing = imdct_and_windowing_mips; | ||
32 | c->apply_ltp = apply_ltp_mips; | ||
33 | -#if HAVE_MIPSFPU | ||
34 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
35 | c->update_ltp = update_ltp_mips; | ||
36 | #endif /* HAVE_MIPSFPU */ | ||
37 | #endif /* HAVE_INLINE_ASM */ | ||
38 | -- | ||
39 | 2.24.1 | ||
40 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend new file mode 100644 index 0000000..dee9619 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI_append_toolchain-clang_mips64 = " file://0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch" | ||
4 | |||