All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH next 1/2] package/highway: new package
@ 2022-11-22 21:55 Julien Olivain
  2022-11-22 21:59 ` [Buildroot] [PATCH next 2/2] package/libjxl: " Julien Olivain
  2022-11-23 14:17 ` [Buildroot] [PATCH next 1/2] package/highway: " Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Olivain @ 2022-11-22 21:55 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

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>
---
 DEVELOPERS                                    |  2 +
 package/Config.in                             |  1 +
 package/highway/Config.in                     | 42 +++++++++++++++
 package/highway/highway.hash                  |  3 ++
 package/highway/highway.mk                    | 51 +++++++++++++++++++
 support/testing/tests/package/test_highway.py | 36 +++++++++++++
 6 files changed, 135 insertions(+)
 create mode 100644 package/highway/Config.in
 create mode 100644 package/highway/highway.hash
 create mode 100644 package/highway/highway.mk
 create mode 100644 support/testing/tests/package/test_highway.py

diff --git a/DEVELOPERS b/DEVELOPERS
index fb6b329087..fefb40c605 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1689,6 +1689,7 @@ F:	configs/zynq_qmtech_defconfig
 F:	package/fluid-soundfont/
 F:	package/fluidsynth/
 F:	package/glslsandbox-player/
+F:	package/highway/
 F:	package/octave/
 F:	package/ola/
 F:	package/ptm2human/
@@ -1702,6 +1703,7 @@ F:	package/zynaddsubfx/
 F:	support/testing/tests/package/sample_python_distro.py
 F:	support/testing/tests/package/sample_python_gnupg.py
 F:	support/testing/tests/package/sample_python_pyalsa.py
+F:	support/testing/tests/package/test_highway.py
 F:	support/testing/tests/package/test_hwloc.py
 F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
diff --git a/package/Config.in b/package/Config.in
index 7b18859d02..c127cd2477 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2005,6 +2005,7 @@ menu "Other"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
 	source "package/gumbo-parser/Config.in"
+	source "package/highway/Config.in"
 	source "package/jemalloc/Config.in"
 	source "package/lapack/Config.in"
 	source "package/libabseil-cpp/Config.in"
diff --git a/package/highway/Config.in b/package/highway/Config.in
new file mode 100644
index 0000000000..f9a0bc910c
--- /dev/null
+++ b/package/highway/Config.in
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
+	bool
+	# Supports all BR architectures by default, with few exceptions
+	default y
+	# Armv7 support is only with fpv4, see:
+	# https://github.com/google/highway/blob/1.0.1/CMakeLists.txt#L221
+	depends on !BR2_arm || BR2_ARM_FPU_VFPV4
+	# Risc-V support is 64 bit only, see:
+	# https://github.com/google/highway/blob/1.0.1/CMakeLists.txt#L228
+	depends on !BR2_RISCV_32
+
+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
+	depends on BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
+	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
diff --git a/package/highway/highway.hash b/package/highway/highway.hash
new file mode 100644
index 0000000000..3ff468443e
--- /dev/null
+++ b/package/highway/highway.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  e8ef71236ac0d97f12d553ec1ffc5b6375d57b5f0b860c7447dd69b6ed1072db  highway-1.0.2.tar.gz
+sha256  43070e2d4e532684de521b885f385d0841030efa2b1a20bafb76133a5e1379c1  LICENSE
diff --git a/package/highway/highway.mk b/package/highway/highway.mk
new file mode 100644
index 0000000000..cf93ff1051
--- /dev/null
+++ b/package/highway/highway.mk
@@ -0,0 +1,51 @@
+################################################################################
+#
+# highway
+#
+################################################################################
+
+HIGHWAY_VERSION = 1.0.2
+HIGHWAY_SITE = $(call github,google,highway,$(HIGHWAY_VERSION))
+HIGHWAY_LICENSE = Apache-2.0
+HIGHWAY_LICENSE_FILES = LICENSE
+HIGHWAY_INSTALL_STAGING = YES
+
+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
+
+ifeq ($(BR2_PACKAGE_HIGHWAY_EXAMPLES),y)
+HIGHWAY_CONF_OPTS += -DHWY_ENABLE_EXAMPLES=ON
+HIGHWAY_POST_INSTALL_TARGET_HOOKS += HIGHWAY_INSTALL_EXAMPLES
+else
+HIGHWAY_CONF_OPTS += -DHWY_ENABLE_EXAMPLES=OFF
+endif
+
+ifeq ($(BR2_ARM_FPU_VFPV4),y)
+HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=ON
+else
+HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=OFF
+endif
+
+# Workaround for gcc bug 104028 on m68k.
+# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104028
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_104028),y)
+HIGHWAY_CXXFLAGS += -O0
+endif
+
+HIGHWAY_CONF_OPTS += \
+	-DCMAKE_CXX_FLAGS="$(HIGHWAY_CXXFLAGS)"
+
+$(eval $(cmake-package))
diff --git a/support/testing/tests/package/test_highway.py b/support/testing/tests/package/test_highway.py
new file mode 100644
index 0000000000..c85b0c065f
--- /dev/null
+++ b/support/testing/tests/package/test_highway.py
@@ -0,0 +1,36 @@
+import os
+
+import infra.basetest
+
+
+class TestHighway(infra.basetest.BRTest):
+    # infra.basetest.BASIC_TOOLCHAIN_CONFIG cannot be used as it is
+    # armv5, which is not supported by the package.
+    config = \
+        """
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.79"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+        BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_TARGET_ROOTFS_CPIO_GZIP=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        BR2_PACKAGE_HIGHWAY=y
+        BR2_PACKAGE_HIGHWAY_EXAMPLES=y
+        """
+
+    def test_run(self):
+        img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
+        kern = os.path.join(self.builddir, "images", "Image")
+        self.emulator.boot(arch="aarch64",
+                           kernel=kern,
+                           kernel_cmdline=["console=ttyAMA0"],
+                           options=["-M", "virt", "-cpu", "cortex-a57", "-m", "256M", "-initrd", img])
+        self.emulator.login()
+
+        self.assertRunOk("hwy_benchmark")
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH next 2/2] package/libjxl: new package
  2022-11-22 21:55 [Buildroot] [PATCH next 1/2] package/highway: new package Julien Olivain
