Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Sebastian Weyer <sebastian.weyer@smile.fr>
Cc: Romain Naour <romain.naour@smile.fr>,
	Samuel Martin <s.martin49@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 5/9] package/spirv-tools: new package
Date: Sun, 1 Oct 2023 18:53:45 +0200	[thread overview]
Message-ID: <20231001185345.6c023fff@windsurf> (raw)
In-Reply-To: <20230725173102.543874-6-sebastian.weyer@smile.fr>

On Tue, 25 Jul 2023 19:30:57 +0200
Sebastian Weyer <sebastian.weyer@smile.fr> wrote:

> From: Romain Naour <romain.naour@smile.fr>
> 
> This package is required by mesa3d for building rusticl:
> 
> https://docs.mesa3d.org/rusticl.html
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
> ---
>  package/Config.in                    |  1 +
>  package/spirv-tools/Config.in        | 12 ++++++++++++
>  package/spirv-tools/spirv-tools.hash |  2 ++
>  package/spirv-tools/spirv-tools.mk   | 22 ++++++++++++++++++++++
>  4 files changed, 37 insertions(+)

Entry in DEVELOPERS file was missing.

> diff --git a/package/spirv-tools/Config.in b/package/spirv-tools/Config.in
> new file mode 100644
> index 0000000000..21b3852779
> --- /dev/null
> +++ b/package/spirv-tools/Config.in
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_SPIRV_TOOLS
> +	bool "spirv-tools"
> +	depends on BR2_USE_WCHAR # python3
> +	depends on BR2_USE_MMU # python3
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # python3
> +	depends on !BR2_STATIC_LIBS # python3
> +	select BR2_PACKAGE_PYTHON3

Not sure why you thought python3 was needed on the target. Reading
things a bit about spirv-tools, it doesn't seem like Python is needed,
so I dropped this.

However, it needs spirv-headers, and you had forgotten "select
BR2_PACKAGE_SPIRV_HEADERS" here.


> diff --git a/package/spirv-tools/spirv-tools.hash b/package/spirv-tools/spirv-tools.hash
> new file mode 100644
> index 0000000000..6861f543ea
> --- /dev/null
> +++ b/package/spirv-tools/spirv-tools.hash
> @@ -0,0 +1,2 @@

Missing "Locally calculated" comment here.

> +sha256  645c4585c207cbdfda81a09f8ab180773c18df50fad9644d2d9a53b4464c692b  spirv-tools-1.3.246.1.tar.gz
> +sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
> diff --git a/package/spirv-tools/spirv-tools.mk b/package/spirv-tools/spirv-tools.mk
> new file mode 100644
> index 0000000000..758c01343c
> --- /dev/null
> +++ b/package/spirv-tools/spirv-tools.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# spirv-tools
> +#
> +################################################################################
> +
> +SPIRV_TOOLS_VERSION = 1.3.246.1

I bumped to a newer version to match spirv-headers, as otherwise
spirv-tools would fail to build. I also added a comment in both
spirv-headers and spirv-tools to hint that they should be kept in sync
in terms of version.

> +SPIRV_TOOLS_SITE = $(call github,KhronosGroup,SPIRV-Tools,sdk-$(SPIRV_TOOLS_VERSION))
> +SPIRV_TOOLS_LICENSE = Apache-2.0
> +SPIRV_TOOLS_LICENSE_FILES = LICENSE
> +
> +SPIRV_TOOLS_DEPENDENCIES = python3 spirv-headers

Dropped python3 here.

> +
> +SPIRV_TOOLS_INSTALL_STAGING = YES
> +
> +SPIRV_TOOLS_CONF_OPTS = \
> +    -DSPIRV-Headers_SOURCE_DIR=${STAGING_DIR}/usr \
> +    -DSPIRV_TOOLS_BUILD_STATIC=OFF \
> +    -DBUILD_SHARED_LIBS=ON \
> +    -DSPIRV_SKIP_TESTS=ON \

Indentation here was wrong (spaces used instead of tab), and
${STAGING_DIR} should have been $(STAGING_DIR). Both of these issues
were reported by "make check-package".

Also BUILD_SHARED_LIBS=ON is already passed by the cmake-package
infrastructure as required.

I've added -DSPIRV_WERROR=OFF because it exists, and -Werror is
annoying in the context of Buildroot.

Applied with those various changes. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-10-01 16:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 17:30 [Buildroot] [PATCH v2 0/9] Add support for Rusticl in mesa3d Sebastian Weyer
2023-07-25 17:30 ` [Buildroot] [PATCH v2 1/9] package/rust-bindgen: new host package Sebastian Weyer
2023-10-01 16:40   ` Thomas Petazzoni via buildroot
2023-07-25 17:30 ` [Buildroot] [PATCH v2 2/9] package/llvm-project/llvm: add llvm dump support Sebastian Weyer
2023-07-26 18:56   ` Daniel Lang
2023-10-01 16:40   ` Thomas Petazzoni via buildroot
2023-07-25 17:30 ` [Buildroot] [PATCH v2 3/9] package/pkg-meson.mk: add rust cross-compiler support Sebastian Weyer
2023-07-25 17:30 ` [Buildroot] [PATCH v2 4/9] package/spirv-headers: new package Sebastian Weyer
2023-10-01 16:50   ` Thomas Petazzoni via buildroot
2023-07-25 17:30 ` [Buildroot] [PATCH v2 5/9] package/spirv-tools: " Sebastian Weyer
2023-10-01 16:53   ` Thomas Petazzoni via buildroot [this message]
2023-07-25 17:30 ` [Buildroot] [PATCH v2 6/9] package/spirv-llvm-translator: add target variant to provide LLVMSPIRVLib Sebastian Weyer
2023-07-25 17:30 ` [Buildroot] [PATCH v2 7/9] package/opencl-headers: new package Sebastian Weyer
2023-07-25 17:31 ` [Buildroot] [PATCH v2 8/9] package/opencl-icd-loader: " Sebastian Weyer
2023-07-25 17:31 ` [Buildroot] [PATCH v2 9/9] package/mesa3d: add RustiCL support Sebastian Weyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231001185345.6c023fff@windsurf \
    --to=buildroot@buildroot.org \
    --cc=romain.naour@smile.fr \
    --cc=s.martin49@gmail.com \
    --cc=sebastian.weyer@smile.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox