diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-03-23 23:28:31 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-03-24 07:29:13 -0700 |
| commit | 7308156a132d57ab16234f2c300dd9cfb33d1782 (patch) | |
| tree | dddca60eb3e2fbb306149d40cccbe7c86143a44d /meta-oe/recipes-devtools/protobuf | |
| parent | e5271adea7d1ff30320601d7449f5e778848678e (diff) | |
| download | meta-openembedded-7308156a132d57ab16234f2c300dd9cfb33d1782.tar.gz | |
protobuf: Add -latomic to CXXFLAGS
Adding to LDFLAGS works with LLD linker but not with BFD ld since it
gets added before the abseil-cpp libraries on linker cmdline which does
not link it and still finds the atomic function like `__atomic_store_8'
as missing
Use mipsarcho32 for override which covers both mips and mipsel
Thanks for suggestions - RAED [1]
[1] https://github.com/openembedded/meta-openembedded/pull/952
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/protobuf')
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch | 4 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_5.29.4.bb | 6 |
2 files changed, 5 insertions, 5 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 index 1e0d04dc8d..1f5c9127de 100644 --- 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 | |||
| @@ -3,10 +3,10 @@ From: Khem Raj <raj.khem@gmail.com> | |||
| 3 | Date: Mon, 10 Mar 2025 19:59:19 -0700 | 3 | Date: Mon, 10 Mar 2025 19:59:19 -0700 |
| 4 | Subject: [PATCH] Fix build on mips/clang | 4 | Subject: [PATCH] Fix build on mips/clang |
| 5 | 5 | ||
| 6 | clang13 crashes on mips, until its fixed upstream disable tailcall on | 6 | clang20 crashes on mips, until its fixed upstream disable tailcall on |
| 7 | mips | 7 | mips |
| 8 | 8 | ||
| 9 | https://bugs.llvm.org/show_bug.cgi?id=52367 | 9 | https://github.com/llvm/llvm-project/issues/51709 |
| 10 | 10 | ||
| 11 | Upstream-Status: Inappropriate [Clang workaround] | 11 | Upstream-Status: Inappropriate [Clang workaround] |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_5.29.4.bb b/meta-oe/recipes-devtools/protobuf/protobuf_5.29.4.bb index 9d49e0d3e4..30b805e6b1 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_5.29.4.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_5.29.4.bb | |||
| @@ -22,8 +22,7 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=29.x;protocol=ht | |||
| 22 | file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ | 22 | file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ |
| 23 | file://0001-utf8_range-add-version-marker-to-library-19009.patch \ | 23 | file://0001-utf8_range-add-version-marker-to-library-19009.patch \ |
| 24 | " | 24 | " |
| 25 | SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " | 25 | SRC_URI:append:mipsarcho32:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " |
| 26 | SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " | ||
| 27 | 26 | ||
| 28 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.(25\.(\d+)))" | 27 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.(25\.(\d+)))" |
| 29 | 28 | ||
| @@ -51,7 +50,8 @@ EXTRA_OECMAKE += "\ | |||
| 51 | TEST_SRC_DIR = "examples" | 50 | TEST_SRC_DIR = "examples" |
| 52 | LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" | 51 | LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" |
| 53 | 52 | ||
| 54 | LDFLAGS:append:riscv32 = " -latomic" | 53 | CXXFLAGS:append:mipsarcho32 = " -latomic" |
| 54 | CXXFLAGS:append:riscv32 = " -latomic" | ||
| 55 | 55 | ||
| 56 | do_compile_ptest() { | 56 | do_compile_ptest() { |
| 57 | mkdir -p "${B}/${TEST_SRC_DIR}" | 57 | mkdir -p "${B}/${TEST_SRC_DIR}" |
