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 | 25 |
1 files changed, 13 insertions, 12 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 4aa11bd57a..07276c17f6 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 | |||
@@ -30,29 +30,30 @@ diff --git a/setup.py b/setup.py | |||
30 | index cc53e79..be3bc78 100644 | 30 | index cc53e79..be3bc78 100644 |
31 | --- a/setup.py | 31 | --- a/setup.py |
32 | +++ b/setup.py | 32 | +++ b/setup.py |
33 | @@ -87,8 +87,11 @@ def check_linker_need_libatomic(): | 33 | @@ -88,9 +88,11 @@ |
34 | """Test if linker on system needs libatomic.""" | 34 | b"#include <atomic>\n" |
35 | code_test = (b'#include <atomic>\n' + | 35 | + b"int main() { return std::atomic<int64_t>{}; }" |
36 | b'int main() { return std::atomic<int64_t>{}; }') | 36 | ) |
37 | - cxx = os.environ.get('CXX', 'c++') | 37 | - cxx = os.environ.get("CXX", "c++") |
38 | - cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++14', '-'], | 38 | - cpp_test = subprocess.Popen( |
39 | - [cxx, "-x", "c++", "-std=c++14", "-"], | ||
39 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' | 40 | + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' |
40 | + if not cxx_args: | 41 | + if not cxx_args: |
41 | + cxx_args = "-g" | 42 | + cxx_args = "-g" |
42 | + | 43 | + |
43 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], | 44 | + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], |
44 | stdin=PIPE, | 45 | stdin=PIPE, |
45 | stdout=PIPE, | 46 | stdout=PIPE, |
46 | stderr=PIPE) | 47 | stderr=PIPE, |
47 | @@ -98,7 +101,7 @@ def check_linker_need_libatomic(): | 48 | @@ -101,7 +103,7 @@ |
48 | # Double-check to see if -latomic actually can solve the problem. | 49 | # Double-check to see if -latomic actually can solve the problem. |
49 | # https://github.com/grpc/grpc/issues/22491 | 50 | # https://github.com/grpc/grpc/issues/22491 |
50 | cpp_test = subprocess.Popen( | 51 | cpp_test = subprocess.Popen( |
51 | - [cxx, '-x', 'c++', '-std=c++14', '-', '-latomic'], | 52 | - [cxx, "-x", "c++", "-std=c++14", "-", "-latomic"], |
52 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], | 53 | + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], |
53 | stdin=PIPE, | 54 | stdin=PIPE, |
54 | stdout=PIPE, | 55 | stdout=PIPE, |
55 | stderr=PIPE) | 56 | stderr=PIPE, |
56 | -- | 57 | -- |
57 | 2.25.1 | 58 | 2.25.1 |
58 | 59 | ||