From nobody Fri Mar 25 08:24:52 2022 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 AF82F1A27A8F; Fri, 25 Mar 2022 08:24:52 +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 4KPwBD4WKBz3L0h; Fri, 25 Mar 2022 08:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648196692; 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=Odq2ds/X5guFyyi8Qgk8smKIWgiaIo72abA1aZK2e2g=; b=wnzwnDuE/wbIiybDY1cMMx0a2Mxfl4dSTPFU1HNPkHbzsWC77iQPBXGnIDyLpISJiX0dqq eEHMbYcY1Nq+7Tv1OJXSEdj0W3PxqddXDsxwSpO3etAw+AFDrJNj38YJxDLaqeUPkVO2Cf qVlI9vTeINIuGS7z6eA34VcMB0sCR87SxPMtoR6cH08Vcm0NKU32RAVICVMcfmNs92vo1h VGMiLQGEzLozq4TXskAdny8SEQyPq0SohOfn98mFZu72UdHoH1g+x2WeZAf4cW2RSyAp2V HQmI2EGE3W7VZh17Q7lK7bZtnvBRZVqXqIaFl7YSidVqIgGn0o+DMd5VhsJoKw== 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 7B361DA5; Fri, 25 Mar 2022 08:24:52 +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 22P8OqWF084609; Fri, 25 Mar 2022 08:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22P8OqvS084608; Fri, 25 Mar 2022 08:24:52 GMT (envelope-from git) Date: Fri, 25 Mar 2022 08:24:52 GMT Message-Id: <202203250824.22P8OqvS084608@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikael Urankar Subject: git: 9638af3be2e4 - main - security/hashcat: Fix build on aarch64 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: mikael X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9638af3be2e4c5c876f507a0e018a9be8d30b1e2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648196692; 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=Odq2ds/X5guFyyi8Qgk8smKIWgiaIo72abA1aZK2e2g=; b=mXQuj6aq7gFJUcSnNHXE+phCPKEjNFI9/np4PQkTsVOk30rk8jbos0iTDdBqsGp/SoMQzf bIxzf4IYfVyQB8qWv6NPSro/mNoewOuw22ggl+4L89Q+C9ml0L4Xc8OPoIWTZ2ZxgSugYh WHLW/JOZrILxJw7yGyYvYHu2+GrJx0P7pRmm48uLY6bAbnYZaD48aBw2II61aZ3cRtaf4b 6eHg0pUVr6h76WnnWz6m9YyqmxiqyQ1nuvVFnerNSG25Ti35gsYR6InuUG6+3Vwij01jSO 4lQ9PNu684utF0CToTlLsuk5d8mVDmHf+ZFWh9UUDbxZ9vlBgTPSBIltDtpCEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648196692; a=rsa-sha256; cv=none; b=dMis4XocCkBZz+Q9pf5FUw34C0gLEPjqRaaP6pr1xsE1vVIn1+dxqTMfRL42eCLWhwfjcG pItpgzEIJJlqByxJ8xQRX4ZaZWnnJLdQXcc9Es2cPEhLmWyef91l4v9TwFpYsxHhio0sI+ puyMffht4NFBYpGxDEdGMxuwsEZQRCS453iCliQ84Nkli98FBlcQctgmceMUUlTz9QafzK 43+e3iwX3T/4bMqc59OQVyPNYMCIhlLRPgIaEw8HW590DG1/so6aKXpZfKuWb5yb9p1dOz jlCO75HzCwOUz0ttacYyPRXDNWr3q+YzG5lPo5OZw5L5CRqssRw8tEHxyul+NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=9638af3be2e4c5c876f507a0e018a9be8d30b1e2 commit 9638af3be2e4c5c876f507a0e018a9be8d30b1e2 Author: Mikael Urankar AuthorDate: 2022-03-25 08:24:07 +0000 Commit: Mikael Urankar CommitDate: 2022-03-25 08:24:07 +0000 security/hashcat: Fix build on aarch64 Same fix as archivers/7-zip Approved by: portmgr (build fix blanket) --- security/hashcat/Makefile | 5 ++-- .../hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c | 34 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/security/hashcat/Makefile b/security/hashcat/Makefile index 7fc1e358d8e2..d545635c385d 100644 --- a/security/hashcat/Makefile +++ b/security/hashcat/Makefile @@ -11,9 +11,8 @@ COMMENT= Advanced CPU-based password recovery utility LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.txt -NOT_FOR_ARCHS= aarch64 powerpc powerpc64 powerpcspe sparc64 +NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe sparc64 NOT_FOR_ARCHS_REASON= fails to compile: compiling for big-endian architecture not supported -NOT_FOR_ARCHS_REASON_aarch64= fails to compile BUILD_DEPENDS= minizip:archivers/minizip @@ -40,6 +39,8 @@ BRAIN_DESC= Build Hashcat Brain BRAIN_MAKE_ARGS_OFF= ENABLE_BRAIN=0 BRAIN_CFLAGS= -DWITH_BRAIN -Ideps/git/xxHash +CFLAGS_aarch64+= -march=armv8-a+crc+crypto + pre-install: ${STRIP_CMD} ${WRKSRC}/libhashcat.so.${PORTVERSION} ${STRIP_CMD} ${WRKSRC}/modules/*.so diff --git a/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c b/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c new file mode 100644 index 000000000000..a788aaec3e8b --- /dev/null +++ b/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c @@ -0,0 +1,34 @@ +--- deps/LZMA-SDK/C/CpuArch.c.orig 2022-03-25 08:13:08 UTC ++++ deps/LZMA-SDK/C/CpuArch.c +@@ -384,6 +384,23 @@ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYP + + #include + ++#if defined(__FreeBSD__) ++static UInt64 get_hwcap() { ++ unsigned long hwcap; ++ if(elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)) != 0) { ++ return(0); ++ } ++ return hwcap; ++} ++ ++BoolInt CPU_IsSupported_CRC32(void) { return get_hwcap() & HWCAP_CRC32; } ++BoolInt CPU_IsSupported_NEON(void) { return 1; } ++BoolInt CPU_IsSupported_SHA1(void){ return get_hwcap() & HWCAP_SHA1; } ++BoolInt CPU_IsSupported_SHA2(void) { return get_hwcap() & HWCAP_SHA2; } ++BoolInt CPU_IsSupported_AES(void) { return get_hwcap() & HWCAP_AES; } ++ ++#else // __FreeBSD__ ++ + #define USE_HWCAP + + #ifdef USE_HWCAP +@@ -410,6 +427,7 @@ MY_HWCAP_CHECK_FUNC (SHA1) + MY_HWCAP_CHECK_FUNC (SHA2) + MY_HWCAP_CHECK_FUNC (AES) + ++#endif // FreeBSD + #endif // __APPLE__ + #endif // _WIN32 +