Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E3D9C52D7C for ; Thu, 22 Aug 2024 18:16:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 20310810D6; Thu, 22 Aug 2024 18:16:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id R7dZd07-3hnb; Thu, 22 Aug 2024 18:16:18 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 07F33812E0 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 07F33812E0; Thu, 22 Aug 2024 18:16:18 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 199811BF983 for ; Thu, 22 Aug 2024 18:16:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 06B6340168 for ; Thu, 22 Aug 2024 18:16:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ZtBoATLdDYe7 for ; Thu, 22 Aug 2024 18:16:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=85.13.140.57; helo=dd20012.kasserver.com; envelope-from=bernd@kuhls.net; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 9C4B9400D2 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9C4B9400D2 Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9C4B9400D2 for ; Thu, 22 Aug 2024 18:16:14 +0000 (UTC) Received: from fli4l.lan.fli4l (p5b3a0a54.dip0.t-ipconnect.de [91.58.10.84]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 29344A4C2613; Thu, 22 Aug 2024 20:15:49 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:44610) by fli4l.lan.fli4l with esmtp (Exim 4.98) (envelope-from ) id 1shCLc-000000005D0-1Sc0; Thu, 22 Aug 2024 18:15:48 +0000 From: Bernd Kuhls To: buildroot@buildroot.org Date: Thu, 22 Aug 2024 20:15:43 +0200 Message-Id: <20240822181546.64900-3-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240822181546.64900-1-bernd@kuhls.net> References: <20240822181546.64900-1-bernd@kuhls.net> MIME-Version: 1.0 X-Spamd-Bar: + X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202406071026; t=1724350549; bh=5/zPBrStVwqZ7a/SewdQLuStBxo91zvuxdKU6ZSiWkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L07tk3RSJPrvUGrhi6wBbZsTTt8Gbf7fEUI2e2M63AicSUwqITfzOZl00lXkguhfK 7V+yxdO5/RQK/qqxM2REdV9jnP/y4LDEyNKdDeMwyyQSOcbiUM+VIPZkokYCWkfphb 7tZB9l2vCW4XDNY7gUtVqjTuPV+eEJ5KERmRGIKnHERmSY3SgCi9j+fez9pdFRUjfc xm5hmr6q82V3Z5fMxEHNXTwWmgGW3k+DyZGcuNXcota7hSxbKHXUD9UiQRnivulNj+ b5j2KzCoRwVUcotBd7oKNn1+/pKgLwViG0WtmyWMnTsI+X4zkoQndyV13B2fywSZul 5edHHG2ZNZdjQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=kuhls.net X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202406071026 header.b=L07tk3RS Subject: [Buildroot] [PATCH/next 3/6] package/spirv-llvm-translator: add target variant to provide LLVMSPIRVLib X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Le Bihan , Sebastian Weyer , Daniel Lang , Romain Naour , Antoine Coutant , Samuel Martin , Romain Naour , "Yann E . MORIN" , Valentin Korenblit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Romain Naour This target version is needed for Rusticl which is an LLVM based OpenCL framework[1]. Rusticl allow programs to compile OpenCL C/C++ code at runtime with Clang. Clang generates LLVM IR which is translated into SPIR-V by spirv-llvm-translator. Finally, mesa can use its internal tools to manage SPIR-V. [1]: https://docs.mesa3d.org/rusticl.html Signed-off-by: Romain Naour Signed-off-by: Sebastian Weyer Signed-off-by: Antoine Coutant Signed-off-by: Bernd Kuhls --- package/Config.in | 1 + package/spirv-llvm-translator/Config.in | 22 +++++++++++++++++++ .../spirv-llvm-translator.mk | 10 +++++++++ 3 files changed, 33 insertions(+) create mode 100644 package/spirv-llvm-translator/Config.in diff --git a/package/Config.in b/package/Config.in index bb155b5734..930910789d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -337,6 +337,7 @@ comment "Graphic applications" source "package/pngquant/Config.in" source "package/qt5cinex/Config.in" source "package/rrdtool/Config.in" + source "package/spirv-llvm-translator/Config.in" source "package/spirv-tools/Config.in" source "package/stellarium/Config.in" source "package/sway/Config.in" diff --git a/package/spirv-llvm-translator/Config.in b/package/spirv-llvm-translator/Config.in new file mode 100644 index 0000000000..73ca787d8a --- /dev/null +++ b/package/spirv-llvm-translator/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR + bool "spirv-translator" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm + select BR2_PACKAGE_LLVM + select BR2_PACKAGE_SPIRV_HEADERS + select BR2_PACKAGE_ZLIB + help + LLVM/SPIR-V Bi-Directional Translator is a library and tool + for translation between LLVM IR and SPIR-V. + + https://github.com/khronosGroup/SPIRV-LLVM-Translator + +comment "spirv-translator needs a toolchain w/ threads, C++, gcc >= 7, dynamic library, host gcc >= 7" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 \ + || BR2_STATIC_LIBS || !BR2_HOST_GCC_AT_LEAST_7 diff --git a/package/spirv-llvm-translator/spirv-llvm-translator.mk b/package/spirv-llvm-translator/spirv-llvm-translator.mk index 523890a986..ffc8a63b89 100644 --- a/package/spirv-llvm-translator/spirv-llvm-translator.mk +++ b/package/spirv-llvm-translator/spirv-llvm-translator.mk @@ -19,4 +19,14 @@ HOST_SPIRV_LLVM_TRANSLATOR_CONF_OPTS = \ -DLLVM_EXTERNAL_PROJECTS="SPIRV-Headers" \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$(HOST_DIR)/include +SPIRV_LLVM_TRANSLATOR_INSTALL_STAGING = YES +SPIRV_LLVM_TRANSLATOR_DEPENDENCIES = host-clang host-llvm llvm spirv-headers +SPIRV_LLVM_TRANSLATOR_CONF_OPTS = \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$(STAGING_DIR)/usr \ + -DLLVM_BUILD_TOOLS=ON \ + -DLLVM_DIR=$(STAGING_DIR)/lib/cmake/llvm \ + -DLLVM_SPIRV_BUILD_EXTERNAL=YES \ + -DLLVM_SPIRV_INCLUDE_TESTS=OFF + +$(eval $(cmake-package)) $(eval $(host-cmake-package)) -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot