From patchwork Fri May 4 11:46:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 908677 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.136; helo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40cqwY6Wvqz9s3G for ; Fri, 4 May 2018 21:46:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EDD342277A; Fri, 4 May 2018 11:46:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tClAs+uPiG2E; Fri, 4 May 2018 11:46:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id AE16622249; Fri, 4 May 2018 11:46:16 +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 8FB6E1C0C64 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8D312895A4 for ; Fri, 4 May 2018 11:46:14 +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 LC1EfejEJwkr for ; Fri, 4 May 2018 11:46:13 +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 3146D88BEA for ; Fri, 4 May 2018 11:46:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 7E2631EE2E87; Fri, 4 May 2018 13:46:11 +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 6P6FwqPyKAur; Fri, 4 May 2018 13:46:11 +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 5819C1EE2A39; Fri, 4 May 2018 13:46:11 +0200 (CEST) From: Valentin Korenblit To: buildroot@buildroot.org Date: Fri, 4 May 2018 13:46:02 +0200 Message-Id: <20180504114603.10135-3-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180504114603.10135-1-valentin.korenblit@smile.fr> References: <20180504114603.10135-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v7 2/3] 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 | 9 +++++++++ package/mesa3d/mesa3d.mk | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index 8c1877fbc1..ba6eaa55d2 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -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 diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index fb9189741f..95ea0581df 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -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))