This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
From 25e20c2e288e1d482f479eca863bc4aaa374b782 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 22 Apr 2018 15:58:38 +0200
Subject: [PATCH] Fix musl build
Fix musl build when svga gallium driver is enabled.
In file included from vmw_fence.c:34:0:
vmw_screen.h:100:4: error: unknown type name dev_t
dev_t device;
^~~~~
Downloaded from
http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Romain: rebase on 18.1]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
src/gallium/winsys/svga/drm/vmw_screen.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
index f21cabb51f..20d03f8b53 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen.h
+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
@@ -34,7 +34,7 @@
#ifndef VMW_SCREEN_H_
#define VMW_SCREEN_H_
-
+#include <sys/stat.h>
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
--
2.14.3

View File

@@ -0,0 +1,51 @@
From ef96bac7cbbb11b98606864ead0f731dd5b71d5a Mon Sep 17 00:00:00 2001
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
Date: Thu, 17 Nov 2016 15:36:54 -0300
Subject: [PATCH] configure.ac: invert order for wayland-scanner check
When cross-compiling the .pc file might point to the wrong
wayland-scanner binary (target rather than host) resulting in a
non-executable and wrong scanner.
Try searching the PATH first, and if that fails fall back into
pkg-config.
[Vincent: tweak patch for 17.1.1 version]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
[Romain: rebase on 18.1]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Bernd rebase on 18.3]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index f1fbdcc6c7..dcf87e7dd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1841,17 +1841,16 @@
fi
WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
+ if test "x$WAYLAND_SCANNER" = x; then
+ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
WAYLAND_SCANNER='')
+ fi
PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
AC_SUBST(SCANNER_ARG, 'private-code'),
AC_SUBST(SCANNER_ARG, 'code'))
- if test "x$WAYLAND_SCANNER" = x; then
- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
- fi
-
if test "x$WAYLAND_SCANNER" = "x:"; then
AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
fi
--
2.14.3

View File

@@ -0,0 +1,37 @@
From 94bceeb621e36f3188c6246a763def8695526578 Mon Sep 17 00:00:00 2001
From: Valentin Korenblit <valentinkorenblit@gmail.com>
Date: Sat, 20 Oct 2018 10:56:23 +0200
Subject: [PATCH] Set proper value for LIBCLC_INCLUDEDIR
LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
will look for OpenCL "headers" on the target, when building the OpenCL
kernels.
The value returned by pkg-config for includedir is relevant when
cross-compiling, on the build machine. But in this specific case, we
really need a value that is valid on the target.
Those headers are installed by the libclc package in /usr/share so
that they are not removed by Buildroot target-finalize logic.
Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 864dcae..cc2390b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2429,7 +2429,7 @@ if test "x$enable_opencl" = xyes; then
PKG_CONFIG_PATH environment variable.
By default libclc.pc is installed to /usr/local/share/pkgconfig/])
else
- LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
+ LIBCLC_INCLUDEDIR="/usr/share"
LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
AC_SUBST([LIBCLC_INCLUDEDIR])
AC_SUBST([LIBCLC_LIBEXECDIR])
--
2.7.4

312
package/mesa3d/Config.in Normal file
View File

