From patchwork Wed Apr 11 16:14:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 897279 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40LpzT2yqPz9s27 for ; Thu, 12 Apr 2018 02:15:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B38E786DCE; Wed, 11 Apr 2018 16:15:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j4PpWxMInEUQ; Wed, 11 Apr 2018 16:15:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 69B1786FA9; Wed, 11 Apr 2018 16:15:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A467E1C0F41 for ; Wed, 11 Apr 2018 16:15:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A17B48709F for ; Wed, 11 Apr 2018 16:15:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qnjgPVXIgQEn for ; Wed, 11 Apr 2018 16:15:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from idris.smile.fr (idris.smile.fr [91.216.209.19]) by hemlock.osuosl.org (Postfix) with ESMTPS id 014F886FEC for ; Wed, 11 Apr 2018 16:15:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 754F81EE2993; Wed, 11 Apr 2018 18:15:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smile.fr Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W8PieodUhetx; Wed, 11 Apr 2018 18:15:05 +0200 (CEST) Received: from sisellBox.daviel.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com [176.157.204.145]) by idris.smile.fr (Postfix) with ESMTPSA id 4B1751EE2966; Wed, 11 Apr 2018 18:15:05 +0200 (CEST) From: Valentin Korenblit To: buildroot@buildroot.org Date: Wed, 11 Apr 2018 18:14:51 +0200 Message-Id: <20180411161452.25043-4-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180411161452.25043-1-valentin.korenblit@smile.fr> References: <20180411161452.25043-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v6 3/4] package/mesa3d: enable OpenCL support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Korenblit , romain.naour@gmail.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index bd3d050e29..f27aed949a 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -47,6 +47,14 @@ 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 + 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 diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index 506f84274f..11245be2ba 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -230,4 +230,13 @@ else MESA3D_CONF_OPTS += --disable-lmsensors endif +ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y) +MESA3D_DEPENDENCIES += clang elfutils 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))