@ 2022-11-22 21:59 ` Julien Olivain
  2022-11-23 14:37   ` Thomas Petazzoni via buildroot
  2022-11-23 14:17 ` [Buildroot] [PATCH next 1/2] package/highway: " Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 6+ messages in thread
From: Julien Olivain @ 2022-11-22 21:59 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

libjxl is the reference implementation of JPEG XL (encoder and decoder).

https://github.com/libjxl/libjxl

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                   |  2 +
 package/Config.in                            |  1 +
 package/libjxl/Config.in                     | 14 ++++++
 package/libjxl/libjxl.hash                   |  4 ++
 package/libjxl/libjxl.mk                     | 29 +++++++++++
 support/testing/tests/package/test_libjxl.py | 53 ++++++++++++++++++++
 6 files changed, 103 insertions(+)
 create mode 100644 package/libjxl/Config.in
 create mode 100644 package/libjxl/libjxl.hash
 create mode 100644 package/libjxl/libjxl.mk
 create mode 100644 support/testing/tests/package/test_libjxl.py

diff --git a/DEVELOPERS b/DEVELOPERS
index fefb40c605..99c274851d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1690,6 +1690,7 @@ F:	package/fluid-soundfont/
 F:	package/fluidsynth/
 F:	package/glslsandbox-player/
 F:	package/highway/
+F:	package/libjxl/
 F:	package/octave/
 F:	package/ola/
 F:	package/ptm2human/
@@ -1705,6 +1706,7 @@ F:	support/testing/tests/package/sample_python_gnupg.py
 F:	support/testing/tests/package/sample_python_pyalsa.py
 F:	support/testing/tests/package/test_highway.py
 F:	support/testing/tests/package/test_hwloc.py
+F:	support/testing/tests/package/test_libjxl.py
 F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
 F:	support/testing/tests/package/test_ola/
diff --git a/package/Config.in b/package/Config.in
index c127cd2477..db8177a5ba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1575,6 +1575,7 @@ menu "Graphics"
 	source "package/libgta/Config.in"
 	source "package/libgtk2/Config.in"
 	source "package/libgtk3/Config.in"
+	source "package/libjxl/Config.in"
 	source "package/libmediaart/Config.in"
 	source "package/libmng/Config.in"
 	source "package/libpng/Config.in"
diff --git a/package/libjxl/Config.in b/package/libjxl/Config.in
new file mode 100644
index 0000000000..456305083c
--- /dev/null
+++ b/package/libjxl/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LIBJXL
+	bool "libjxl"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # highway
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC # highway
+	depends on BR2_INSTALL_LIBSTDCPP # highway
+	depends on BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
+	select BR2_PACKAGE_BROTLI
+	select BR2_PACKAGE_HIGHWAY
+	select BR2_PACKAGE_LCMS2
+	help
+	  libjxl is the reference implementation of JPEG XL (encoder
+	  and decoder).
+
+	  https://github.com/libjxl/libjxl
diff --git a/package/libjxl/libjxl.hash b/package/libjxl/libjxl.hash
new file mode 100644
index 0000000000..e71d32e61d
--- /dev/null
+++ b/package/libjxl/libjxl.hash
@@ -0,0 +1,4 @@
+# Locally computed:
+sha256  3114bba1fabb36f6f4adc2632717209aa6f84077bc4e93b420e0d63fa0455c5e  libjxl-0.7.0.tar.gz
+sha256  8405932022a556380c2d8c272eff154a923feb197233f348ce5f7334fb0a5ede  LICENSE
+sha256  91915f8ae056a68a3c5bdf05d9f6f78bb6903e27a8ca3a8434c9e4ac87300575  PATENTS
diff --git a/package/libjxl/libjxl.mk b/package/libjxl/libjxl.mk
new file mode 100644
index 0000000000..778f436268
--- /dev/null
+++ b/package/libjxl/libjxl.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# libjxl
+#
+################################################################################
+
+LIBJXL_VERSION = 0.7.0
+LIBJXL_SITE = $(call github,libjxl,libjxl,v$(LIBJXL_VERSION))
+LIBJXL_LICENSE = BSD-3-Clause
+LIBJXL_LICENSE_FILES = LICENSE PATENTS
+LIBJXL_CPE_ID_VENDOR = libjxl_project
+LIBJXL_INSTALL_STAGING = YES
+
+LIBJXL_DEPENDENCIES = \
+	brotli \
+	lcms2 \
+	highway
+
+LIBJXL_CONF_OPTS = \
+	-DJPEGXL_BUNDLE_LIBPNG=OFF \
+	-DJPEGXL_BUNDLE_SKCMS=OFF \
+	-DJPEGXL_ENABLE_DOXYGEN=OFF \
+	-DJPEGXL_ENABLE_JNI=OFF \
+	-DJPEGXL_ENABLE_MANPAGES=OFF \
+	-DJPEGXL_ENABLE_OPENEXR=OFF \
+	-DJPEGXL_ENABLE_SJPEG=OFF \
+	-DJPEGXL_ENABLE_SKCMS=OFF
+
+$(eval $(cmake-package))
diff --git a/support/testing/tests/package/test_libjxl.py b/support/testing/tests/package/test_libjxl.py
new file mode 100644
index 0000000000..a98966569f
--- /dev/null
+++ b/support/testing/tests/package/test_libjxl.py
@@ -0,0 +1,53 @@
+import os
+
+import infra.basetest
+
+
+class TestLibJXL(infra.basetest.BRTest):
+    # infra.basetest.BASIC_TOOLCHAIN_CONFIG cannot be used as it is
+    # armv5, which is not supported by the package.
+    # We also add GraphicsMagick to generate and compare images for
+    # the test.
+    config = \
+        """
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.79"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+        BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_TARGET_ROOTFS_CPIO_GZIP=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        BR2_PACKAGE_GRAPHICSMAGICK=y
+        BR2_PACKAGE_LIBJXL=y
+        """
+
+    def test_run(self):
+        img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
+        kern = os.path.join(self.builddir, "images", "Image")
+        self.emulator.boot(arch="aarch64",
+                           kernel=kern,
+                           kernel_cmdline=["console=ttyAMA0"],
+                           options=["-M", "virt", "-cpu", "cortex-a57", "-m", "256M", "-initrd", img])
+        self.emulator.login()
+
+        ref = "/var/tmp/reference.ppm"
+        jxl = "/var/tmp/encoded.jxl"
+        dec = "/var/tmp/decoded.ppm"
+
+        cmd = "gm convert IMAGE:LOGO {}".format(ref)
+        self.assertRunOk(cmd)
+
+        cmd = "cjxl {} {}".format(ref, jxl)
+        self.assertRunOk(cmd, timeout=30)
+
+        cmd = "djxl {} {}".format(jxl, dec)
+        self.assertRunOk(cmd)
+
+        cmd = "gm compare -metric mse -maximum-error 1e-3 {} {}".format(
+            ref, dec)
+        self.assertRunOk(cmd)
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH next 1/2] package/highway: new package
  2022-11-22 21:55 [Buildroot] [PATCH next 1/2] package/highway: new package Julien Olivain
  2022-11-22 21:59 ` [Buildroot] [PATCH next 2/2] package/libjxl: " Julien Olivain