@@ -0,0 +1,312 @@
menuconfig BR2_PACKAGE_MESA3D
bool "mesa3d"
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_SYNC_1
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
select BR2_PACKAGE_LIBDRM
select BR2_PACKAGE_EXPAT
select BR2_PACKAGE_HAS_LIBGL if BR2_PACKAGE_XORG7
select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_XORGPROTO if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXXF86VM if BR2_PACKAGE_XORG7
select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
select BR2_PACKAGE_ZLIB
help
Mesa 3D, an open-source implementation of the OpenGL
specification.
http://mesa3d.org
if BR2_PACKAGE_MESA3D
# Some Gallium driver needs libelf when built with LLVM support
config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
bool
config BR2_PACKAGE_MESA3D_LLVM
bool "llvm support"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_HOST_GCC_AT_LEAST_4_8
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
depends on !BR2_STATIC_LIBS
depends on BR2_USE_WCHAR # std::wstring
select BR2_PACKAGE_LLVM
comment "llvm support needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, host gcc >= 4.8, dynamic library"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
!BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|| BR2_STATIC_LIBS || !BR2_USE_WCHAR
comment "llvm support needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
# clang and libclc dependencies are satisfied by
# BR2_PACKAGE_MESA3D_LLVM
config BR2_PACKAGE_MESA3D_OPENCL
bool "OpenCL support"
depends on BR2_PACKAGE_MESA3D_LLVM
depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
select BR2_PACKAGE_CLANG
select BR2_PACKAGE_LIBCLC
select BR2_PACKAGE_HAS_LIBOPENCL
# inform the .mk file of gallium, dri or vulkan driver selection
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
bool
select BR2_PACKAGE_MESA3D_DRIVER
config BR2_PACKAGE_MESA3D_DRI_DRIVER
bool
select BR2_PACKAGE_MESA3D_DRIVER
select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \
(BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
bool
select BR2_PACKAGE_MESA3D_DRIVER
config BR2_PACKAGE_MESA3D_DRIVER
bool
config BR2_PACKAGE_MESA3D_NEEDS_XA
bool
# Quote from mesa3d meson.build: "kmsro driver requires one or more
# renderonly drivers (vc4, etnaviv, freedreno)". But only vc4 support
# is available by using the (deprecated) autotools build system.
config BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
bool
comment "Gallium drivers"
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
bool "Gallium Etnaviv driver"
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_ETNAVIV
select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
Mesa driver for Vivante GPUs.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO
bool "Gallium KMSRO driver"
depends on BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
help
Support various sorts of KMS displays with the
renderonly layer used to attach a GPU.
comment "Gallium KMSRO needs one or more renderonly drivers"
depends on !BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
bool "Gallium nouveau driver"
depends on BR2_i386 || BR2_x86_64
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_NOUVEAU
select BR2_PACKAGE_MESA3D_NEEDS_XA
help
Supports all Nvidia GPUs.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
bool "Gallium Radeon R600 driver"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_PACKAGE_MESA3D_LLVM || \
(BR2_PACKAGE_MESA3D_LLVM && (BR2_TOOLCHAIN_USES_UCLIBC || \
BR2_TOOLCHAIN_USES_GLIBC)) # elfutils
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_RADEON
select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_MESA3D_NEEDS_XA
help
Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
# R600 needs libelf when Mesa3D is built with LLVM support
# musl is not currently compatible with elfutils
comment "R600 driver needs a uClibc or glibc toolchain when llvm is enabled"
depends on BR2_PACKAGE_MESA3D_LLVM
depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
bool "Gallium Radeon SI driver"
depends on BR2_USE_MMU # libdrm
depends on BR2_i386 || BR2_x86_64
depends on BR2_PACKAGE_MESA3D_LLVM
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_AMDGPU
select BR2_PACKAGE_LIBDRM_RADEON
select BR2_PACKAGE_LLVM_AMDGPU
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
select BR2_PACKAGE_MESA3D_NEEDS_XA
help
Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.
# Radeon SI needs libelf
# musl is not currently compatible with elfutils
comment "Radeon SI driver needs a uClibc or glibc toolchain"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_MESA3D_LLVM
depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
bool "Gallium vmware svga driver"
depends on BR2_i386 || BR2_x86_64
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_VMWGFX
select BR2_PACKAGE_MESA3D_NEEDS_XA
help
This is a virtual GPU driver for VMWare virtual machines.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
bool "Gallium swrast driver"
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
help
This is a software opengl implementation using the Gallium3D
infrastructure.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
bool "Gallium vc4 driver"
depends on BR2_arm || BR2_aarch64
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
select BR2_PACKAGE_LIBDRM_VC4
select BR2_PACKAGE_MESA3D_NEEDS_XA
select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
Driver for Broadcom VC4 (rpi2/3) GPUs.
It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
bool "Gallium virgl driver"
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
virgl is the 3D acceleration backend for the virtio-gpu
shipping with qemu.
comment "DRI drivers"
config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
bool "DRI swrast driver"
select BR2_PACKAGE_MESA3D_DRI_DRIVER
help
This is a software opengl implementation using the DRI
infrastructure.
config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
bool "DRI i915 driver"
depends on BR2_i386 || BR2_x86_64
select BR2_PACKAGE_MESA3D_DRI_DRIVER
select BR2_PACKAGE_LIBDRM_INTEL
help
Support for i915-based Intel GPUs.
config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
bool "DRI i965 driver"
depends on BR2_i386 || BR2_x86_64
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h
select BR2_PACKAGE_MESA3D_DRI_DRIVER
select BR2_PACKAGE_LIBDRM_INTEL
help
Support for i965-based Intel GPUs.
comment "DRI i965 driver needs a toolchain w/ headers >= 3.17"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU
bool "DRI nouveau driver"
select BR2_PACKAGE_MESA3D_DRI_DRIVER
select BR2_PACKAGE_LIBDRM_NOUVEAU
help
Support for Nvidia-based GPUs.
config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
bool "DRI radeon driver"
select BR2_PACKAGE_MESA3D_DRI_DRIVER
select BR2_PACKAGE_LIBDRM_RADEON
help
Legacy Radeon driver for R100 series GPUs.
comment "Vulkan drivers"
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
bool "Vulkan Intel driver"
depends on BR2_i386 || BR2_x86_64
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libxshmfence
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h
depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert
depends on BR2_PACKAGE_XORG7 # xorgproto
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
select BR2_PACKAGE_XORGPROTO
select BR2_PACKAGE_XLIB_LIBXSHMFENCE
help
Vulkan driver for Intel hardware from Ivy Bridge onward.
comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >= 3.17"
depends on BR2_i386 || BR2_x86_64
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \
!BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7
comment "Off-screen Rendering"
config BR2_PACKAGE_MESA3D_OSMESA
bool "OSMesa library"
help
The OSMesa API provides functions for making off-screen
renderings.
if BR2_PACKAGE_MESA3D_DRIVER
comment "Additional API Support"
config BR2_PACKAGE_MESA3D_OPENGL_EGL
bool "OpenGL EGL"
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
help
Use the Khronos EGL APIs. EGL is a window manager for OpenGL
applications similar to GLX, for X, and WGL, for Windows.
config BR2_PACKAGE_MESA3D_OPENGL_ES
bool "OpenGL ES"
select BR2_PACKAGE_HAS_LIBGLES
help
Use the Khronos OpenGL ES APIs. This is commonly used on
embedded systems and represents a subset of the OpenGL API.
endif # BR2_PACKAGE_MESA3D_DRIVER
config BR2_PACKAGE_PROVIDES_LIBGL
default "mesa3d" if BR2_PACKAGE_XORG7
config BR2_PACKAGE_PROVIDES_LIBEGL
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL
config BR2_PACKAGE_PROVIDES_LIBGLES
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
config BR2_PACKAGE_PROVIDES_LIBOPENCL
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENCL
endif # BR2_PACKAGE_MESA3D
comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_SYNC_1

View File

@@ -0,0 +1,7 @@
# From https://lists.freedesktop.org/archives/mesa-announce/2019-June/000525.html
md5 9634964d87f1ce8d0230493e43f34c50 mesa-19.0.8.tar.xz
sha1 5fd340a6304f7501014e1bd7291e4cfa7a6efcdb mesa-19.0.8.tar.xz
sha256 d017eb53a810c32dabeedf6ca2238ae1e897ce9090e470e9ce1d6c9e3f1b0862 mesa-19.0.8.tar.xz
sha512 fbddc3a74f223564343027380af776b3fa5d63fe1af4e34121273235d1c6eced96439f601eb19bf658eb927aff3965b520f0329fcbd4650f3112167303e1746d mesa-19.0.8.tar.xz
# License
sha256 630e75b4fdeb75ee2bf9e55db54dd1e3ff7353d52d9314ca8512bfd460f8e24c docs/license.html

251
package/mesa3d/mesa3d.mk Normal file
View File

@@ -0,0 +1,251 @@
################################################################################
#
# mesa3d
#
################################################################################
# When updating the version, please also update mesa3d-headers
MESA3D_VERSION = 19.0.8
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://mesa.freedesktop.org/archive
MESA3D_LICENSE = MIT, SGI, Khronos
MESA3D_LICENSE_FILES = docs/license.html
# 0002-configure.ac-invert-order-for-wayland-scanner-check.patch
# 0003-set-LIBCLC_INCLUDEDIR.patch
MESA3D_AUTORECONF = YES
MESA3D_INSTALL_STAGING = YES
MESA3D_PROVIDES =
MESA3D_DEPENDENCIES = \
host-bison \
host-flex \
expat \
libdrm \
zlib
# Disable assembly usage.
MESA3D_CONF_OPTS = --disable-asm
# autotools are deprecated in favour of meson, for now force autotools
MESA3D_CONF_OPTS += --enable-autotools
# Disable static, otherwise configure will fail with: "Cannot enable both static
# and shared."
ifeq ($(BR2_SHARED_STATIC_LIBS),y)
MESA3D_CONF_OPTS += --disable-static
endif
ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES += host-llvm llvm
MESA3D_CONF_OPTS += \
--with-llvm-prefix=$(STAGING_DIR)/usr \
--enable-llvm-shared-libs \
--enable-llvm
else
# Avoid automatic search of llvm-config
MESA3D_CONF_OPTS += --disable-llvm
endif
# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
# libMesaOpenCL and CL headers are installed
ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
MESA3D_PROVIDES += libopencl
MESA3D_DEPENDENCIES += clang libclc
MESA3D_CONF_OPTS += --enable-opencl \
--disable-opencl-icd \
--with-clang-libdir=$(STAGING_DIR)/usr/lib
else
MESA3D_CONF_OPTS += --disable-opencl
endif
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
MESA3D_DEPENDENCIES += elfutils
endif
# The Sourcery MIPS toolchain has a special (non-upstream) feature to
# have "compact exception handling", which unfortunately breaks with
# mesa3d, so we disable it here by passing -mno-compact-eh.
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
MESA3D_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh"
MESA3D_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mno-compact-eh"
endif
ifeq ($(BR2_PACKAGE_XORG7),y)
MESA3D_DEPENDENCIES += \
xlib_libX11 \
xlib_libXext \
xlib_libXdamage \
xlib_libXfixes \
xlib_libXrandr \
xlib_libXxf86vm \
xorgproto \
libxcb
MESA3D_CONF_OPTS += --enable-glx --disable-mangling
# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
MESA3D_CONF_OPTS += --enable-xa
else
MESA3D_CONF_OPTS += --disable-xa
endif
else
MESA3D_CONF_OPTS += \
--disable-glx \
--disable-xa
endif
# Drivers
#Gallium Drivers
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV) += etnaviv
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO) += kmsro
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4) += vc4
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
# DRI Drivers
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
# Vulkan Drivers
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
MESA3D_CONF_OPTS += \
--without-gallium-drivers \
--disable-gallium-extra-hud
else
MESA3D_CONF_OPTS += \
--enable-shared-glapi \
--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
--enable-gallium-extra-hud
endif
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
MESA3D_CONF_OPTS += \
--without-dri-drivers --disable-dri3
else
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
MESA3D_DEPENDENCIES += xlib_libxshmfence
MESA3D_CONF_OPTS += --enable-dri3
else
MESA3D_CONF_OPTS += --disable-dri3
endif
MESA3D_CONF_OPTS += \
--enable-shared-glapi \
--enable-driglx-direct \
--with-dri-driverdir=/usr/lib/dri \
--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
endif
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
MESA3D_CONF_OPTS += \
--without-vulkan-drivers
else
MESA3D_DEPENDENCIES += xlib_libxshmfence
MESA3D_CONF_OPTS += \
--enable-dri3 \
--with-vulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
endif
# APIs
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
MESA3D_CONF_OPTS += --enable-osmesa
else
MESA3D_CONF_OPTS += --disable-osmesa
endif
# Always enable OpenGL:
# - it is needed for GLES (mesa3d's ./configure is a bit weird)
MESA3D_CONF_OPTS += --enable-opengl --enable-dri
# libva and mesa3d have a circular dependency
# we do not need libva support in mesa3d, therefore disable this option
MESA3D_CONF_OPTS += --disable-va
# libGL is only provided for a full xorg stack
ifeq ($(BR2_PACKAGE_XORG7),y)
MESA3D_PROVIDES += libgl
else
define MESA3D_REMOVE_OPENGL_HEADERS
rm -rf $(STAGING_DIR)/usr/include/GL/
endef
MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_HEADERS
endif
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
MESA3D_PLATFORMS = drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
MESA3D_PLATFORMS = drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
MESA3D_PLATFORMS = drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL),y)
MESA3D_PLATFORMS = drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI),y)
MESA3D_PLATFORMS = drm
endif
ifeq ($(BR2_PACKAGE_WAYLAND),y)
MESA3D_DEPENDENCIES += wayland wayland-protocols
MESA3D_PLATFORMS += wayland
endif
ifeq ($(BR2_PACKAGE_XORG7),y)
MESA3D_PLATFORMS += x11
endif
MESA3D_CONF_OPTS += \
--with-platforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
MESA3D_PROVIDES += libegl
MESA3D_CONF_OPTS += \
--enable-gbm \
--enable-egl
else
MESA3D_CONF_OPTS += \
--disable-egl
endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
MESA3D_PROVIDES += libgles
MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
else
MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
endif
ifeq ($(BR2_PACKAGE_XLIB_LIBXVMC),y)
MESA3D_DEPENDENCIES += xlib_libXvMC
MESA3D_CONF_OPTS += --enable-xvmc
else
MESA3D_CONF_OPTS += --disable-xvmc
endif
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
MESA3D_CONF_OPTS += --enable-libunwind
MESA3D_DEPENDENCIES += libunwind
else
MESA3D_CONF_OPTS += --disable-libunwind
endif
ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
MESA3D_DEPENDENCIES += libvdpau
MESA3D_CONF_OPTS += --enable-vdpau
else
MESA3D_CONF_OPTS += --disable-vdpau
endif
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
MESA3D_CONF_OPTS += --enable-lmsensors
MESA3D_DEPENDENCIES += lm-sensors
else
MESA3D_CONF_OPTS += --disable-lmsensors
endif
$(eval $(autotools-package))