diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch index 07276c17f6..439b337bda 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9b2f1d400db8b8d0045f5a58a748a2dc52b5c9ef Mon Sep 17 00:00:00 2001 | 1 | From f1bf68aaa5417bcb7ad4996f1be8d2c0f53c521c Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 17 Feb 2021 13:38:55 -0800 | 3 | Date: Wed, 17 Feb 2021 13:38:55 -0800 |
4 | Subject: [PATCH] setup.py: Do not mix C and C++ compiler options | 4 | Subject: [PATCH] setup.py: Do not mix C and C++ compiler options |
@@ -23,37 +23,37 @@ Upstream-Status: Inappropriate [oe specific] | |||
23 | 23 | ||
24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
25 | --- | 25 | --- |
26 | setup.py | 9 ++++++--- | 26 | setup.py | 10 ++++++---- |
27 | 1 file changed, 6 insertions(+), 3 deletions(-) | 27 | 1 file changed, 6 insertions(+), 4 deletions(-) |
28 | 28 | ||
29 | diff --git a/setup.py b/setup.py | 29 | diff --git a/setup.py b/setup.py |
30 | index cc53e79..be3bc78 100644 | 30 | index 1a997df..86e3ad1 100644 |
31 | --- a/setup.py | 31 | --- a/setup.py |
32 | +++ b/setup.py | 32 | +++ b/setup.py |
33 | @@ -88,9 +88,11 @@ | 33 | @@ -90,9 +90,11 @@ def check_linker_need_libatomic(): |
34 | b"#include <atomic>\n" | 34 | b"#include <atomic>\n" |
35 | + b"int main() { return std::atomic<int64_t>{}; }" | 35 | + b"int main() { return std::atomic<int64_t>{}; }" |
36 | ) | 36 | ) |
37 | - cxx = os.environ.get("CXX", "c++") | 37 | - cxx = os.environ.get("CXX", "c++") |
38 | - cpp_test = subprocess.Popen( | 38 | - cpp_test = subprocess.Popen( |
39 | - [cxx, "-x", "c++", "-std=c++14", "-"], | 39 | - [cxx, "-x", "c++", "-std=c++17", "-"], |
40 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' | 40 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' |
41 | + if not cxx_args: | 41 | + if not cxx_args: |
42 | + cxx_args = "-g" | 42 | + cxx_args = "-g" |
43 | + | 43 | + |
44 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], | 44 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++17', '-'], |
45 | stdin=PIPE, | 45 | stdin=PIPE, |
46 | stdout=PIPE, | 46 | stdout=PIPE, |
47 | stderr=PIPE, | 47 | stderr=PIPE, |
48 | @@ -101,7 +103,7 @@ | 48 | @@ -103,7 +105,7 @@ def check_linker_need_libatomic(): |
49 | # Double-check to see if -latomic actually can solve the problem. | 49 | # Double-check to see if -latomic actually can solve the problem. |
50 | # https://github.com/grpc/grpc/issues/22491 | 50 | # https://github.com/grpc/grpc/issues/22491 |
51 | cpp_test = subprocess.Popen( | 51 | cpp_test = subprocess.Popen( |
52 | - [cxx, "-x", "c++", "-std=c++14", "-", "-latomic"], | 52 | - [cxx, "-x", "c++", "-std=c++17", "-", "-latomic"], |
53 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], | 53 | + [cxx, cxx_args, '-x', 'c++', '-std=c++17', '-', '-latomic'], |
54 | stdin=PIPE, | 54 | stdin=PIPE, |
55 | stdout=PIPE, | 55 | stdout=PIPE, |
56 | stderr=PIPE, | 56 | stderr=PIPE, |
57 | -- | 57 | -- |
58 | 2.25.1 | 58 | 2.43.0 |
59 | 59 | ||