From owner-dev-commits-ports-all@freebsd.org Thu Sep 30 15:50:50 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 BA8A96B39EF; Thu, 30 Sep 2021 15:50:50 +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 4HKyQ24t40z3wNS; Thu, 30 Sep 2021 15:50:50 +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 878C06641; Thu, 30 Sep 2021 15:50:50 +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 18UFooMd096476; Thu, 30 Sep 2021 15:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18UFoo8j096475; Thu, 30 Sep 2021 15:50:50 GMT (envelope-from git) Date: Thu, 30 Sep 2021 15:50:50 GMT Message-Id: <202109301550.18UFoo8j096475@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: fc75da3a3b2a - main - graphics/libjxl: fix build on powerpc64* 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: fc75da3a3b2adf1148010fe1f3cd75528387bdcc 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 15:50:50 -0000 The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=fc75da3a3b2adf1148010fe1f3cd75528387bdcc commit fc75da3a3b2adf1148010fe1f3cd75528387bdcc Author: Piotr Kubaj AuthorDate: 2021-09-30 15:48:31 +0000 Commit: Piotr Kubaj CommitDate: 2021-09-30 15:48:31 +0000 graphics/libjxl: fix build on powerpc64* Add FreeBSD variants for linux code. The include in cpu.cc is not actually necessary, so I did not include anything for FreeBSD. --- ...patch-third__party_highway_hwy_nanobenchmark.cc | 30 ++++++++++++++++++++++ graphics/libjxl/files/patch-tools_cpu_cpu.cc | 13 ++++++++++ 2 files changed, 43 insertions(+) diff --git a/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc b/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc new file mode 100644 index 000000000000..a4dcea0f17e3 --- /dev/null +++ b/graphics/libjxl/files/patch-third__party_highway_hwy_nanobenchmark.cc @@ -0,0 +1,30 @@ +--- third_party/highway/hwy/nanobenchmark.cc.orig 2021-09-30 15:38:30 UTC ++++ third_party/highway/hwy/nanobenchmark.cc +@@ -47,7 +47,12 @@ + + #include "hwy/base.h" + #if HWY_ARCH_PPC ++#if linux + #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() { + + double InvariantTicksPerSecond() { + #if HWY_ARCH_PPC ++#if linux + 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(); diff --git a/graphics/libjxl/files/patch-tools_cpu_cpu.cc b/graphics/libjxl/files/patch-tools_cpu_cpu.cc new file mode 100644 index 000000000000..6a50f6aa0951 --- /dev/null +++ b/graphics/libjxl/files/patch-tools_cpu_cpu.cc @@ -0,0 +1,13 @@ +--- tools/cpu/cpu.cc.orig 2021-09-30 15:38:45 UTC ++++ tools/cpu/cpu.cc +@@ -19,7 +19,9 @@ + #endif + + #if JXL_ARCH_PPC +-#include // __ppc_get_timebase_freq ++#if linux ++#include // NOLINT __ppc_get_timebase_freq ++#endif + #endif + + #if JXL_ARCH_ARM