git: 7e5edb6fbc8e - main - net/quiche: fix build on powerpc64le
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Apr 2024 01:45:35 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=7e5edb6fbc8ead31848bc4b8490c7f3fab5b37cd commit 7e5edb6fbc8ead31848bc4b8490c7f3fab5b37cd Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2024-04-12 01:44:23 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2024-04-12 01:44:23 +0000 net/quiche: fix build on powerpc64le --- .../files/patch-quiche_deps_boringssl_CMakeLists.txt | 11 +++++++++++ .../files/patch-quiche_deps_boringssl_src_CMakeLists.txt | 11 +++++++++++ .../patch-quiche_deps_boringssl_src_crypto_cpu-ppc64le.c | 14 ++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/net/quiche/files/patch-quiche_deps_boringssl_CMakeLists.txt b/net/quiche/files/patch-quiche_deps_boringssl_CMakeLists.txt new file mode 100644 index 000000000000..b36c7cedb82b --- /dev/null +++ b/net/quiche/files/patch-quiche_deps_boringssl_CMakeLists.txt @@ -0,0 +1,11 @@ +--- quiche/deps/boringssl/CMakeLists.txt.orig 2024-04-12 00:59:13 UTC ++++ quiche/deps/boringssl/CMakeLists.txt +@@ -480,7 +480,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips") + # Just to avoid the “unknown processor” error. + set(ARCH "generic") +-elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") ++elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc64le") + set(ARCH "ppc64le") + else() + message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR}) diff --git a/net/quiche/files/patch-quiche_deps_boringssl_src_CMakeLists.txt b/net/quiche/files/patch-quiche_deps_boringssl_src_CMakeLists.txt new file mode 100644 index 000000000000..0c9018edbf4e --- /dev/null +++ b/net/quiche/files/patch-quiche_deps_boringssl_src_CMakeLists.txt @@ -0,0 +1,11 @@ +--- quiche/deps/boringssl/src/CMakeLists.txt.orig 2024-04-12 00:59:13 UTC ++++ quiche/deps/boringssl/src/CMakeLists.txt +@@ -480,7 +480,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips") + # Just to avoid the “unknown processor” error. + set(ARCH "generic") +-elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") ++elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc64le") + set(ARCH "ppc64le") + else() + message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR}) diff --git a/net/quiche/files/patch-quiche_deps_boringssl_src_crypto_cpu-ppc64le.c b/net/quiche/files/patch-quiche_deps_boringssl_src_crypto_cpu-ppc64le.c new file mode 100644 index 000000000000..c928d89015ab --- /dev/null +++ b/net/quiche/files/patch-quiche_deps_boringssl_src_crypto_cpu-ppc64le.c @@ -0,0 +1,14 @@ +--- quiche/deps/boringssl/src/crypto/cpu-ppc64le.c.orig 2024-04-12 01:38:29 UTC ++++ quiche/deps/boringssl/src/crypto/cpu-ppc64le.c +@@ -28,7 +28,11 @@ void OPENSSL_cpuid_setup(void) { + #endif + + void OPENSSL_cpuid_setup(void) { ++#ifdef __linux__ + OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2); ++#else ++ elf_aux_info(AT_HWCAP2, &OPENSSL_ppc64le_hwcap2, sizeof(OPENSSL_ppc64le_hwcap2)); ++#endif + } + + int CRYPTO_is_PPC64LE_vcrypto_capable(void) {