All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH next v2 1/2] package/highway: new package
Date: Mon, 13 Feb 2023 23:20:50 +0100	[thread overview]
Message-ID: <20230213232050.5fe67607@windsurf> (raw)
In-Reply-To: <20221124220552.2836398-1-ju.o@free.fr>

On Thu, 24 Nov 2022 23:05:51 +0100
Julien Olivain <ju.o@free.fr> wrote:

> Highway is a C++ library that provides portable SIMD/vector intrinsics.
> 
> https://github.com/google/highway
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Thanks! I've applied, with some small changes, see below.

> diff --git a/package/highway/0001-Check-for-the-presence-of-sys-auxv.h.patch b/package/highway/0001-Check-for-the-presence-of-sys-auxv.h.patch
> new file mode 100644
> index 0000000000..df86798613
> --- /dev/null
> +++ b/package/highway/0001-Check-for-the-presence-of-sys-auxv.h.patch
> @@ -0,0 +1,62 @@
> +From 491e3b1c2b8c44a2cfd35db117b02ef0fdf6a8e5 Mon Sep 17 00:00:00 2001
> +From: Julien Olivain <ju.o@free.fr>
> +Date: Wed, 23 Nov 2022 23:27:11 +0100
> +Subject: [PATCH] Check for the presence of <sys/auxv.h>
> +
> +Not all gcc versions are providing <sys/auxv.h>. Checking for
> +HWY_ARCH_ARM && HWY_COMPILER_GCC_ACTUAL && HWY_OS_LINUX is not
> +sufficient and fail to build in some situations (it was observed for
> +some gcc armv7m toolchains).
> +
> +This patch adds a check for <sys/auxv.h> and include it only if present.
> +
> +Signed-off-by: Julien Olivain <ju.o@free.fr>

Has this patch been submitted upstream?


> diff --git a/package/highway/Config.in b/package/highway/Config.in
> new file mode 100644
> index 0000000000..23861f0b94
> --- /dev/null
> +++ b/package/highway/Config.in
> @@ -0,0 +1,30 @@
> +config BR2_PACKAGE_HIGHWAY
> +	bool "highway"
> +	depends on BR2_TOOLCHAIN_HAS_ATOMIC
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	# For gcc bug 58969, see:
> +	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58969
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++11, GCC_BUG_58969
> +	help
> +	  Highway is a C++ library that provides portable SIMD/vector
> +	  intrinsics.
> +
> +	  https://github.com/google/highway
> +
> +if BR2_PACKAGE_HIGHWAY
> +
> +config BR2_PACKAGE_HIGHWAY_CONTRIB
> +	bool "Enable Contrib"
> +	help
> +	  Build Highway contrib library which contains extra
> +	  SIMD-related utilities: an image class with aligned rows, a
> +	  math library (16 functions already implemented, mostly
> +	  trigonometry), and functions for computing dot products and
> +	  sorting.
> +
> +config BR2_PACKAGE_HIGHWAY_EXAMPLES
> +	bool "Enable Examples"
> +	help
> +	  Build Highway examples
> +
> +endif

You forgot the Config.in comment matching the "depends on" of the main
options:

comment "highway needs a toolchain w/ C++, gcc >= 7"
        depends on BR2_TOOLCHAIN_HAS_ATOMIC
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_7

> +HIGHWAY_CXXFLAGS = $(TARGET_CXXFLAGS)
> +
> +ifeq ($(BR2_PACKAGE_HIGHWAY_CONTRIB),y)
> +HIGHWAY_CONF_OPTS += -DHWY_ENABLE_CONTRIB=ON
> +else
> +HIGHWAY_CONF_OPTS += -DHWY_ENABLE_CONTRIB=OFF
> +endif
> +
> +# Examples are not installed by cmake. This binary can be useful for
> +# quick testing and debug.
> +define HIGHWAY_INSTALL_EXAMPLES
> +	$(INSTALL) -m 0755 \
> +		$(@D)/examples/hwy_benchmark \
> +		$(TARGET_DIR)/usr/bin/hwy_benchmark
> +endef

I've moved this...

> +
> +ifeq ($(BR2_PACKAGE_HIGHWAY_EXAMPLES),y)
> +HIGHWAY_CONF_OPTS += -DHWY_ENABLE_EXAMPLES=ON

... here, as it is used only within this condition.

Applied with those 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

  parent reply	other threads:[~2023-02-13 22:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 22:05 [Buildroot] [PATCH next v2 1/2] package/highway: new package Julien Olivain
2022-11-24 22:05 ` [Buildroot] [PATCH next v2 2/2] package/libjxl: " Julien Olivain
2023-02-13 22:22   ` Thomas Petazzoni via buildroot
2023-02-13 22:20 ` Thomas Petazzoni via buildroot [this message]
2023-02-14 23:20   ` [Buildroot] [PATCH next v2 1/2] package/highway: " Julien Olivain

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=20230213232050.5fe67607@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.