Skip to content

Commit

Permalink
RISCV64 build fixes: update highway and libjxl
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
clopez committed Jun 7, 2023
1 parent f72ca42 commit 18e5909
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion recipes-extended/highway/highway.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Upstream-Status: Backport [22d12d74e7bc56b09cfb1973aa89ec8d714fa3fc]
From: Eastdong <[email protected]>
Date: Thu, 23 Feb 2023 06:08:36 +0800
Subject: [PATCH] Add missing <atomic> content to fix gcc compilation for RISCV
architecture. (#2211)

* Add missing <atomic> content to fix gcc compilation for RISCV architecture.

Co-authored-by: Moritz Firsching <[email protected]>
---
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 <algorithm>
+#include <atomic>
#include <cstdlib>

#undef HWY_TARGET_INCLUDE
--
2.30.2

16 changes: 8 additions & 8 deletions recipes-graphics/libjxl/libjxl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"
Expand Down
File renamed without changes.

0 comments on commit 18e5909

Please sign in to comment.