aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2020-03-26 16:39:01 +0800
committerKhem Raj <raj.khem@gmail.com>2020-03-26 20:35:47 -0700
commit1614839cf1888c0abc9c4bc4ba3d926ff673b4a9 (patch)
tree153cdcfb98b9ad9f6694dc341ccfdf49a123c219 /meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
parentf37aacb7937925f7febac3fb684538f792dc0c9b (diff)
downloadmeta-openembedded-1614839cf1888c0abc9c4bc4ba3d926ff673b4a9.tar.gz
python3-grpcio: fix native build failure on ubuntu 16.04 and centos 8
1. Keep '-std=c++11' and '-std=gnu99' to fix native build error with old gcc (such as gcc 5.4.0 on ubuntu 16.04); for clang, remove them through setting GRPC_PYTHON_CFLAGS at do_compile in bb recipe 2. While export CC="gcc ", cc_args is empty, it will cause subprocess.Popen always return 1. On centos 8, if you don't install package libatomic, there will be a native build error `cannot find /usr/lib64/libatomic.so.1.2.0'. Add no harm '-g' to cc_args if cc_args is empty. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb')
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
index 42260cb27c..358b237f7c 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
@@ -23,6 +23,10 @@ inherit pypi
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1"
+do_compile_prepend_toolchain-clang() {
+ export GRPC_PYTHON_CFLAGS='-fvisibility=hidden -fno-wrapv -fno-exceptions'
+}
+
CLEANBROKEN = "1"
BBCLASSEXTEND = "native nativesdk"