From 4db78b54773e07e8ac919033fd3dae6e13dc5673 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 21 Feb 2018 14:47:41 +0200 Subject: intel: update mesa to 17.0.2 Use recipes from pyro branch to update mesa to 17.0.2, which has support for the Intel NUCs with Kaby Lake. Task-number: QTAUTO-798 Change-Id: Ia2402c9acc57f1286b85d4e8eb53b17de7222d01 Reviewed-by: Nikolay Zamotaev Reviewed-by: Mikko Gronoff --- .../0001-Use-wayland-scanner-in-the-path.patch | 37 ++++++++++++++++++++++ .../mesa/files/disable-asm-on-non-gcc.patch | 29 +++++++++++++++++ .../files/replace_glibc_check_with_linux.patch | 26 +++++++++++++++ meta-intel-extras/recipes/mesa/mesa_17.0.2.bb | 18 +++++++++++ 4 files changed, 110 insertions(+) create mode 100644 meta-intel-extras/recipes/mesa/files/0001-Use-wayland-scanner-in-the-path.patch create mode 100644 meta-intel-extras/recipes/mesa/files/disable-asm-on-non-gcc.patch create mode 100644 meta-intel-extras/recipes/mesa/files/replace_glibc_check_with_linux.patch create mode 100644 meta-intel-extras/recipes/mesa/mesa_17.0.2.bb diff --git a/meta-intel-extras/recipes/mesa/files/0001-Use-wayland-scanner-in-the-path.patch b/meta-intel-extras/recipes/mesa/files/0001-Use-wayland-scanner-in-the-path.patch new file mode 100644 index 0000000..e49695b --- /dev/null +++ b/meta-intel-extras/recipes/mesa/files/0001-Use-wayland-scanner-in-the-path.patch @@ -0,0 +1,37 @@ +From 2f68fcaaf4964e7feeb383f5c26851965cda037c Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 15 Nov 2016 15:20:49 +0200 +Subject: [PATCH] Simplify wayland-scanner lookup + +Don't use pkg-config to lookup the path of a binary that's in the path. + +Alternatively we'd have to prefix the path returned by pkg-config with +PKG_CONFIG_SYSROOT_DIR. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen +--- + configure.ac | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e56e35a..a92005a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2020,12 +2020,7 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + +-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner], +- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`, +- WAYLAND_SCANNER='') +-if test "x$WAYLAND_SCANNER" = x; then +- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) +-fi ++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) + + # Do per-EGL platform setups and checks + egl_platforms=`IFS=', '; echo $with_egl_platforms` +-- +2.1.4 + diff --git a/meta-intel-extras/recipes/mesa/files/disable-asm-on-non-gcc.patch b/meta-intel-extras/recipes/mesa/files/disable-asm-on-non-gcc.patch new file mode 100644 index 0000000..d2d6755 --- /dev/null +++ b/meta-intel-extras/recipes/mesa/files/disable-asm-on-non-gcc.patch @@ -0,0 +1,29 @@ +Configure checks for compiler to be gcc and then it enables asm_offsets +generation. see + +https://cgit.freedesktop.org/mesa/mesa/commit/?id=73c9b4b0e05fc66629ba250846948dc55c0e7a0d + +However, we missed the check when enabling this on cross compilation +when architecture for both host and target is x86 + +Fixes errors like +./gen_matypes > matypes.h +/bin/bash: ./gen_matypes: No such file or directory + +-Khem + +Upstream-Status: Submitted + +Index: mesa-12.0.1/configure.ac +=================================================================== +--- mesa-12.0.1.orig/configure.ac ++++ mesa-12.0.1/configure.ac +@@ -732,7 +732,7 @@ test "x$enable_asm" = xno && AC_MSG_RESU + if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then + case "$host_cpu" in + i?86 | x86_64 | amd64) +- if test "x$host_cpu" != "x$target_cpu"; then ++ if test "x$host_cpu" != "x$target_cpu" -o "x$acv_mesa_CLANG" = xyes; then + enable_asm=no + AC_MSG_RESULT([no, cross compiling]) + fi diff --git a/meta-intel-extras/recipes/mesa/files/replace_glibc_check_with_linux.patch b/meta-intel-extras/recipes/mesa/files/replace_glibc_check_with_linux.patch new file mode 100644 index 0000000..0280ee8 --- /dev/null +++ b/meta-intel-extras/recipes/mesa/files/replace_glibc_check_with_linux.patch @@ -0,0 +1,26 @@ +endianness check is OS wide and not specific to libc + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Signed-off-by: Jussi Kukkonen +--- + src/util/u_endian.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/u_endian.h b/src/util/u_endian.h +index b9d563d..2d5eab9 100644 +--- a/src/util/u_endian.h ++++ b/src/util/u_endian.h +@@ -27,7 +27,7 @@ + #ifndef U_ENDIAN_H + #define U_ENDIAN_H + +-#if defined(__GLIBC__) || defined(ANDROID) ++#if defined(__linux__) + #include + + #if __BYTE_ORDER == __LITTLE_ENDIAN +-- +2.1.4 + diff --git a/meta-intel-extras/recipes/mesa/mesa_17.0.2.bb b/meta-intel-extras/recipes/mesa/mesa_17.0.2.bb new file mode 100644 index 0000000..b95f301 --- /dev/null +++ b/meta-intel-extras/recipes/mesa/mesa_17.0.2.bb @@ -0,0 +1,18 @@ +require recipes-graphics/mesa/${BPN}.inc + +SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/mesa-${PV}.tar.xz \ + file://replace_glibc_check_with_linux.patch \ + file://disable-asm-on-non-gcc.patch \ + file://0001-Use-wayland-scanner-in-the-path.patch \ +" + +SRC_URI[md5sum] = "8f808e92b893d412fbd6510e1d16f5c5" +SRC_URI[sha256sum] = "f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4" + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} -- cgit v1.2.3-54-g00ecf