@ 2022-11-23 14:17 ` Thomas Petazzoni via buildroot
  2022-11-24 20:59   ` Julien Olivain
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-23 14:17 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

On Tue, 22 Nov 2022 22:55:56 +0100
Julien Olivain <ju.o@free.fr> wrote:

> diff --git a/package/highway/Config.in b/package/highway/Config.in
> new file mode 100644
> index 0000000000..f9a0bc910c
> --- /dev/null
> +++ b/package/highway/Config.in
> @@ -0,0 +1,42 @@
> +config BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
> +	bool
> +	# Supports all BR architectures by default, with few exceptions
> +	default y
> +	# Armv7 support is only with fpv4, see:
> +	# https://github.com/google/highway/blob/1.0.1/CMakeLists.txt#L221
> +	depends on !BR2_arm || BR2_ARM_FPU_VFPV4

Hm, I suppose if it works on other weird architectures, it must have a
non-optimized version, that could work on ARM platforms that do not
have a VFPv4 ?

> +ifeq ($(BR2_ARM_FPU_VFPV4),y)
> +HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=ON
> +else
> +HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=OFF
> +endif

So even with -DHWY_CMAKE_ARM7=OFF, it doesn't work for ARMv5, or ARMv7
without VFPv4 ?

> diff --git a/support/testing/tests/package/test_highway.py b/support/testing/tests/package/test_highway.py

