diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-10-31 23:48:11 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-01 05:45:18 -0700 |
commit | 32d397a06d4cd4b6c05dbacc473d06e84283c1c4 (patch) | |
tree | aab37c7cc4c9af161b7081954fb2f71bab33bed8 /meta-oe | |
parent | fd7297b442493fbb6f739e80a18120007308bba8 (diff) | |
download | meta-openembedded-32d397a06d4cd4b6c05dbacc473d06e84283c1c4.tar.gz |
protobuf: Disable tailcall on mips/clang
Clang13 crashes and lets workaround it for now
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch new file mode 100644 index 000000000..8a0696edf --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 31 Oct 2021 23:39:44 -0700 | ||
4 | Subject: [PATCH] Fix build on mips/clang | ||
5 | |||
6 | clang13 crashes on mips, until its fixed upstream disable tailcall on | ||
7 | mips | ||
8 | |||
9 | https://bugs.llvm.org/show_bug.cgi?id=52367 | ||
10 | |||
11 | Upstream-Status: Inappropriate [Clang workaround] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/google/protobuf/port_def.inc | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc | ||
18 | index 71325c387..303475232 100644 | ||
19 | --- a/src/google/protobuf/port_def.inc | ||
20 | +++ b/src/google/protobuf/port_def.inc | ||
21 | @@ -230,7 +230,7 @@ | ||
22 | #error PROTOBUF_TAILCALL was previously defined | ||
23 | #endif | ||
24 | #if __has_cpp_attribute(clang::musttail) && \ | ||
25 | - !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) | ||
26 | + !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) && !defined(__mips__) | ||
27 | # ifndef PROTO2_OPENSOURCE | ||
28 | // Compilation fails on ARM32: b/195943306 | ||
29 | // Compilation fails on powerpc64le: b/187985113 | ||
30 | -- | ||
31 | 2.33.1 | ||
32 | |||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb index 9b8c39604..93daa1804 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb | |||
@@ -19,6 +19,9 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.19.x \ | |||
19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ | 19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ |
20 | file://0001-Fix-linking-error-with-ld-gold.patch \ | 20 | file://0001-Fix-linking-error-with-ld-gold.patch \ |
21 | " | 21 | " |
22 | SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " | ||
23 | SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " | ||
24 | |||
22 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |
23 | 26 | ||
24 | inherit autotools-brokensep pkgconfig ptest | 27 | inherit autotools-brokensep pkgconfig ptest |