Remove -std=gnu99 from setup.py script

This is the equivalent of https://github.com/grpc/grpc/pull/23671
upstream. Using -gnu99 for C++ code makes GCC warn and clang error.
This commit is contained in:
Timm Bäder 2020-12-09 08:57:25 +01:00
parent 06f39c9753
commit 4e59cc2c59
2 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,7 @@ Patch0: grpc-0001-enforce-system-crypto-policies.patch
Patch2: grpc-0003-use-shell-loop-instead-makefile-function.patch
Patch3: 99f8a10aec994a8957fbb6787768b444ef34d6a2.patch
Patch4: 72351f63fd650cc7acfcd2d0307e8e8e8f777283.patch
Patch5: remove-gnu99.patch
%description
gRPC is a modern open source high performance RPC framework that can run in any
@ -85,6 +86,7 @@ Python3 bindings for gRPC library.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
sed -i 's:^prefix ?= .*:prefix ?= %{_prefix}:' Makefile
sed -i 's:$(prefix)/lib:$(prefix)/%{_lib}:' Makefile
sed -i 's:^GTEST_LIB =.*::' Makefile

12
remove-gnu99.patch Normal file
View File

@ -0,0 +1,12 @@
diff -ruN grpc-1.26.0.orig/setup.py grpc-1.26.0/setup.py
--- grpc-1.26.0.orig/setup.py 2019-12-18 02:29:27.000000000 +0100
+++ grpc-1.26.0/setup.py 2020-12-09 08:41:38.202678255 +0100
@@ -179,7 +179,7 @@
# available dynamically
EXTRA_ENV_COMPILE_ARGS += ' /MT'
elif "linux" in sys.platform:
- EXTRA_ENV_COMPILE_ARGS += ' -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
+ EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
elif "darwin" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += ' -stdlib=libc++ -fvisibility=hidden -fno-wrapv -fno-exceptions'