summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2020-02-20 18:49:10 +0800
committerKhem Raj <raj.khem@gmail.com>2020-02-20 15:32:27 -0800
commit7d242bcfc77f00ce9acec6541a4f5711d8d4a51b (patch)
tree386ae37d9e746be9742bb78afd5765664f4bdf61 /meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
parent0daeae19f694d45116e8ce509c64657b280e7f27 (diff)
downloadmeta-openembedded-7d242bcfc77f00ce9acec6541a4f5711d8d4a51b.tar.gz
python3-grpcio: fix do_compile error for native
When building python3-grpcio-native, we will meet do_compile error because of no 'cc'. In fact, 'cc' is not in our hosttools. So fix to use gcc and make the patch also apply to native. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
index 131daace06..f39a82a33d 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
+++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
@@ -1,4 +1,4 @@
1From b02be74a2eff8abc612ef84f30e0fbce6a7f65f5 Mon Sep 17 00:00:00 2001 11From b02be74a2eff8abc612ef84f30e0fbce6a7f65f5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 4 Aug 2017 09:04:07 -0700 3Date: Fri, 4 Aug 2017 09:04:07 -0700
4Subject: [PATCH] setup.py: Do not mix C and C++ compiler options 4Subject: [PATCH] setup.py: Do not mix C and C++ compiler options
@@ -24,7 +24,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 24
25 def check_linker_need_libatomic(): 25 def check_linker_need_libatomic():
26 """Test if linker on system needs libatomic.""" 26 """Test if linker on system needs libatomic."""
27+ compiler, cc_args = os.environ.get('CC').split(' ', 1) or 'cc' 27+ compiler, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc'
28 code_test = (b'#include <atomic>\n' + 28 code_test = (b'#include <atomic>\n' +
29 b'int main() { return std::atomic<int64_t>{}; }') 29 b'int main() { return std::atomic<int64_t>{}; }')
30- cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'], 30- cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'],
@@ -57,7 +57,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
57 """ 57 """
58 # TODO(lidiz) Remove the generated a.out for success tests. 58 # TODO(lidiz) Remove the generated a.out for success tests.
59- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], 59- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'],
60+ compiler, cc_args = os.environ.get('CC').split(' ', 1) or 'cc' 60+ compiler, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc'
61+ cc_test = subprocess.Popen([compiler, cc_args, '-x', 'c', '-std=c++11', '-'], 61+ cc_test = subprocess.Popen([compiler, cc_args, '-x', 'c', '-std=c++11', '-'],
62 stdin=subprocess.PIPE, 62 stdin=subprocess.PIPE,
63 stdout=subprocess.PIPE, 63 stdout=subprocess.PIPE,