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>
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