From nobody Sun Feb 5 14:53:21 2023 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 4P8spB01Cpz3ncjG; Sun, 5 Feb 2023 14:53:22 +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 4P8sp96WPqz40xG; Sun, 5 Feb 2023 14:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675608801; 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=xoDhiv/plwyQtJR03btIyxLnbKbbpkGuMGi/ppG9aDg=; b=eIqBRZztiQQfDfRrytvnjz0xyvJYv1587CmVlObsLSALShk9YB3qGDgcZvB7pPmJK/VD+n 6upoOamXCRtP2ClcZLw9ROpJbhWGB5fijd3ZimYN6OYLU/GQrdauADmGXtOqmlJOrGKsAF lyYP5y9yf7C2J5RFkDnnnZ8DhqbNmDBNcAXYcpRE8kvHZesp2tFXwIy+jAXaWSH7tgfkR0 j8mXcxAiXYajwv2DmpCymwcn09Zfkmepy/0SSNiESHG/ceYkHhC2QxsCY1KldeB3GX+4Aj /pk+V2OqVGzsymneGQx1f1vu1i/b8ske+boYV9Oqdh2pl7QkJKJowLgFP+QyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675608801; 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=xoDhiv/plwyQtJR03btIyxLnbKbbpkGuMGi/ppG9aDg=; b=fP1/EDkzTj29hYyM7mR9KrSQ2amGYtBYnTgPvvRrmyFSI30JGYax40Tq+akw2nGOSScobJ hgZ0xfexxH58A49zcVriEdAEaZ0oL0TNUcGal/b9xfSZB+krrLp5ayeUo3QIY1NgHH3VXZ CSuXbp//y1IR1Gx7th+YYgAQnqzOt9gHShHNTlyeIy4QQuQPnhyKUvr/1IfHB+QO1lDEX+ bV88Sm1AuVvfN+4baAXdZNBKCGDiArOf3/YjuJgluUiHGzD0oHXWhLeHvxjXDN1fjp5qSm HFwXsNiTUA4CoO9r/jWerv2IJ4LYyZCRp8Er7IqdKzNgWjqTelgQS5lFoaY9oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675608801; a=rsa-sha256; cv=none; b=GQMs3My/k78lyX2k+AGqr3S0Dz3Cs3kqzDVpD/c10XhH/nQ5HCsClvN/z/T5+6swq1HNqO gdBQc2jfUsYD078aecWzwc4GcISHu+NbmzAPRTROVRlWUZ057avzaXmbISvsSKBvQ+pBjR uN0AStVE/iYEf5IWHaTfiYd9VW+Y4cqnyCWdS6LU1iTnsnqUR6va9/AZO/L73r+O1AmWvy 20P2dl/XNwTRS8MLhVEdIjOABAIwTliEke0IIBujsJzb1eRREJ86Nu3r4VmcORrSiaPrqI WeQpvrHCZ/RY8/vyEaghxWyHH6NNHMNvMDZIVfN+xVPbj9GnJ5y/jMhDSCC9EA== 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 4P8sp95ZJnzy9d; Sun, 5 Feb 2023 14:53:21 +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 315ErL4a038396; Sun, 5 Feb 2023 14:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 315ErLrP038395; Sun, 5 Feb 2023 14:53:21 GMT (envelope-from git) Date: Sun, 5 Feb 2023 14:53:21 GMT Message-Id: <202302051453.315ErLrP038395@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Nuno Teixeira Subject: git: 5d9b2ceee161 - 2023Q1 - security/gostsum: Fix build on armv7 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: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q1 X-Git-Reftype: branch X-Git-Commit: 5d9b2ceee1615c045bf9ddf9a515d925b2206cd2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2023Q1 has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d9b2ceee1615c045bf9ddf9a515d925b2206cd2 commit 5d9b2ceee1615c045bf9ddf9a515d925b2206cd2 Author: Robert Clausecker AuthorDate: 2023-02-05 14:48:18 +0000 Commit: Nuno Teixeira CommitDate: 2023-02-05 14:51:57 +0000 security/gostsum: Fix build on armv7 The build is fixed by adding some missing bits of assembly code. Add some more assembly code for arm64 for good measure. While we are at it, fix a warning due to a missing include file. PR: 269267 Approved by: portmgr blanket MFH: 2023Q1 (build fixes) (cherry picked from commit 154cb0fbb0b42ccbbf26a17dd9a2c43ed268cf06) --- security/gostsum/Makefile | 1 + security/gostsum/files/patch-gosthash.c | 68 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/security/gostsum/Makefile b/security/gostsum/Makefile index 5d14ce027b94..1bf5776c9de2 100644 --- a/security/gostsum/Makefile +++ b/security/gostsum/Makefile @@ -1,5 +1,6 @@ PORTNAME= gostsum PORTVERSION= 20221213 +PORTREVISION= 1 CATEGORIES= security MAINTAINER= rozhuk.im@gmail.com diff --git a/security/gostsum/files/patch-gosthash.c b/security/gostsum/files/patch-gosthash.c new file mode 100644 index 000000000000..211dab17ad28 --- /dev/null +++ b/security/gostsum/files/patch-gosthash.c @@ -0,0 +1,68 @@ +--- gosthash.c.orig 2022-12-13 13:51:25 UTC ++++ gosthash.c +@@ -26,9 +26,8 @@ echo -n "8JaanTcVv6ndF8Xp/N011Lp46e68LjaUT9FhnEyQGs8=" + #if defined(__sun__) || defined(__linux__) || defined(__FreeBSD__) + #define _aligned_malloc(size, align) memalign(align, size) + #define _aligned_free(ptr) free(ptr) +-#else +-#include + #endif // __sun__ __linux__ __FreeBSD__ ++#include + + typedef char v16qi __attribute__((__vector_size__(16))); + //typedef uint8_t v4qi __attribute__((__vector_size__(4))); +@@ -141,7 +140,53 @@ static inline void XOR(v256 *x, const v256 *a) + x->q[1] ^= a->q[1]; + } + #if defined(__arm__) +-extern void UADD(v256 *a, v256 *b); ++static inline ++void UADD(v256 *a, v256 *b) ++{ ++ __asm volatile ( ++ " ldmia %0, {r0, r1, r2, r3}\n" ++ " ldmia %1!, {r4, r5, r6, r7}\n" ++ " adds r0, r0, r4\n" ++ " adcs r1, r1, r5\n" ++ " adcs r2, r2, r6\n" ++ " adcs r3, r3, r7\n" ++ " stmia %0!, {r0, r1, r2, r3}\n" ++ ++ " ldmia %0, {r0, r1, r2, r3}\n" ++ " ldmia %1!, {r4, r5, r6, r7}\n" ++ " adcs r0, r0, r4\n" ++ " adcs r1, r1, r5\n" ++ " adcs r2, r2, r6\n" ++ " adcs r3, r3, r7\n" ++ " stmia %0!, {r0, r1, r2, r3}\n" ++ ++ " sub %0, %0, #64\n" ++ " sub %1, %1, #64\n" ++ ++ :: "r"(a), "r"(b) : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "memory"); ++} ++#elif defined(__aarch64__) ++static inline ++void UADD(v256 *a, v256 *b) ++{ ++ uint64_t a0, a1, b0, b1; ++ ++ __asm volatile ( ++ " ldp %0, %1, [%4, #0]\n" ++ " ldp %2, %3, [%5, #0]\n" ++ " adds %0, %0, %2\n" ++ " adcs %1, %1, %3\n" ++ " stp %0, %1, [%4, #0]\n" ++ ++ " ldp %0, %1, [%4, #16]\n" ++ " ldp %2, %3, [%5, #16]\n" ++ " adcs %0, %0, %2\n" ++ " adcs %1, %1, %3\n" ++ " stp %0, %1, [%4, #16]\n" ++ ++ : "=r"(a0), "=r"(a1), "=r"(b0), "=r"(b1) ++ : "r"(a), "r"(b) : "memory"); ++} + + #elif defined(__x86_64__)//0 + static inline