grpc/grpc-1.26.0-python-no-std-gnu99.patch
Benjamin A. Beasley 87469ef514 Significant packaging improvements and new subpackages
- General:
  * Update summaries and descriptions
  * Update License fields to include licenses from bundled components
  * Fix failure to respect Fedora build flags
  * Use the system shared certificate bundle instead of shipping our own
- CLI:
  * No longer set rpath $ORIGIN
- C (core) and C++ (cpp):
  * Add c_so_version/cpp_so_version macros
  * Split out C++ bindings and shared data into subpackages
  * Drop obsolete ldconfig_scriptlets macro
  * Stop stripping debugging symbols
- Python:
  * Use generated BR’s
  * Build and package Python binding documentation
  * Disable accommodations for older libc’s
  * Patch out -std=gnu99 flag, which is inappropriate for C++
  * Build additional Python packages grpcio_tools, gprcio_channelz,
    grpcio_health_checking, grpcio_reflection, grpcio_status, and
    grpcio_testing
2021-02-02 18:12:12 -05:00

33 lines
1.5 KiB
Diff

Based on remove-gnu99.patch from
https://src.fedoraproject.org/rpms/grpc/pull-request/3; corresponds to ignored
upstream PR https://github.com/grpc/grpc/pull/23671. For consistency, we also
patch a related shell script that we do not use.
Using -std=gnu99 for C++ code makes GCC warn and clang error; besides, it makes
no sense.
diff -Naur grpc-1.26.0-original/setup.py grpc-1.26.0/setup.py
--- grpc-1.26.0-original/setup.py 2019-12-17 20:29:27.000000000 -0500
+++ grpc-1.26.0/setup.py 2021-02-01 11:49:55.741613488 -0500
@@ -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'
diff -Naur grpc-1.26.0-original/tools/run_tests/helper_scripts/build_python.sh grpc-1.26.0/tools/run_tests/helper_scripts/build_python.sh
--- grpc-1.26.0-original/tools/run_tests/helper_scripts/build_python.sh 2019-12-17 20:29:27.000000000 -0500
+++ grpc-1.26.0/tools/run_tests/helper_scripts/build_python.sh 2021-02-01 11:49:37.059492917 -0500
@@ -116,7 +116,7 @@
fi
ROOT=$(pwd)
-export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS"
+export CFLAGS="-I$ROOT/include -fno-wrapv $CFLAGS"
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
export LANG=en_US.UTF-8