summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-03-18 22:23:51 -0400
committerScott Murray <scott.murray@konsulko.com>2024-03-20 08:38:58 +0000
commitee30c3a8cfb492496905c8c3b9d5586c49ac94f0 (patch)
tree84897e297aed72a2c94342f1b09e7e318cb5b1eb /recipes-devtools
parentad0e56370f957214862df12ccbeb34ba8a5c0a51 (diff)
python3-grpcio: add bbappend
Add bbappend to tweak the LDFLAGS used when building for RISC-V so that libatomic gets linked as is required. See the comment in the .inc file for more information. Bug-AGL: SPEC-5011 Change-Id: I90f839be8cbaf527c11508476ab6dd5ab6eb8799 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29746 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account (cherry picked from commit bf169df3f483264385555de1ccb691e8904ec8c7) Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29764
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/python/python3-grpcio_1.45.0.bbappend1
-rw-r--r--recipes-devtools/python/python3-grpcio_agldemo.inc17
2 files changed, 18 insertions, 0 deletions
diff --git a/recipes-devtools/python/python3-grpcio_1.45.0.bbappend b/recipes-devtools/python/python3-grpcio_1.45.0.bbappend
new file mode 100644
index 00000000..26036fc8
--- /dev/null
+++ b/recipes-devtools/python/python3-grpcio_1.45.0.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'python3-grpcio_agldemo.inc', '', d)}
diff --git a/recipes-devtools/python/python3-grpcio_agldemo.inc b/recipes-devtools/python/python3-grpcio_agldemo.inc
new file mode 100644
index 00000000..8236a341
--- /dev/null
+++ b/recipes-devtools/python/python3-grpcio_agldemo.inc
@@ -0,0 +1,17 @@
+# For some reason the atomics presence test in the grpc build
+# passes on RISC-V even though linking with libatomic is actually
+# needed. There are some mentions on the web of some atomics
+# support incorrectly being in the libc stub on RISC-V, so a
+# fix could be tracking down if that is the case and if it has
+# been fixed in newer libc. Otherwise, the compile test in grpc
+# will need to be changed to some other function that is known to
+# only be in libatomic on RISC-V.
+#
+# The next problem is that setting GRPC_PYTHON_LDFLAGS to any value
+# ends up not adding linking with pthread due to the way the logic
+# is set up, so we need to actually add it explicitly. The upstream
+# recipe seems slightly broken in this respect.
+
+GRPC_LDFLAGS ?= " -lpthread"
+GRPC_LDFLAGS:append:riscv64 = " -latomic"
+export GRPC_PYTHON_LDFLAGS = "${GRPC_LDFLAGS}"