Runtime tests coming together with the new package: excellent!

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH next 2/2] package/libjxl: new package
  2022-11-22 21:59 ` [Buildroot] [PATCH next 2/2] package/libjxl: " Julien Olivain
@ 2022-11-23 14:37   ` Thomas Petazzoni via buildroot
  2022-11-24 21:03     ` Julien Olivain
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-23 14:37 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

On Tue, 22 Nov 2022 22:59:12 +0100
Julien Olivain <ju.o@free.fr> wrote:

> diff --git a/package/libjxl/Config.in b/package/libjxl/Config.in
> new file mode 100644
> index 0000000000..456305083c
> --- /dev/null
> +++ b/package/libjxl/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_LIBJXL
> +	bool "libjxl"
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # highway
> +	depends on BR2_TOOLCHAIN_HAS_ATOMIC # highway
> +	depends on BR2_INSTALL_LIBSTDCPP # highway
> +	depends on BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
> +	select BR2_PACKAGE_BROTLI
> +	select BR2_PACKAGE_HIGHWAY
> +	select BR2_PACKAGE_LCMS2
> +	help
> +	  libjxl is the reference implementation of JPEG XL (encoder
> +	  and decoder).
> +
> +	  https://github.com/libjxl/libjxl

Missing:

comment "libjxl needs a toolchain with C++, gcc >= 7"
	depends on ...


> +LIBJXL_DEPENDENCIES = \
> +	brotli \
> +	lcms2 \
> +	highway
> +
> +LIBJXL_CONF_OPTS = \
> +	-DJPEGXL_BUNDLE_LIBPNG=OFF \

So which libpng gets used? None?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH next 1/2] package/highway: new package
  2022-11-23 14:17 ` [Buildroot] [PATCH next 1/2] package/highway: " Thomas Petazzoni via buildroot
