From nobody Fri Jun 16 18:38:51 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 4QjSbv5TgFz4fTvr; Fri, 16 Jun 2023 18:38:51 +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 4QjSbv4xxxz3tCV; Fri, 16 Jun 2023 18:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686940731; 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=lOjekl20clz6a74fXFTFRcW03gI8LOtp9edbaZsF6gs=; b=oHH2lCHX0PjyZTdBeSKwgm/4lzaDHYfU8WZHcHSed6cF/Fpkj+XcnIWmffDNPZKXqam81N jDqfKAd1Yn65jiDsgVkCPE6iwSzrrKrvY5ZypY/K9NjgAz09qJTKuAjq9sFicxU0/en9Xs a0SL76xSiPPcLr0Kh/HwM8SlQVEhs9m34jiFSeS1MI1XbjVuFOip73aEG+V20TU5UOfkQt fIiDNo4kVwQoKKDC1QmijAKTvxlhtZDCQ/Xbizcvd3pMVQZUvL1QG2HSX2fagZ2aAuJ0My 2p4sjaISRuxhQvPgGb+IvM/uWfVH90/4PFhJbljRB0Pm0YCfuE5YiYTwahlstw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686940731; 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=lOjekl20clz6a74fXFTFRcW03gI8LOtp9edbaZsF6gs=; b=NWab3ekzmuQzbR6gy1KkVjQuLWVm7GczdCg1qymvz62vmAhD+e6LQBIcXnpZQ9p/eslrgD DQieW+UJEBXKnZpouOHwuIT9UhtMyNRYfruswzf98YF4cL6Vn82YaD2O+I4nqu5Fa4GpWG q7jhG9dLOG18J2imfLCFdq3cX2wderWCwlfk/TRZtJ1V9Fg8EzS6ZhpVXs/Mvifaoz3c/V PxuIeHsnWv/J5c16zs294QSVrlXlMbNqwiOw4CNVbBhJii0n9juMF3AlWnm7c7g/SqsDyW TcHFYPInnr3oPT22GuClJ4b1ksFT0dubFUJY94xIW6zPCRTltzKTPCWqk/aZ6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686940731; a=rsa-sha256; cv=none; b=t/dAu4fFiQtJN1oP0+XY1XG+E4w9W8Tpx6A4zKTYYzZLx9HjoqutHUkUbR6sEx+qhgThCd 2xeQoRQ29U4u0F00ZBAnNU6IxbkUcxxQA0w8gsY1Y18wQOU13eoufvQQoM6TjGrXOL7uXO 5Kznig0SqPaOY4HnPePixNuNJIS/3Om98D/EnwvXjO4Lm28hQFPXxzcKup4m2TDo3in1qx nP2gpUkErDaIZ9MGaDJu7DUIbI1ZNk4vlIS+IzJkGkAGH+40zzfLzoMhi1fCcz910Y0M91 5BX/5fxDN1DwQNzF9WLbA/0+33jmE8c1plCqKN0nC9wZ6sETEkFFjcjM+7pO7A== 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 4QjSbv40ZRzfX3; Fri, 16 Jun 2023 18:38:51 +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 35GIcpO5056439; Fri, 16 Jun 2023 18:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35GIcpAc056438; Fri, 16 Jun 2023 18:38:51 GMT (envelope-from git) Date: Fri, 16 Jun 2023 18:38:51 GMT Message-Id: <202306161838.35GIcpAc056438@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: d4f7fe65a72f - main - sysutils/onefetch: fix build on powerpc* 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: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4f7fe65a72ffa302b1f0bbe5e343a5e99d14749 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=d4f7fe65a72ffa302b1f0bbe5e343a5e99d14749 commit d4f7fe65a72ffa302b1f0bbe5e343a5e99d14749 Author: Piotr Kubaj AuthorDate: 2023-06-16 18:23:21 +0000 Commit: Piotr Kubaj CommitDate: 2023-06-16 18:38:49 +0000 sysutils/onefetch: fix build on powerpc* /wrkdirs/usr/ports/sysutils/onefetch/work/onefetch-2.17.1/cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/functable.c:125:9: error: use of undeclared identifier 'power_cpu_has_arch_3_00' if (power_cpu_has_arch_3_00) ^ /wrkdirs/usr/ports/sysutils/onefetch/work/onefetch-2.17.1/cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/functable.c:158:9: error: use of undeclared identifier 'power_cpu_has_arch_3_00' if (power_cpu_has_arch_3_00) ^ /wrkdirs/usr/ports/sysutils/onefetch/work/onefetch-2.17.1/cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/functable.c:451:9: error: use of undeclared identifier 'power_cpu_has_arch_3_00' if (power_cpu_has_arch_3_00) --- ...1.1.8_src_zlib-ng_arch_power_chunkset__power8.c | 11 +++++++ ...-1.1.8_src_zlib-ng_arch_power_power__features.c | 36 ++++++++++++++++++++ ...1.1.8_src_zlib-ng_cmake_detect-intrinsics.cmake | 38 ++++++++++++++++++++++ 3 files changed, 85 insertions(+) diff --git a/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_chunkset__power8.c b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_chunkset__power8.c new file mode 100644 index 000000000000..8f8a5c324897 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_chunkset__power8.c @@ -0,0 +1,11 @@ +--- cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/arch/power/chunkset_power8.c.orig 2022-12-29 16:08:43 UTC ++++ cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/arch/power/chunkset_power8.c +@@ -27,7 +27,7 @@ static inline void chunkmemset_4(uint8_t *from, chunk_ + } + + static inline void chunkmemset_8(uint8_t *from, chunk_t *chunk) { +- uint64_t tmp; ++ unsigned long long tmp; + zmemcpy_8(&tmp, from); + *chunk = (vector unsigned char)vec_splats(tmp); + } diff --git a/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_power__features.c b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_power__features.c new file mode 100644 index 000000000000..dd01fb3e6516 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_arch_power_power__features.c @@ -0,0 +1,36 @@ +--- cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/arch/power/power_features.c.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/arch/power/power_features.c +@@ -7,6 +7,9 @@ + #ifdef HAVE_SYS_AUXV_H + # include + #endif ++#ifdef __FreeBSD__ ++#include ++#endif + #include "../../zbuild.h" + #include "power_features.h" + +@@ -17,7 +20,11 @@ Z_INTERNAL int power_cpu_has_arch_3_00 = 0; + void Z_INTERNAL power_check_features(void) { + #ifdef PPC_FEATURES + unsigned long hwcap; ++#ifdef __FreeBSD__ ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); ++#else + hwcap = getauxval(AT_HWCAP); ++#endif + + if (hwcap & PPC_FEATURE_HAS_ALTIVEC) + power_cpu_has_altivec = 1; +@@ -25,7 +32,11 @@ void Z_INTERNAL power_check_features(void) { + + #ifdef POWER_FEATURES + unsigned long hwcap2; ++#ifdef __FreeBSD__ ++ elf_aux_info(AT_HWCAP2, &hwcap2, sizeof(hwcap2)); ++#else + hwcap2 = getauxval(AT_HWCAP2); ++#endif + + if (hwcap2 & PPC_FEATURE2_ARCH_2_07) + power_cpu_has_arch_2_07 = 1; diff --git a/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_cmake_detect-intrinsics.cmake b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_cmake_detect-intrinsics.cmake new file mode 100644 index 000000000000..8e82c8987617 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_libz-ng-sys-1.1.8_src_zlib-ng_cmake_detect-intrinsics.cmake @@ -0,0 +1,38 @@ +--- cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/cmake/detect-intrinsics.cmake.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/libz-ng-sys-1.1.8/src/zlib-ng/cmake/detect-intrinsics.cmake +@@ -280,8 +280,17 @@ macro(check_ppc_intrinsics) + set(CMAKE_REQUIRED_FLAGS "${PPCFLAGS} ${NATIVEFLAG}") + check_c_source_compiles( + "#include ++ #ifdef __FreeBSD__ ++ #include ++ #endif + int main() { ++ #ifdef __FreeBSD__ ++ unsigned long hwcap; ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); ++ return (hwcap & PPC_FEATURE_HAS_ALTIVEC); ++ #else + return (getauxval(AT_HWCAP) & PPC_FEATURE_HAS_ALTIVEC); ++ #endif + }" + HAVE_VMX + ) +@@ -298,8 +307,17 @@ macro(check_power8_intrinsics) + set(CMAKE_REQUIRED_FLAGS "${POWER8FLAG} ${NATIVEFLAG}") + check_c_source_compiles( + "#include ++ #ifdef __FreeBSD__ ++ #include ++ #endif + int main() { ++ #ifdef __FreeBSD__ ++ unsigned long hwcap; ++ elf_aux_info(AT_HWCAP2, &hwcap, sizeof(hwcap)); ++ return (hwcap & PPC_FEATURE2_ARCH_2_07); ++ #else + return (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07); ++ #endif + }" + HAVE_POWER8_INTRIN + )