From nobody Tue Dec 06 03:51:54 2022 X-Original-To: dev-commits-ports-all@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 4NR6172GgYz4jbW1; Tue, 6 Dec 2022 03:51:55 +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 4NR6170WPXz3Jln; Tue, 6 Dec 2022 03:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670298715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVKQgQcSEKhRAYe3Tzu6RCPbThWHfDajtA9lfPW5Occ=; b=I0IMKzGed4RG4VmgJVH4Nsy+A5Vx/8mMcAkSYICoYhvYUFsLFTCbhYaE98Oo0Y/y8xUvBE RTuAglv/o/Ixz3XRizMLX2HuUhBuWY7Aci8A8HcLufWjfAoYL4pJxPMjxzBEgVT7xF5myu PKAnNNgCUsHnXRedtBu2KbD23tG1p9W96vD5xfYaSOX2hatX5tWtJRdVlPReJDwFuv8Dwr xdlm1CAXGOEh0osaJMrx+mdc8m8zJtk1wmrxldRssLqE2olM99vIgWfJoNY+wD7/HWIlr9 fXAxMhvFrOS6geApMPERMa6NUZr7UroTGHED1G42uaCDVsIk99jnu65NEx7wbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670298715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVKQgQcSEKhRAYe3Tzu6RCPbThWHfDajtA9lfPW5Occ=; b=Lgbl8Q2D74Ngd5M6JENlmp3Rw/4iv+G+7rA+3PTE7p9y/YQG4q4TdZFNL+h0G+GrVcUCtx 896Lzc5NUmUBMmxDND1aCZQvYN0urJMjcRBvrd0NXUc9yKpfZ5XnbppTcZWVEOlDJkhr2s EtYjoICJELcrpAWHuR70IMzAFow657QnabCzZKYv+GUCY+s1vXNolvo2bMwo2Aq+EmpK58 /gwFuPJRiiclUA/z7KkVijxVuSEjpxP/ELHp6KGwhGgF9b6IxBl5GQl+DxSgez/5x9q8QM 2fKW/LzcgXf5rPX1kT4teLEUwrLw106mPshI72UeMBeKgkg/cfff6msvTMArCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670298715; a=rsa-sha256; cv=none; b=ILEa+b12InjoP/n47G8x7e5JwoFBzVFHp6dSTbIQgi7idPYu+FTizr4RQr9SXZdAod2JtM JvXUhdc1ZDzayOo4bcu2STiE6Af7neLFtyLEVdpBG1j0RPu34Q4k1om57neMS8z2+uPezu 93hzOHFbn2tErJj1S4W8/860Un72szXrVS3rmk05fKZbT7QxLNkT/HMOZZw4aVEzmGnI6q uyhh0Wb8vcX+6I07wyjUpknnXU9SJdGnVLe/H1ZqnZB01wQhtAMjRBbQJt9eoXd/b6iPSY AeGUzL1TO5eF1HJHNoVH+ZvloIlnU5TbwDnaSFf5TLSnfG61inCqkCsFAAUK1g== 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 4NR6166lPtzNfH; Tue, 6 Dec 2022 03:51:54 +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 2B63psxg006466; Tue, 6 Dec 2022 03:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B63pswW006465; Tue, 6 Dec 2022 03:51:54 GMT (envelope-from git) Date: Tue, 6 Dec 2022 03:51:54 GMT Message-Id: <202212060351.2B63pswW006465@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: e60e29c80af8 - main - security/openfhe: fix build on powerpc* List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: e60e29c80af8ea6900cb04fb206f41639be0ea22 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=e60e29c80af8ea6900cb04fb206f41639be0ea22 commit e60e29c80af8ea6900cb04fb206f41639be0ea22 Author: Piotr Kubaj AuthorDate: 2022-12-06 03:51:51 +0000 Commit: Piotr Kubaj CommitDate: 2022-12-06 03:51:51 +0000 security/openfhe: fix build on powerpc* Same patch as for security/palisade. --- ...tch-src_core_include_math_hal_intnat_ubintnat.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h b/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h new file mode 100644 index 000000000000..80ef4c33431c --- /dev/null +++ b/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h @@ -0,0 +1,26 @@ +--- src/core/include/math/hal/intnat/ubintnat.h.orig 2022-12-06 03:29:13 UTC ++++ src/core/include/math/hal/intnat/ubintnat.h +@@ -2152,17 +2152,17 @@ class NativeIntegerT : public lbcrypto::BigIntegerInte + res.lo = x.lo * y; + asm("umulh %0, %1, %2\n\t" : "=r"(res.hi) : "r"(x.lo), "r"(y)); + res.hi += x.hi * y; +-#elif defined(__arm__) // 32 bit processor ++#elif defined(__powerpc64__) || defined(__riscv) ++ U128BITS wres(0), wa(a), wb(b); ++ wres = wa * wb; // should give us 128 bits of 64 * 64 ++ res.hi = (uint64_t)(wres >> 64); ++ res.lo = (uint64_t)wres; ++#elif defined(__arm__) || defined(__powerpc__) // 32 bit processor + uint64_t wres(0), wa(a), wb(b); + + wres = wa * wb; // should give us the lower 64 bits of 32*32 + res.hi = wres >> 32; + res.lo = (uint32_t)wres & 0xFFFFFFFF; +-#elif __riscv +- U128BITS wres(0), wa(a), wb(b); +- wres = wa * wb; // should give us 128 bits of 64 * 64 +- res.hi = (uint64_t)(wres >> 64); +- res.lo = (uint64_t)wres; + #elif defined(__EMSCRIPTEN__) // web assembly + U64BITS a1 = a >> 32; + U64BITS a2 = (uint32_t)a;