Backport fixes from upstream for gcc 10 failures. This should help when
oe-core reverts back to using the default of -fno-common with gcc10.

Signed-off-by: Anuj Mittal <[email protected]>
---
 ...-HEVCe-kernel-compile-error-on-gcc10.patch | 35 +++++++++++++++++++
 ...VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch | 33 +++++++++++++++++
 .../libva/intel-vaapi-driver_2.4.0.bb         |  6 +++-
 3 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 
recipes-multimedia/libva/intel-vaapi-driver/0001-Fix-HEVCe-kernel-compile-error-on-gcc10.patch
 create mode 100644 
recipes-multimedia/libva/intel-vaapi-driver/0002-test-cast-VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch

diff --git 
a/recipes-multimedia/libva/intel-vaapi-driver/0001-Fix-HEVCe-kernel-compile-error-on-gcc10.patch
 
b/recipes-multimedia/libva/intel-vaapi-driver/0001-Fix-HEVCe-kernel-compile-error-on-gcc10.patch
new file mode 100644
index 00000000..f7af3c4f
--- /dev/null
+++ 
b/recipes-multimedia/libva/intel-vaapi-driver/0001-Fix-HEVCe-kernel-compile-error-on-gcc10.patch
@@ -0,0 +1,35 @@
+From b39e160d3974613328c570f46ecbcbcb70a5101b Mon Sep 17 00:00:00 2001
+From: "U. Artie Eoff" <[email protected]>
+Date: Tue, 12 May 2020 11:01:30 -0700
+Subject: [PATCH 1/2] Fix HEVCe kernel compile error on gcc10
+
+This fixes a "multiple definition" compiler error on
+gcc10 which defaults to -fno-common.
+
+https://gcc.gnu.org/gcc-10/porting_to.html#common
+
+Fixes #503
+
+Signed-off-by: U. Artie Eoff <[email protected]>
+
+Upstream-Status: Backport 
[https://github.com/intel/intel-vaapi-driver/commit/b39e160d3974613328c570f46ecbcbcb70a5101b]
+Signed-off-by: Anuj Mittal <[email protected]>
+---
+ src/gen9_hevc_enc_kernels_binary.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gen9_hevc_enc_kernels_binary.h 
b/src/gen9_hevc_enc_kernels_binary.h
+index 29659fa..ff7d0af 100644
+--- a/src/gen9_hevc_enc_kernels_binary.h
++++ b/src/gen9_hevc_enc_kernels_binary.h
+@@ -31,6 +31,6 @@
+ 
+ #define GEN9_HEVC_ENC_KERNEL_SIZE 149296
+ 
+-const unsigned int gen9_hevc_encoder_kernels[GEN9_HEVC_ENC_KERNEL_SIZE];
++extern const unsigned int 
gen9_hevc_encoder_kernels[GEN9_HEVC_ENC_KERNEL_SIZE];
+ 
+ #endif
+-- 
+2.25.4
+
diff --git 
a/recipes-multimedia/libva/intel-vaapi-driver/0002-test-cast-VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch
 
b/recipes-multimedia/libva/intel-vaapi-driver/0002-test-cast-VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch
new file mode 100644
index 00000000..d17d901c
--- /dev/null
+++ 
b/recipes-multimedia/libva/intel-vaapi-driver/0002-test-cast-VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch
@@ -0,0 +1,33 @@
+From 625d2651258db881d92eb5ffc97cb4f4f1fda239 Mon Sep 17 00:00:00 2001
+From: "U. Artie Eoff" <[email protected]>
+Date: Tue, 12 May 2020 11:03:26 -0700
+Subject: [PATCH 2/2] test: cast VA_STATSUS_ERROR_UNKNOWN to VAStatus
+
+This fixes a gcc10 compiler error for the
+VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF conversion from
+unsigned int to int.
+
+Signed-off-by: U. Artie Eoff <[email protected]>
+
+Upstream-Status: Backport 
[https://github.com/intel/intel-vaapi-driver/commit/625d2651258db881d92eb5ffc97cb4f4f1fda239]
+Signed-off-by: Anuj Mittal <[email protected]>
+---
+ test/test.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test.h b/test/test.h
+index 5d3fdc8..fc23ad1 100644
+--- a/test/test.h
++++ b/test/test.h
+@@ -147,7 +147,7 @@ public:
+             status = "VA_STATUS_ERROR_HW_BUSY"; break;
+         case VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE:
+             status = "VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE"; break;
+-        case VA_STATUS_ERROR_UNKNOWN:
++        case VAStatus(VA_STATUS_ERROR_UNKNOWN):
+             status = "VA_STATUS_ERROR_UNKNOWN"; break;
+         default:
+             status = "Unknown VAStatus";
+-- 
+2.25.4
+
diff --git a/recipes-multimedia/libva/intel-vaapi-driver_2.4.0.bb 
b/recipes-multimedia/libva/intel-vaapi-driver_2.4.0.bb
index 760aa24e..48e53f95 100644
--- a/recipes-multimedia/libva/intel-vaapi-driver_2.4.0.bb
+++ b/recipes-multimedia/libva/intel-vaapi-driver_2.4.0.bb
@@ -13,7 +13,11 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
 DEPENDS = "libva libdrm"
 
-SRC_URI = 
"https://github.com/intel/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.bz2";
+SRC_URI = 
"https://github.com/intel/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.bz2 \
+           file://0001-Fix-HEVCe-kernel-compile-error-on-gcc10.patch \
+           file://0002-test-cast-VA_STATSUS_ERROR_UNKNOWN-to-VAStatus.patch \
+           "
+
 SRC_URI[md5sum] = "731dd9aaf9f5ef1b9c906ce82ef0220b"
 SRC_URI[sha256sum] = 
"71e2ddd985af6b221389db1018c4e8ca27a7f939fb51dcdf49d0efcb5ff3d089"
 
-- 
2.25.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#6543): 
https://lists.yoctoproject.org/g/meta-intel/message/6543
Mute This Topic: https://lists.yoctoproject.org/mt/74342561/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to