Adding gcc version check for unsupported gcc6 option flag 44/221944/1 accepted/tizen/unified/20200109.115637 submit/tizen/20200109.063451
authormanish.r <manish.r@samsung.com>
Wed, 8 Jan 2020 10:00:02 +0000 (15:30 +0530)
committerManish Rathod <manish.r@samsung.com>
Wed, 8 Jan 2020 10:04:00 +0000 (10:04 +0000)
Change-Id: Ie2fc32c9905961b41f49d045aa04ccaf3622bb79
Signed-off-by: manish.r <manish.r@samsung.com>
packaging/gst-plugins-emulator.spec

index fe62f2f6942a44d6a7601f91677cb862cd0e91ed..8dac4945fdbbf6951417e3efb9c4ca2549fb2277 100644 (file)
@@ -28,13 +28,24 @@ Its codec set is determined after communicating with emulator
 %setup -q
 
 %build
-CFLAGS+=" -Wno-error=address-of-packed-member"
 cp %{SOURCE1001} .
 ./autogen.sh
+# Add gcc version check as address-of-packed-member warnings are not introduced by GCC-6
+%define gccversion %(gcc -dumpversion | cut -f1 -d.)
+
+%if %{gccversion} >= 9
+CFLAGS+=" -Wno-error=address-of-packed-member"
 %configure CFLAGS="$CFLAGS" --disable-static \
  --disable-nls \
  --prefix=%{_prefix} \
 
+%else
+%configure --disable-static \
+ --disable-nls \
+ --prefix=%{_prefix} \
+
+%endif
+
 make %{?jobs:-j%jobs}
 
 %install