@ 2022-11-24 20:59   ` Julien Olivain
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Olivain @ 2022-11-24 20:59 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,

On 23/11/2022 15:17, Thomas Petazzoni wrote:
> Hello Julien,
> 
> On Tue, 22 Nov 2022 22:55:56 +0100
> Julien Olivain <ju.o@free.fr> wrote:
> 
>> diff --git a/package/highway/Config.in b/package/highway/Config.in
>> new file mode 100644
>> index 0000000000..f9a0bc910c
>> --- /dev/null
>> +++ b/package/highway/Config.in
>> @@ -0,0 +1,42 @@
>> +config BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
>> +	bool
>> +	# Supports all BR architectures by default, with few exceptions
>> +	default y
>> +	# Armv7 support is only with fpv4, see:
>> +	# https://github.com/google/highway/blob/1.0.1/CMakeLists.txt#L221
>> +	depends on !BR2_arm || BR2_ARM_FPU_VFPV4
> 
> Hm, I suppose if it works on other weird architectures, it must have a
> non-optimized version, that could work on ARM platforms that do not
> have a VFPv4 ?

You are right! There is apparently an issue in the package on
detection of arm without VFPv4. I initially wrote this package recipe
for highway-1.0.1. I then updated it to 1.0.2 which seems to have
relaxed some restrictions (incl. RISC-V 32bit). I'll investigate how
those limitations can be removed and send an updated version of this
patch.

>> +ifeq ($(BR2_ARM_FPU_VFPV4),y)
>> +HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=ON
>> +else
>> +HIGHWAY_CONF_OPTS += -DHWY_CMAKE_ARM7=OFF
>> +endif
> 
> So even with -DHWY_CMAKE_ARM7=OFF, it doesn't work for ARMv5, or ARMv7
> without VFPv4 ?
> 
>> diff --git a/support/testing/tests/package/test_highway.py 
>> b/support/testing/tests/package/test_highway.py
> 
> Runtime tests coming together with the new package: excellent!

Yes, this test infra is fun! If I manage to remove the arch
limitations discussed above, I'll also rewrite this test to use the
default armv5 config...

> Thomas

Thanks for the review!
Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH next 2/2] package/libjxl: new package
  2022-11-23 14:37   ` Thomas Petazzoni via buildroot
@ 2022-11-24 21:03     ` Julien Olivain
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Olivain @ 2022-11-24 21:03 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,

On 23/11/2022 15:37, Thomas Petazzoni wrote:
> Hello Julien,
> 
> On Tue, 22 Nov 2022 22:59:12 +0100
> Julien Olivain <ju.o@free.fr> wrote:
> 
>> diff --git a/package/libjxl/Config.in b/package/libjxl/Config.in
>> new file mode 100644
>> index 0000000000..456305083c
>> --- /dev/null
>> +++ b/package/libjxl/Config.in
>> @@ -0,0 +1,14 @@
>> +config BR2_PACKAGE_LIBJXL
>> +	bool "libjxl"
>> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # highway
>> +	depends on BR2_TOOLCHAIN_HAS_ATOMIC # highway
>> +	depends on BR2_INSTALL_LIBSTDCPP # highway
>> +	depends on BR2_PACKAGE_HIGHWAY_ARCH_SUPPORTS
>> +	select BR2_PACKAGE_BROTLI
>> +	select BR2_PACKAGE_HIGHWAY
>> +	select BR2_PACKAGE_LCMS2
>> +	help
>> +	  libjxl is the reference implementation of JPEG XL (encoder
>> +	  and decoder).
>> +
>> +	  https://github.com/libjxl/libjxl
> 
> Missing:
> 
> comment "libjxl needs a toolchain with C++, gcc >= 7"
> 	depends on ...

Thanks!  I'll add it and send an updated version of the patch.

>> +LIBJXL_DEPENDENCIES = \
>> +	brotli \
>> +	lcms2 \
>> +	highway
>> +
>> +LIBJXL_CONF_OPTS = \
>> +	-DJPEGXL_BUNDLE_LIBPNG=OFF \
> 
> So which libpng gets used? None?

libpng is in fact an optional dependency. This means if libpng is
enabled in Buildroot, it will be used. Otherwise, if not present,
no version will be used. It is indeed missing here and need to be
added only if BR2_PACKAGE_LIBPNG=y. I'll add it in the
updated version of the patch.

> Thanks!
> 
> Thomas

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-24 21:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 21:55 [Buildroot] [PATCH next 1/2] package/highway: new package Julien Olivain
2022-11-22 21:59 ` [Buildroot] [PATCH next 2/2] package/libjxl: " Julien Olivain
2022-11-23 14:37   ` Thomas Petazzoni via buildroot
2022-11-24 21:03     ` Julien Olivain
2022-11-23 14:17 ` [Buildroot] [PATCH next 1/2] package/highway: " Thomas Petazzoni via buildroot
2022-11-24 20:59   ` Julien Olivain

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.