From nobody Sun Jul 30 20:57:27 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 4RDYfX1GdKz4pSnx; Sun, 30 Jul 2023 20:59:50 +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 4RDYbX2VXWz3qMF; Sun, 30 Jul 2023 20:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690750650; 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=6GiSdF9EkWRStHBg4MGmLcHRc8KzNVMGFMXXgJva9oI=; b=c5sjQuBsIwEQ7SY1wYPk02f2msEwPxdU1HHOi2oC7yrFkH+zdV+HIWcJZ8LNUQ5P+yWbP1 TeiKp4rbTvkwp4bnu1D9aYvV2CHvFsLbH9IkcwSiLPepOyDQlG4YjB2jG/XdTpS0OQVkWW P8dhyRwVyZ5fUvOiWnp16AzXKgaUA2w+LQU93s1X89sSIAIo3smhRaoRbf9RLeMfSMfbWV RfprrAxHVzAI5HAiUXu5iIWIgBrnDGQZ8lq8r7XzNxJV4J6AQfi1cUK2nyEssXt2IVL+3K G9ovmowkUgnqJgvXzH0DXt3F4fEaSDxWl5I2IR45ukA4kEJLcRwj40NYQW6MpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690750650; 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=6GiSdF9EkWRStHBg4MGmLcHRc8KzNVMGFMXXgJva9oI=; b=SEiGbfp0cmePkb4ovvNP8VpSj/qVrN6kPuqiW+lzO045azc+h1yfgqeYzuMbeGj/V05nrC pA9aiaufWfx2/Xn1Pl2ZytAdEKvIb+Yb9V/E8FMlAlqDKtv8tVtsKLOlHNe7wZGgOchQ8A PIYqxyBZJtlLL1O3gfWVWo3sauHwPOTlYX+nFyvxDjUEOfCdIO60vkZOMedwapr+htkPGO kNjAzbH8kA+4nQ4qyb7kcx3DCfmE2g4qc0dg6q/K0xNUL1Rc3wt/8EIZRDHRaJUZ1FDI9Q kXcYYHl2s0FY/o5KCKT/V3eD1mJvaq/drLQl1IUslkU+TxEdL7jjkzNd9KNPug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690750650; a=rsa-sha256; cv=none; b=kkzG7Q3XN+pnLgOYNlalq1+DHVn2I3sg9TWmbProp3gaIXfA+RzFwnFJJdXQVjM5RUfnyk hLkMkLPV4ruhToGxW3DPyZdd+pCCkdccZgKPPDX4e918trYHdQbTjTZX38UJrpkZ3VSkIq xENWhXeouPujD73un5vDhasnAGNcAWYVtOPabXz7qERf8uE3//VtWqRgSfeBq73c/XLmwL 8pakCiTafbIkpfPQa+m0nhA+31eyTtA/IyJdTQmiMcN4o7d0Z7u6Z1ikEFLGtLxSj6Vd9O H/CDHoGmfZGXUx45FjFfoByh9rXUpffAUsyoS/HhuPOY/w9xsvJnXdnoVGyRNw== 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 4RDYbW60QpzTBk; Sun, 30 Jul 2023 20:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36UKvRlQ001612; Sun, 30 Jul 2023 20:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36UKvR0a001611; Sun, 30 Jul 2023 20:57:27 GMT (envelope-from git) Date: Sun, 30 Jul 2023 20:57:27 GMT Message-Id: <202307302057.36UKvR0a001611@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ronald Klop Subject: git: 0464348da5f0 - main - databases/mongodb44: make support for ARMv8.0-A optional 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: ronald X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0464348da5f077137bdcb0338d9af8b470771952 Auto-Submitted: auto-generated The branch main has been updated by ronald: URL: https://cgit.FreeBSD.org/ports/commit/?id=0464348da5f077137bdcb0338d9af8b470771952 commit 0464348da5f077137bdcb0338d9af8b470771952 Author: Ronald Klop AuthorDate: 2023-07-30 20:48:45 +0000 Commit: Ronald Klop CommitDate: 2023-07-30 20:57:08 +0000 databases/mongodb44: make support for ARMv8.0-A optional no-op commit; default is still enabled Why? Upstream removed support for non-LSE ARM CPUs because of possible corruption on high concurrent load. Quite some people (including me) use this on RPI4 with net-mgmt/unifi7 and one WiFi dish. This is not a 'high concurrent load' and works fine. By making this CPU optional I hope to support both types of usage. --- databases/mongodb44/Makefile | 9 +++++++++ databases/mongodb44/files/extrapatch-SConstruct | 11 +++++++++++ databases/mongodb44/files/patch-SConstruct | 9 --------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/databases/mongodb44/Makefile b/databases/mongodb44/Makefile index 10465fc1b720..9402778d101b 100644 --- a/databases/mongodb44/Makefile +++ b/databases/mongodb44/Makefile @@ -51,10 +51,19 @@ USERS= mongodb GROUPS= mongodb OPTIONS_DEFINE= LTO SASL SSL +OPTIONS_DEFINE_aarch64= ARMV80A OPTIONS_DEFAULT= LTO SASL SSL +OPTIONS_DEFAULT_aarch64= ARMV80A OPTIONS_EXCLUDE_aarch64= ${OPTIONS_EXCLUDE_${ARCH}_${OSREL:R}} OPTIONS_EXCLUDE_aarch64_14= LTO # Does not work with llvm12 on aarch64. +# MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream. +# Can give corruption on high concurrency. +# Please read https://jira.mongodb.org/browse/SERVER-71772. +ARMV80A_DESC= Enable non-LSE ARM64 CPUs like RPI4. + +ARMV80A_EXTRA_PATCHES= ${FILESDIR}/extrapatch-SConstruct + LTO_MAKE_ARGS= --lto=on SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 diff --git a/databases/mongodb44/files/extrapatch-SConstruct b/databases/mongodb44/files/extrapatch-SConstruct new file mode 100644 index 000000000000..f82c38ad98f8 --- /dev/null +++ b/databases/mongodb44/files/extrapatch-SConstruct @@ -0,0 +1,11 @@ +--- SConstruct.orig 2023-05-10 02:21:42 UTC ++++ SConstruct +@@ -2297,7 +2297,7 @@ if env.ToolchainIs('GCC', 'clang'): + elif env['TARGET_ARCH'] == 'aarch64': + # If we are using GCC or clang to target aarch64, set the arch to be armv8.2-a, + # This is to prevent a bug with WT see SERVER-71772 for more details +- env.Append( CCFLAGS=['-march=armv8.2-a', '-mtune=generic'] ) ++ env.Append( CCFLAGS=['-march=armv8-a+crc', '-mtune=generic'] ) + + # Needed for auth tests since key files are stored in git with mode 644. + if not env.TargetOSIs('windows'): diff --git a/databases/mongodb44/files/patch-SConstruct b/databases/mongodb44/files/patch-SConstruct index 4d4576d66465..eab9454199b0 100644 --- a/databases/mongodb44/files/patch-SConstruct +++ b/databases/mongodb44/files/patch-SConstruct @@ -31,12 +31,3 @@ if not has_option("disable-warnings-as-errors"): env.Append( CCFLAGS=["-Werror"] ) -@@ -2297,7 +2297,7 @@ if env.ToolchainIs('GCC', 'clang'): - elif env['TARGET_ARCH'] == 'aarch64': - # If we are using GCC or clang to target aarch64, set the arch to be armv8.2-a, - # This is to prevent a bug with WT see SERVER-71772 for more details -- env.Append( CCFLAGS=['-march=armv8.2-a', '-mtune=generic'] ) -+ env.Append( CCFLAGS=['-march=armv8-a+crc', '-mtune=generic'] ) - - # Needed for auth tests since key files are stored in git with mode 644. - if not env.TargetOSIs('windows'):