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