From patchwork Fri Mar 9 16:49:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 883778 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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyYKS51KQz9sbX for ; Sat, 10 Mar 2018 03:50:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 061938A307; Fri, 9 Mar 2018 16:50:32 +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 uN8NZmRhJlss; Fri, 9 Mar 2018 16:50:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DC8B88A2FA; Fri, 9 Mar 2018 16:50:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 84C9C1BFDB9 for ; Fri, 9 Mar 2018 16:50:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 81796894F6 for ; Fri, 9 Mar 2018 16:50:29 +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 1uQduzRs1r87 for ; Fri, 9 Mar 2018 16:50:28 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 1CFF489492 for ; Fri, 9 Mar 2018 16:50:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 63A081EE2FBD; Fri, 9 Mar 2018 17:50:26 +0100 (CET) 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 N62ftvc5jbIO; Fri, 9 Mar 2018 17:50:26 +0100 (CET) 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 3C5CA1EE2FB8; Fri, 9 Mar 2018 17:50:26 +0100 (CET) From: Valentin Korenblit To: buildroot@buildroot.org Date: Fri, 9 Mar 2018 17:49:37 +0100 Message-Id: <20180309164939.16075-5-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309164939.16075-1-valentin.korenblit@smile.fr> References: <20180309164939.16075-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v3 4/6] package/mesa3d: enable llvm 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 LLVM support for Mesa3D, enabling llvmpipe software rasterizer. It uses llvm-config (host variant) installed in STAGING_DIR/usr/bin to get LLVM libraries. Assuming that LLVM version 5.0.1 is installed, llvm-config --libs will output -lLLVM-5.0. Signed-off-by: Valentin Korenblit Tested-by: Jérôme Oufella --- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index f141587c4d..e99e737d31 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -25,6 +25,14 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3D +config BR2_PACKAGE_MESA3D_LLVM + bool "mesa3d w/ llvm" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + select BR2_PACKAGE_LLVM + +comment "mesa3d w/ llvm needs llvm" + depends on !BR2_PACKAGE_LLVM_ARCH_SUPPORTS + # 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 5f4832c0f0..03104c3c00 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -32,6 +32,20 @@ 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 += \ + --with-llvm-prefix=$(STAGING_DIR)/usr \ + --disable-llvm-shared-libs \ + --disable-llvm +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. @@ -219,7 +233,4 @@ else MESA3D_CONF_OPTS += --disable-lmsensors endif -# Avoid automatic search of llvm-config -MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin - $(eval $(autotools-package))