[spec] Update CFLAGS to fix the buildbreak issue on GCC v13 85/294185/1 accepted/tizen/unified/20231226.154603 accepted/tizen/unified/20231226.180202 accepted/tizen/unified/dev/20230726.115359
authorSangjung Woo <sangjung.woo@samsung.com>
Wed, 14 Jun 2023 05:22:21 +0000 (14:22 +0900)
committerSangjung Woo <sangjung.woo@samsung.com>
Wed, 14 Jun 2023 05:22:57 +0000 (14:22 +0900)
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>
packaging/flatbuffers.spec

index 4944676..650dc0f 100644 (file)
@@ -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