Adding gcc verion check for unrecognized options 14/221814/2 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.123249 accepted/tizen/6.0/unified/hotfix/20201103.051059 accepted/tizen/unified/20200108.131355 submit/tizen/20200108.060121 submit/tizen_6.0/20201029.205101 submit/tizen_6.0_hotfix/20201102.192501 submit/tizen_6.0_hotfix/20201103.114801 tizen_6.0.m2_release
authormanish.r <manish.r@samsung.com>
Tue, 7 Jan 2020 14:18:41 +0000 (19:48 +0530)
committermanish.r <manish.r@samsung.com>
Wed, 8 Jan 2020 05:51:47 +0000 (11:21 +0530)
Change-Id: I579d5985bb94e066b14f839edf38c34563fafaa9
Signed-off-by: manish.r <manish.r@samsung.com>
packaging/emuld.spec

index 50c506f549c2e01ba033b6826242e8dff1485ab2..584fdcb24c83a5ae3e35fe080a1d006328f09c17 100644 (file)
@@ -55,13 +55,24 @@ Emulator daemon library for emuld plugins
 chmod 644 %{SOURCE0}
 %setup -q
 
+# Add gcc version check as stringop-overflow stringop-truncation warnings are not introduced by GCC-6
+%define gccversion %(gcc -dumpversion | cut -f1 -d.)
+
+%if %{gccversion} >= 9
+       %define extraflags "-Wno-error=stringop-overflow -Wno-error=sizeof-pointer-memaccess -Wno-error=array-bounds -Wno-error=stringop-truncation"
+%else
+       %define extraflags "-Wno-error=sizeof-pointer-memaccess -Wno-error=array-bounds"
+%endif
+
+echo %{extraflags}
+
 cmake . \
     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
     -DLIB_INSTALL_DIR=%{_libdir} \
     -DEMULD_MAJOR_VERSION=%{emuld_major_version} \
     -DEMULD_MINOR_VERSION=%{emuld_minor_version} \
     -DEMULD_RELEASE_NUMBER=%{emuld_release_number} \
-    -DEXTRA_CFLAGS="-Wno-error=stringop-overflow -Wno-error=sizeof-pointer-memaccess -Wno-error=array-bounds -Wno-error=stringop-truncation"
+    -DEXTRA_CFLAGS=%{extraflags}
 
 %build