From 18e5909021ba6aa1b3e428719abac08ddcd74691 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Lopez Perez Date: Wed, 7 Jun 2023 00:53:35 +0200 Subject: [PATCH] RISCV64 build fixes: update highway and libjxl * libjxl: Update to the last stable version and backport a patch fixing the build for RISCV64. Also stop using bundled libraries completely and instead build against system libcms2 instead of skcms. That matches how Debian builds this library. * highway: Update to last stable version, which builds fine on RISCV64 --- recipes-extended/highway/highway.inc | 2 +- .../{highway_0.15.0.bb => highway_1.0.4.bb} | 0 ...scv-build-add-missing-atomic-include.patch | 28 +++++++++++++++++++ recipes-graphics/libjxl/libjxl.inc | 16 +++++------ .../{libjxl_0.6.1.bb => libjxl_0.8.1.bb} | 0 5 files changed, 37 insertions(+), 9 deletions(-) rename recipes-extended/highway/{highway_0.15.0.bb => highway_1.0.4.bb} (100%) create mode 100644 recipes-graphics/libjxl/files/fix-riscv-build-add-missing-atomic-include.patch rename recipes-graphics/libjxl/{libjxl_0.6.1.bb => libjxl_0.8.1.bb} (100%) diff --git a/recipes-extended/highway/highway.inc b/recipes-extended/highway/highway.inc index 4f42347e..174cbca4 100644 --- a/recipes-extended/highway/highway.inc +++ b/recipes-extended/highway/highway.inc @@ -5,7 +5,7 @@ BUGTRACKER = "https://github.com/google/highway/issues" S = "${WORKDIR}/git" SRC_URI = "git://github.com/google/highway.git;protocol=https;branch=master" -SRCREV = "e69083a12a05caf037cabecdf1b248b7579705a5" +SRCREV = "46e365d6770f5d7a4240d8ac9d8e928a520478ea" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=2b42edef8fa55315f34f2370b4715ca9" diff --git a/recipes-extended/highway/highway_0.15.0.bb b/recipes-extended/highway/highway_1.0.4.bb similarity index 100% rename from recipes-extended/highway/highway_0.15.0.bb rename to recipes-extended/highway/highway_1.0.4.bb diff --git a/recipes-graphics/libjxl/files/fix-riscv-build-add-missing-atomic-include.patch b/recipes-graphics/libjxl/files/fix-riscv-build-add-missing-atomic-include.patch new file mode 100644 index 00000000..16a81301 --- /dev/null +++ b/recipes-graphics/libjxl/files/fix-riscv-build-add-missing-atomic-include.patch @@ -0,0 +1,28 @@ +Upstream-Status: Backport [22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc] +From: Eastdong <31920925+IEAST@users.noreply.github.com> +Date: Thu, 23 Feb 2023 06:08:36 +0800 +Subject: [PATCH] Add missing content to fix gcc compilation for RISCV + architecture. (#2211) + +* Add missing content to fix gcc compilation for RISCV architecture. + +Co-authored-by: Moritz Firsching +--- + lib/jxl/enc_xyb.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc +index 1ef78877..2ee0abf8 100644 +--- a/lib/jxl/enc_xyb.cc ++++ b/lib/jxl/enc_xyb.cc +@@ -6,6 +6,7 @@ + #include "lib/jxl/enc_xyb.h" + + #include ++#include + #include + + #undef HWY_TARGET_INCLUDE +-- +2.30.2 + diff --git a/recipes-graphics/libjxl/libjxl.inc b/recipes-graphics/libjxl/libjxl.inc index 726e4894..ae969d85 100644 --- a/recipes-graphics/libjxl/libjxl.inc +++ b/recipes-graphics/libjxl/libjxl.inc @@ -6,14 +6,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" S = "${WORKDIR}/git" -SRC_URI = "git://github.com/libjxl/libjxl.git;branch=v0.6.x;protocol=https;rev=a205468bc5d3a353fb15dae2398a101dff52f2d3 \ - git://skia.googlesource.com/skcms;branch=main;protocol=https;rev=64374756e03700d649f897dbd98c95e78c30c7da;destsuffix=git/third_party/skcms \ - git://github.com/lvandeve/lodepng;branch=master;protocol=https;rev=8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a;destsuffix=git/third_party/lodepng \ -" +SRC_URI = "git://github.com/libjxl/libjxl.git;branch=v0.8.x;protocol=https;rev=c27d499263435ac77007174e0f1cf54557cff23a \ + file://fix-riscv-build-add-missing-atomic-include.patch " LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=6a905a337cc228a1f68f0b5416f52a7f" -DEPENDS = "brotli highway" +DEPENDS = "brotli highway libpng lcms" EXTRA_OECMAKE = " -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_FUZZERS=OFF \ @@ -30,13 +28,15 @@ EXTRA_OECMAKE = " -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_PROFILER=OFF \ -DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF \ -DJPEGXL_ENABLE_SJPEG=OFF \ + -DJPEGXL_ENABLE_SKCMS=OFF \ + -DJPEGXL_BUNDLE_LIBPNG=OFF \ -DJPEGXL_STATIC=OFF \ -DJPEGXL_WARNINGS_AS_ERRORS=OFF \ - -DJPEGXL_ENABLE_SKCMS=ON \ -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ -DJPEGXL_FORCE_SYSTEM_GTEST=ON \ - -DJPEGXL_FORCE_SYSTEM_HWY=ON" - + -DJPEGXL_FORCE_SYSTEM_HWY=ON \ + -DJPEGXL_FORCE_SYSTEM_LCMS2=ON \ +" inherit cmake pkgconfig CXXFLAGS:append:arm = " -mfp16-format=ieee" diff --git a/recipes-graphics/libjxl/libjxl_0.6.1.bb b/recipes-graphics/libjxl/libjxl_0.8.1.bb similarity index 100% rename from recipes-graphics/libjxl/libjxl_0.6.1.bb rename to recipes-graphics/libjxl/libjxl_0.8.1.bb