summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangjung Woo <sangjung.woo@samsung.com>2023-06-14 14:22:21 +0900
committerSangjung Woo <sangjung.woo@samsung.com>2023-06-14 14:22:57 +0900
commit585fbdfffb28efc966193ee82482a15c3b293345 (patch)
tree2a46a3b42c59430f5267172cd407b631d36d9d83
parent2b45ebdedac8e29aee3c86821c4312994849f507 (diff)
downloadflatbuffers-585fbdfffb28efc966193ee82482a15c3b293345.tar.gz
flatbuffers-585fbdfffb28efc966193ee82482a15c3b293345.tar.bz2
flatbuffers-585fbdfffb28efc966193ee82482a15c3b293345.zip
To fix the buildbreak issue on gcc 11 or higher, this patch adds '-Wno-error=stringop-overflow' option to CFLAGS and CXXFLAGS. Change-Id: Iab3e0948770ff687fe997bc9c6faf825051ff7e4 Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
-rw-r--r--packaging/flatbuffers.spec6
1 files changed, 4 insertions, 2 deletions
diff --git a/packaging/flatbuffers.spec b/packaging/flatbuffers.spec
index 49446768..650dc0f0 100644
--- a/packaging/flatbuffers.spec
+++ b/packaging/flatbuffers.spec
@@ -40,8 +40,10 @@ This package provides flatbuffers python API.
cp %{SOURCE1} .
%build
-export CFLAGS+=" -fno-lto"
-export CXXFLAGS+=" -fno-lto"
+# To fix the buildbreak issue on gcc 11 or higher, '-Wno-error=stringop-overflow' option is added to CFLAGS and CXXFLAGS.
+# Link: https://github.com/google/flatbuffers/pull/7422/commits/bd3aec02b4cf79c5f896c332c2ab5cb883fe6656
+export CFLAGS+=" -fno-lto -Wno-error=stringop-overflow"
+export CXXFLAGS+=" -fno-lto -Wno-error=stringop-overflow"
pushd python
export VERSION="2.0.6"
%{_bindir}/python3 setup.py build