From nobody Sun Nov 20 12:14:59 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 4NFTwz5Pwjz4j5st; Sun, 20 Nov 2022 12:14:59 +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 4NFTwz4k2cz3lsR; Sun, 20 Nov 2022 12:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668946499; 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=UbWk8F4noWPolTGwCcJK86AZKyEQ+vtt1H+Lf3HC3cI=; b=xr93dvDqP1Z+vr3wScQlG6u38zddmm7WLKf9cUY+ug7HyGQ+JAxptB3bzAMDOMlrKrNzYl 2NgHRbaIR5AGP+fR6x7xJ1mSr7AfnH1OgH9CjSvMaLn4LiCt0Pr9Lgw4tkwCJJwffLl85w /YQGeCTFYtZamUW6fjGzvLx+rh673aT4KAfyPRQmtNj0/PFVQFvf9430c+osLq+ElBs5+N gfrfAosVEXF7EXgrjDaNji7M5FfUufbkt1h6Pt7wDGCcp49hEQ6Pl/vaaC9Mg9k5wz/e7v TJl2FMw6qTmSONPEG5siHjAlRJ1y2NvKSwY3Nvvb4n2GmSGo8lSWWvimuyyu3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668946499; 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=UbWk8F4noWPolTGwCcJK86AZKyEQ+vtt1H+Lf3HC3cI=; b=EUZwH+lXOYFkwzqx0OpYddpqvolRgQDvDHZqhBqG5S+qX9uzfja/dBEM4DYTL8u5jx4glw AhRaloIBMVJ9+L1TfmCAYTvu/OTWa/yDUhpQjvQHH1qBeOtfAKOwgqdk1B+auqezl+VMrK zvlGiPyVwxPjOtd2Qx5TjezDoyUjEf8Wj5qIjpd6ebd8MaAxf8Kh8Tg9NyBpQsqWkI83iW EYPcyGYY1zSWPDgv4YJkVY2V593mgYt/WQ+nIr1zNOuKb2mvpzz4uTgVdoxNbnHUaDIs+e TKrISAizzh0E79ijI1Y7hycngQLqyC4S6hVmagBoi60SDQ4L00/cRJ9R5GiMhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668946499; a=rsa-sha256; cv=none; b=bFFv/34A5cFZQDDiptbLz44omgvOZ58N6DBHyBNdFP6bgH7YOPAtDi0apQjBMkOAfCTOkQ /Liv2NuugFVDOEDQTDOgYndmUcb25ZiOMSKq/TS4CHS9b4AlLchHuTNfAtUxPU3/TNjjj0 9Pq6Q06TTrM/cKlI9UTFEnwJG/Pvtasu5EQcJFdnLr913qtWVmPiUG0dVniO4kn/uaH5j9 bzXd51BGwfQy133N2aa34BY87acKMmiiDGmDJH0w/LV+HWLeRSQKJ5PrvFulq38Eet/6tn 4eMYy5etQq1DcXVln+uwwW7gIWtsNL7HM/G88tiY+6p9OgC5hWiUa+MorP0pEA== 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 4NFTwz3pklzPZ6; Sun, 20 Nov 2022 12:14:59 +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 2AKCExP5098595; Sun, 20 Nov 2022 12:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AKCExfV098594; Sun, 20 Nov 2022 12:14:59 GMT (envelope-from git) Date: Sun, 20 Nov 2022 12:14:59 GMT Message-Id: <202211201214.2AKCExfV098594@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: 386f6c8ea584 - main - www/deno: 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: 386f6c8ea584fb79d747b07bed7480da5c78b178 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=386f6c8ea584fb79d747b07bed7480da5c78b178 commit 386f6c8ea584fb79d747b07bed7480da5c78b178 Author: Mikael Urankar AuthorDate: 2022-11-20 10:48:13 +0000 Commit: Mikael Urankar CommitDate: 2022-11-20 12:14:54 +0000 www/deno: Fix build on aarch64 --- www/deno/Makefile | 1 + ...atch-cargo-crates_v8_third__party_zlib_BUILD.gn | 11 +++++ ...rgo-crates_v8_third__party_zlib_cpu__features.c | 48 ++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/www/deno/Makefile b/www/deno/Makefile index e5360310cce1..b824f02a35a2 100644 --- a/www/deno/Makefile +++ b/www/deno/Makefile @@ -578,6 +578,7 @@ BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ post-patch: ${REINPLACE_CMD} "s|%%LOCALBASE%%|${LOCALBASE}|" \ ${WRKSRC}/cargo-crates/v8-${V8_VERS}/buildtools/third_party/libc++/BUILD.gn + ${MKDIR} ${WRKSRC}/cargo-crates/v8-${V8_VERS}/v8/tools/builtins-pgo/arm64.profile ${MKDIR} ${WRKSRC}/cargo-crates/v8-${V8_VERS}/v8/tools/builtins-pgo/x64.profile do-install: diff --git a/www/deno/files/patch-cargo-crates_v8_third__party_zlib_BUILD.gn b/www/deno/files/patch-cargo-crates_v8_third__party_zlib_BUILD.gn new file mode 100644 index 000000000000..1bdb45200080 --- /dev/null +++ b/www/deno/files/patch-cargo-crates_v8_third__party_zlib_BUILD.gn @@ -0,0 +1,11 @@ +--- cargo-crates/v8-0.55.0/third_party/zlib/BUILD.gn.orig 2022-11-20 11:42:33 UTC ++++ cargo-crates/v8-0.55.0/third_party/zlib/BUILD.gn +@@ -119,6 +119,8 @@ if (use_arm_neon_optimizations) { + defines = [ "CRC32_ARMV8_CRC32" ] + if (is_android) { + defines += [ "ARMV8_OS_ANDROID" ] ++ } else if (is_bsd) { ++ defines += [ "ARMV8_OS_FREEBSD" ] + } else if (is_linux || is_chromeos) { + defines += [ "ARMV8_OS_LINUX" ] + } else if (is_mac) { diff --git a/www/deno/files/patch-cargo-crates_v8_third__party_zlib_cpu__features.c b/www/deno/files/patch-cargo-crates_v8_third__party_zlib_cpu__features.c new file mode 100644 index 000000000000..fc3a6b915b5b --- /dev/null +++ b/www/deno/files/patch-cargo-crates_v8_third__party_zlib_cpu__features.c @@ -0,0 +1,48 @@ +--- cargo-crates/v8-0.55.0/third_party/zlib/cpu_features.c.orig 2022-11-20 11:40:38 UTC ++++ cargo-crates/v8-0.55.0/third_party/zlib/cpu_features.c +@@ -31,11 +31,20 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; + + #ifndef CPU_NO_SIMD + +-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) ++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_FREEBSD) + #include + #endif + +-#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 ++#elif defined(ARMV8_OS_ANDROID) + #include + #elif defined(ARMV8_OS_LINUX) + #include +@@ -56,7 +65,7 @@ static void _cpu_check_features(void); + static void _cpu_check_features(void); + #endif + +-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) ++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_FREEBSD) + #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) + #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; + #endif + } + #endif