From nobody Mon Oct 25 16:01:27 2021 X-Original-To: dev-commits-ports-all@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 B48E71819BE3; Mon, 25 Oct 2021 16:01:38 +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 4HdKSy1GMLz3LVS; Mon, 25 Oct 2021 16:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 43BED38AC; Mon, 25 Oct 2021 16:01:27 +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 19PG1RZL073782; Mon, 25 Oct 2021 16:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19PG1RC4073781; Mon, 25 Oct 2021 16:01:27 GMT (envelope-from git) Date: Mon, 25 Oct 2021 16:01:27 GMT Message-Id: <202110251601.19PG1RC4073781@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: f9c44858605e - main - databases/rocksdb: Move architecture-specific fixes into single patch file List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9c44858605e6cc3af07fb61006dfd7a86d694f9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9c44858605e6cc3af07fb61006dfd7a86d694f9 commit f9c44858605e6cc3af07fb61006dfd7a86d694f9 Author: Po-Chuan Hsieh AuthorDate: 2021-10-25 15:05:26 +0000 Commit: Po-Chuan Hsieh CommitDate: 2021-10-25 15:57:13 +0000 databases/rocksdb: Move architecture-specific fixes into single patch file - patch-aarch64 is merged from: - patch-CMakeLists.txt - patch-build_tools-build_detect_platform (part of) - patch-powerpc64 is merged from: - patch-util_crc32c.cc - patch-utilities_transactions_lock_range_range__tree_lib_portability_toku__time.h --- databases/rocksdb/files/patch-CMakeLists.txt | 14 ----------- databases/rocksdb/files/patch-aarch64 | 27 ++++++++++++++++++++++ .../files/patch-build_tools-build_detect_platform | 11 --------- ...ib_portability_toku__time.h => patch-powerpc64} | 24 +++++++++++++++++++ databases/rocksdb/files/patch-util_crc32c.cc | 24 ------------------- 5 files changed, 51 insertions(+), 49 deletions(-) diff --git a/databases/rocksdb/files/patch-CMakeLists.txt b/databases/rocksdb/files/patch-CMakeLists.txt deleted file mode 100644 index 31790f595624..000000000000 --- a/databases/rocksdb/files/patch-CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- CMakeLists.txt.orig 2021-06-25 21:15:04 UTC -+++ CMakeLists.txt -@@ -612,6 +612,11 @@ if(HAVE_AUXV_GETAUXVAL) - add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT) - endif() - -+check_cxx_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO) -+if(HAVE_ELF_AUX_INFO) -+ add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT) -+endif() -+ - include_directories(${PROJECT_SOURCE_DIR}) - include_directories(${PROJECT_SOURCE_DIR}/include) - if(WITH_FOLLY_DISTRIBUTED_MUTEX) diff --git a/databases/rocksdb/files/patch-aarch64 b/databases/rocksdb/files/patch-aarch64 new file mode 100644 index 000000000000..5eeecf75c7df --- /dev/null +++ b/databases/rocksdb/files/patch-aarch64 @@ -0,0 +1,27 @@ +--- CMakeLists.txt.orig 2021-06-25 21:15:04 UTC ++++ CMakeLists.txt +@@ -612,6 +612,11 @@ if(HAVE_AUXV_GETAUXVAL) + add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT) + endif() + ++check_cxx_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO) ++if(HAVE_ELF_AUX_INFO) ++ add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT) ++endif() ++ + include_directories(${PROJECT_SOURCE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/include) + if(WITH_FOLLY_DISTRIBUTED_MUTEX) +--- build_tools/build_detect_platform.orig 2021-06-25 21:15:04 UTC ++++ build_tools/build_detect_platform +@@ -599,8 +599,8 @@ EOF + fi + + # TODO(tec): Fix -Wshorten-64-to-32 errors on FreeBSD and enable the warning. +-# -Wshorten-64-to-32 breaks compilation on FreeBSD i386 +-if ! [ "$TARGET_OS" = FreeBSD -a "$TARGET_ARCHITECTURE" = i386 ]; then ++# -Wshorten-64-to-32 breaks compilation on FreeBSD i386 and aarch64 ++if ! { [ "$TARGET_OS" = FreeBSD ] && [ "$TARGET_ARCHITECTURE" = i386 -o "$TARGET_ARCHITECTURE" = "arm64" ]; }; then + # Test whether -Wshorten-64-to-32 is available + $CXX $PLATFORM_CXXFLAGS -x c++ - -o /dev/null -Wshorten-64-to-32 2>/dev/null </dev/null < ++#include ++#include ++static int arch_ppc_probe(void) { ++ unsigned long cpufeatures; ++ arch_ppc_crc32 = 0; ++ ++#if defined(__powerpc64__) ++ elf_aux_info(AT_HWCAP2, &cpufeatures, sizeof(cpufeatures)); ++ if (cpufeatures & PPC_FEATURE2_HAS_VEC_CRYPTO) arch_ppc_crc32 = 1; ++#endif /* __powerpc64__ */ ++ ++ return arch_ppc_crc32; ++} + #endif // __linux__ + + static bool isAltiVec() { --- utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h.orig 2021-10-17 17:02:20 UTC +++ utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h @@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliate diff --git a/databases/rocksdb/files/patch-util_crc32c.cc b/databases/rocksdb/files/patch-util_crc32c.cc deleted file mode 100644 index 7325d476b4b2..000000000000 --- a/databases/rocksdb/files/patch-util_crc32c.cc +++ /dev/null @@ -1,24 +0,0 @@ ---- util/crc32c.cc.orig 2021-06-25 21:15:04 UTC -+++ util/crc32c.cc -@@ -488,6 +488,21 @@ static int arch_ppc_probe(void) { - - return arch_ppc_crc32; - } -+#elif __FreeBSD__ -+#include -+#include -+#include -+static int arch_ppc_probe(void) { -+ unsigned long cpufeatures; -+ arch_ppc_crc32 = 0; -+ -+#if defined(__powerpc64__) -+ elf_aux_info(AT_HWCAP2, &cpufeatures, sizeof(cpufeatures)); -+ if (cpufeatures & PPC_FEATURE2_HAS_VEC_CRYPTO) arch_ppc_crc32 = 1; -+#endif /* __powerpc64__ */ -+ -+ return arch_ppc_crc32; -+} - #endif // __linux__ - - static bool isAltiVec() {