From nobody Thu Oct 07 17:56:19 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5FC5D12D7DF7; Thu, 7 Oct 2021 17:56:21 +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 4HQJsc53mjz4X3W; Thu, 7 Oct 2021 17:56:20 +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 1DF2C17F4A; Thu, 7 Oct 2021 17:56:20 +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 197HuJUA020689; Thu, 7 Oct 2021 17:56:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 197HuJmI020688; Thu, 7 Oct 2021 17:56:19 GMT (envelope-from git) Date: Thu, 7 Oct 2021 17:56:19 GMT Message-Id: <202110071756.197HuJmI020688@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: 710a2e223065 - main - databases/mariadb103-client: fix build on powerpc64le List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org 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: 710a2e223065367033170db5a4012d7748807aba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=710a2e223065367033170db5a4012d7748807aba commit 710a2e223065367033170db5a4012d7748807aba Author: Piotr Kubaj AuthorDate: 2021-10-07 17:53:58 +0000 Commit: Piotr Kubaj CommitDate: 2021-10-07 17:53:58 +0000 databases/mariadb103-client: fix build on powerpc64le Same patch as for mariadb104 and mariadb105. --- .../files/patch-include_my__cpu.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/databases/mariadb103-client/files/patch-include_my__cpu.h b/databases/mariadb103-client/files/patch-include_my__cpu.h new file mode 100644 index 000000000000..36a374bb7cc6 --- /dev/null +++ b/databases/mariadb103-client/files/patch-include_my__cpu.h @@ -0,0 +1,48 @@ +--- include/my_cpu.h.orig 2021-08-02 10:58:56 UTC ++++ include/my_cpu.h +@@ -23,7 +23,8 @@ + The defines are the same ones used by the linux kernel + */ + +-#ifdef _ARCH_PWR8 ++#if defined(_ARCH_PWR8) ++#if defined(linux) + #include + /* Very low priority */ + #define HMT_very_low() __ppc_set_ppr_very_low() +@@ -37,6 +38,22 @@ + #define HMT_medium_high() __ppc_set_ppr_med_high() + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") ++#elif defined(__FreeBSD__) ++#include ++#include ++/* Very low priority */ ++#define HMT_very_low() __asm__ volatile ("or 31,31,31") ++/* Low priority */ ++#define HMT_low() __asm__ volatile ("or 1,1,1") ++/* Medium low priority */ ++#define HMT_medium_low() __asm__ volatile ("or 6,6,6") ++/* Medium priority */ ++#define HMT_medium() __asm__ volatile ("or 2,2,2") ++/* Medium high priority */ ++#define HMT_medium_high() __asm__ volatile ("or 5,5,5") ++/* High priority */ ++#define HMT_high() asm volatile("or 3,3,3") ++#endif + #else + #define HMT_very_low() + #define HMT_low() +@@ -72,7 +89,12 @@ static inline void MY_RELAX_CPU(void) + __asm__ __volatile__ ("pause"); + #endif + #elif defined(_ARCH_PWR8) ++#if defined(linux) + __ppc_get_timebase(); ++#elif defined(__FreeBSD__) ++ uint64_t __tb; ++ __asm__ volatile ("mfspr %0, 268" : "=r" (__tb)); ++#endif + #else + int32 var, oldval = 0; + my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,