From owner-dev-commits-ports-all@freebsd.org Thu Sep 30 19:08:15 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4E806B688D; Thu, 30 Sep 2021 19:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HL2nq42Wgz4jYZ; Thu, 30 Sep 2021 19:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B2D511694; Thu, 30 Sep 2021 19:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18UJ8FJf053416; Thu, 30 Sep 2021 19:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18UJ8Ffa053414; Thu, 30 Sep 2021 19:08:15 GMT (envelope-from git) Date: Thu, 30 Sep 2021 19:08:15 GMT Message-Id: <202109301908.18UJ8Ffa053414@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 6280c5793ec5 - main - graphics/libjxl: use the upstream build fix from https://github.com/google/highway/commit/3769cb2c464c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6280c5793ec5d93b939844f8fc35fde21e8ffb9e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2021 19:08:15 -0000 The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=6280c5793ec5d93b939844f8fc35fde21e8ffb9e commit 6280c5793ec5d93b939844f8fc35fde21e8ffb9e Author: Piotr Kubaj AuthorDate: 2021-09-30 19:02:16 +0000 Commit: Piotr Kubaj CommitDate: 2021-09-30 19:02:16 +0000 graphics/libjxl: use the upstream build fix from https://github.com/google/highway/commit/3769cb2c464c While here, also remove the BROKEN_powerpc64 (I did not see it because I tested on powerpc64le previously). Reported by: jbeich --- graphics/libjxl/Makefile | 2 - ...patch-third__party_highway_hwy_nanobenchmark.cc | 46 +++++++++++++--------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/graphics/libjxl/Makefile b/graphics/libjxl/Makefile index 843bf74a3b54..8de3e64d4913 100644 --- a/graphics/libjxl/Makefile +++ b/graphics/libjxl/Makefile @@ -15,8 +15,6 @@ LICENSE_COMB= multi LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE LICENSE_FILE_ZLIB= ${WRKSRC}/third_party/lodepng/LICENSE -BROKEN_powerpc64= https://github.com/google/highway/issues/345 - LIB_DEPENDS= libbrotlienc.so:archivers/brotli TEST_DEPENDS= googletest>0:devel/googletest diff --git a/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc b/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc index a4dcea0f17e3..50e151fd7a30 100644 --- a/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc +++ b/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc @@ -1,30 +1,38 @@ ---- third_party/highway/hwy/nanobenchmark.cc.orig 2021-09-30 15:38:30 UTC +--- third_party/highway/hwy/nanobenchmark.cc.orig 2021-06-09 08:56:32 UTC +++ third_party/highway/hwy/nanobenchmark.cc -@@ -47,7 +47,12 @@ +@@ -46,7 +46,7 @@ + #endif #include "hwy/base.h" - #if HWY_ARCH_PPC -+#if linux +-#if HWY_ARCH_PPC ++#if HWY_ARCH_PPC && defined(__GLIBC__) #include // NOLINT __ppc_get_timebase_freq -+#elif __FreeBSD__ -+#include -+#include /* must come after sys/types.h */ -+#endif #elif HWY_ARCH_X86 - #if HWY_COMPILER_MSVC -@@ -400,7 +405,14 @@ double NominalClockRate() { +@@ -119,7 +119,7 @@ using Ticks = uint64_t; + // divide by InvariantTicksPerSecond. + inline Ticks Start() { + Ticks t; +-#if HWY_ARCH_PPC ++#if HWY_ARCH_PPC && defined(__GLIBC__) + asm volatile("mfspr %0, %1" : "=r"(t) : "i"(268)); + #elif HWY_ARCH_X86 && HWY_COMPILER_MSVC + _ReadWriteBarrier(); +@@ -161,7 +161,7 @@ inline Ticks Start() { + + inline Ticks Stop() { + uint64_t t; +-#if HWY_ARCH_PPC ++#if HWY_ARCH_PPC && defined(__GLIBC__) + asm volatile("mfspr %0, %1" : "=r"(t) : "i"(268)); + #elif HWY_ARCH_X86 && HWY_COMPILER_MSVC + _ReadWriteBarrier(); +@@ -399,7 +399,7 @@ double NominalClockRate() { + } // namespace double InvariantTicksPerSecond() { - #if HWY_ARCH_PPC -+#if linux +-#if HWY_ARCH_PPC ++#if HWY_ARCH_PPC && defined(__GLIBC__) return __ppc_get_timebase_freq(); -+#elif __FreeBSD__ -+ static double cycles_per_second = 0; -+ size_t length = sizeof(cycles_per_second); -+ sysctlbyname("kern.timecounter.tc.timebase.frequency", &cycles_per_second, -+ &length, NULL, 0); -+#endif #elif HWY_ARCH_X86 // We assume the TSC is invariant; it is on all recent Intel/AMD CPUs. - return NominalClockRate();