@@ -51,6 +51,15 @@ 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
+
# inform the .mk file of gallium, dri or vulkan driver selection
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
bool
@@ -237,4 +237,13 @@ else
MESA3D_CONF_OPTS += --disable-lmsensors
endif
+ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
+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
+
$(eval $(autotools-package))
This patch provides Clover, the OpenCL 1.1 API implementation by Mesa for AMD GPUs. It generates libOpenCL.so. Add --disable-opencl-icd because in Mesa 18 it defaults to on. When disabled, the shared library is named libOpenCL instead of libMesaOpenCL and CL headers are installed. Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr> --- package/mesa3d/Config.in | 9 +++++++++ package/mesa3d/mesa3d.mk | 9 +++++++++ 2 files changed, 18 insertions(+)