done
%build
+
+# test gcc options
+echo "int main() { return 0; }" > gcc-test.c && gcc gcc-test.c -Wno-error=class-memaccess && use_gcc9=yes || use_gcc9=no
+
+# suppress gcc warnings
+if [ $use_gcc9 == "yes" ]; then
+ nowarn='"-Wno-unused-function",
+ "-Wno-error=deprecated-copy",
+ "-Wno-error=uninitialized",
+ "-Wno-error=class-memaccess",
+ "-Wno-error=deprecated-copy",
+ "-Wno-error=redundant-move",
+ "-Wno-error=implicit-fallthrough"'
+else
+ nowarn='"-Wno-unused-function"'
+fi
+
%{_BINDIR}/gn gen out/Tizen --args='
is_official_build=true
skia_enable_tools=false
skia_use_system_libpng=true
skia_use_system_libwebp=false
skia_use_system_zlib=true
- extra_cflags=[
- "-DSKIA_C_DLL", "-DSK_BUILD_FOR_TIZEN", "-DSK_BUILD_FOR_UNIX"
- , "-DSK_INTERNAL", "-DSK_SUPPORT_GPU=1"
- , "-Wno-unused-function"
- , "-Wno-error=deprecated-copy"
- , "-Wno-error=uninitialized"
- , "-Wno-error=class-memaccess"
- , "-Wno-error=deprecated-copy"
- , "-Wno-error=redundant-move"
- , "-Wno-error=implicit-fallthrough"
+ extra_cflags=["-DSKIA_C_DLL", "-DSK_BUILD_FOR_TIZEN", "-DSK_BUILD_FOR_UNIX", "-DSK_INTERNAL", "-DSK_SUPPORT_GPU=1",
%ifarch %arm
- , "-mfpu=%{MFPU}", "-mfloat-abi=softfp"
+ "-mfpu=%{MFPU}", "-mfloat-abi=softfp",
%endif
- ] '
+ '" $nowarn ]"
ninja -C out/Tizen