From nobody Fri Apr 28 20:45:22 2023 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 4Q7PkW1rBGz47xNT; Fri, 28 Apr 2023 20:45:23 +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 4Q7PkW1JgZz3NPX; Fri, 28 Apr 2023 20:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682714723; 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=duaJZl0errCejYn7jK2QLboGZJpaPcUcdKAQi8+z8LY=; b=CDm7G8XUEsm6MF92QkvOcBFZ1M2nz88qgolBxbzGtEfDX9Njl2s3mmBejojRJLuy+u5xnh lbjlPN6dTKiLAqZcUZXaS9I0Yjh7gU3bGVyACKYtsXItkGooHkDKVf0cSJDLXu1byGlI8J MM95pglBJ+1uEa3vogMYDXG9BXTYhwP5HcTjvlIfc+U9gicZ0dl2GQOzQKsPaYtAVAH0K6 uo+jL5GaSUkwiuB4oIsn73Ff2jk0aW1mL4rO9Hq/CjgjkTsXqbraJNy5OEfjoq0vBRojAW TubKRkw/acgA/o39w0M8TdlNh3xZXd6vcbeiu0REQQLS3k4LjnxALRTMzSPqTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682714723; 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=duaJZl0errCejYn7jK2QLboGZJpaPcUcdKAQi8+z8LY=; b=AaOzbrTY791iUbOVR7AJSgufwWYt1T2eCbzSXp7vXj6WCe5oTs4ptQZP9yfP7jvJE8E2Fc L53PGbV+6KIBRIIFt98SSlKpjNU+GKE5zcoT4tcTVG9oogU8U9ulv+lchv3O3+jZOusmGj Tv6vV2pfsTEAK/RaX86IWfVsyA4LoQqAGAEw0GqAadaY99onvrv1uncdSVbxGhBh8+wvZ7 fb5Sz5QTnpJQ50s9ovBtHG3GoI6z5/kzEbX5/TIJo6LOlJvj/UcNjvqdUqRZPCc42wCsRj ESc4xwGf/XkWnQGYQToS3HU5GeSnQvuOUo/A8SnHd7TZUjE38XYZu9DbgmU0Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682714723; a=rsa-sha256; cv=none; b=yiAmyy+WTCmltmpAW5Cb3dPkUrxQnjPHJtYrsuxWMpBPJqBI+JRlNtinm1VHw4jF7IcXpE qDlMymnWge/h9pT0J0Qz1wacLlyd0ytleWpgwOu23iYIRJ5EXpC5moUl2JtxEu84kTt5O1 nEx/+VGaAGmu2byvwWvo2MAwnTPx8ESFr8/hgl1x5434XHMIHWJledrMR1kdYkYpbMH7eF xcvUufQ66EN3+Z1cSqEvHwPE6n5HQC1z/VozwVw8u5Wu0ms/Hd4pM9emQHK0smHxENFZgu PRvEnyv4q26CFBgsc4bIfy+e+QIacEA60LZ6/VmSPv2MyjFSrQ8C0TQKJouQzg== 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 4Q7PkW0N3lzDvM; Fri, 28 Apr 2023 20:45:23 +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 33SKjMSM090523; Fri, 28 Apr 2023 20:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33SKjMup090522; Fri, 28 Apr 2023 20:45:22 GMT (envelope-from git) Date: Fri, 28 Apr 2023 20:45:22 GMT Message-Id: <202304282045.33SKjMup090522@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 5acf5a02777b - main - games/punchy: unbreak build on armv7 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: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5acf5a02777bd9c6cce20980859c4316b267f6f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=5acf5a02777bd9c6cce20980859c4316b267f6f2 commit 5acf5a02777bd9c6cce20980859c4316b267f6f2 Author: Robert Clausecker AuthorDate: 2023-04-26 00:36:30 +0000 Commit: Jan Beich CommitDate: 2023-04-28 20:44:40 +0000 games/punchy: unbreak build on armv7 Fix files/patch-v8 to compile on armv7 by refactoring it to use ELF auxilliary vectors in the CPU detection code and by adding some missing includes. cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:20: warning: implicit declaration of function 'READ_SPECIALREG' is invalid in C99 [-Wimplicit-function-declaration] id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:36: error: use of undeclared identifier 'id_aa64isar0_el1'; did you mean 'id_aa64isar0'? id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^~~~~~~~~~~~~~~~ id_aa64isar0 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:136:14: note: 'id_aa64isar0' declared here uint64_t id_aa64isar0; ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: warning: implicit declaration of function 'ID_AA64ISAR0_AES' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:47: error: use of undeclared identifier 'ID_AA64ISAR0_AES_PMULL'; did you mean 'ID_AA64ISAR0_AES'? if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_AES cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: note: 'ID_AA64ISAR0_AES' declared here if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: warning: implicit declaration of function 'ID_AA64ISAR0_CRC32' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:49: error: use of undeclared identifier 'ID_AA64ISAR0_CRC32_BASE'; did you mean 'ID_AA64ISAR0_CRC32'? if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^~~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_CRC32 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: note: 'ID_AA64ISAR0_CRC32' declared here if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ PR: 271076 Reported by: pkg-fallout --- games/punchy/Makefile | 2 +- games/punchy/files/patch-v8 | 50 +++++++++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/games/punchy/Makefile b/games/punchy/Makefile index d3193992c954..be709fe5c6e3 100644 --- a/games/punchy/Makefile +++ b/games/punchy/Makefile @@ -1,7 +1,7 @@ PORTNAME= punchy DISTVERSIONPREFIX= v DISTVERSION= 0.3.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= games wayland MAINTAINER= jbeich@FreeBSD.org diff --git a/games/punchy/files/patch-v8 b/games/punchy/files/patch-v8 index 1b0bd8761916..c21a41bf51b8 100644 --- a/games/punchy/files/patch-v8 +++ b/games/punchy/files/patch-v8 @@ -424,7 +424,7 @@ error[E0308]: mismatched types } else if (is_mac) { --- cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c.orig 1970-01-01 00:00:00 UTC +++ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c -@@ -31,11 +31,20 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; +@@ -31,11 +31,13 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; #ifndef CPU_NO_SIMD @@ -435,19 +435,12 @@ error[E0308]: mismatched types -#if defined(ARMV8_OS_ANDROID) +#if defined(ARMV8_OS_FREEBSD) -+#include -+#include -+#ifndef ID_AA64ISAR0_AES_VAL -+#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES -+#endif -+#ifndef ID_AA64ISAR0_CRC32_VAL -+#define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 -+#endif ++#include +#elif defined(ARMV8_OS_ANDROID) #include #elif defined(ARMV8_OS_LINUX) #include -@@ -56,7 +65,7 @@ static void _cpu_check_features(void); +@@ -56,7 +58,7 @@ static void _cpu_check_features(void); static void _cpu_check_features(void); #endif @@ -456,17 +449,20 @@ error[E0308]: mismatched types #if !defined(ARMV8_OS_MACOS) // _cpu_check_features() doesn't need to do anything on mac/arm since all // features are known at build time, so don't call it. -@@ -123,6 +132,13 @@ static void _cpu_check_features(void) +@@ -123,6 +125,16 @@ static void _cpu_check_features(void) #elif defined(ARMV8_OS_WINDOWS) arm_cpu_enable_crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE); arm_cpu_enable_pmull = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE); -+#elif defined(ARMV8_OS_FREEBSD) -+ uint64_t id_aa64isar0; -+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); -+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) -+ arm_cpu_enable_pmull = 1; -+ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) -+ arm_cpu_enable_crc32 = 1; ++#elif defined(ARMV8_OS_FREEBSD) && defined(__aarch64__) ++ unsigned long features; ++ elf_aux_info(AT_HWCAP, &features, sizeof features); ++ arm_cpu_enable_crc32 = !!(features & HWCAP_CRC32); ++ arm_cpu_enable_pmull = !!(features & HWCAP_PMULL); ++#elif defined(ARMV8_OS_FREEBSD) /* aarch32 */ ++ unsigned long features; ++ elf_aux_info(AT_HWCAP2, &features, sizeof features); ++ arm_cpu_enable_crc32 = !!(features & HWCAP2_CRC32); ++ arm_cpu_enable_pmull = !!(features & HWCAP2_PMULL); #endif } #endif @@ -590,3 +586,21 @@ error[E0308]: mismatched types // static Stack::StackSlot Stack::GetStackStart() { +--- cargo-crates/v8-0.47.1/v8/src/codegen/arm/cpu-arm.cc.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/v8-0.47.1/v8/src/codegen/arm/cpu-arm.cc +@@ -2,12 +2,15 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include "include/v8config.h" ++ + // CPU specific code for arm independent of OS goes here. + #ifdef __arm__ + #ifdef __QNXNTO__ + #include // for cache flushing. + #undef MAP_TYPE + #elif V8_OS_FREEBSD ++#include + #include // for cache flushing + #include + #elif V8_OS_STARBOARD