Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2023 22:16:27 GMT
From:      Ronald Klop <ronald@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b0aa4da9bcd2 - main - databases/mongodb44: enable build for Raspberry Pi
Message-ID:  <202306302216.35UMGRBP063428@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ronald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b0aa4da9bcd26ef05c304ee163bd38367b891f4e

commit b0aa4da9bcd26ef05c304ee163bd38367b891f4e
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2023-06-30 21:18:09 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2023-06-30 22:16:02 +0000

    databases/mongodb44: enable build for Raspberry Pi
    
    Upstream stopt supporting non-LSE ARM cpus (read RPI).
    See: https://jira.mongodb.org/browse/SERVER-71772
    For POLA I still enable this for the Q3 branch.
    
    PR:     272294
---
 .../patch-src_third__party_mozjs-60_gen-config.sh   |  6 +++---
 databases/mongodb44/files/patch-SConstruct          | 21 +++++++++++++++------
 databases/mongodb44/pkg-message                     |  8 ++++++++
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/databases/mongodb44/files/aarch64/patch-src_third__party_mozjs-60_gen-config.sh b/databases/mongodb44/files/aarch64/patch-src_third__party_mozjs-60_gen-config.sh
index d9a2e1c3f075..8a81b2bb4293 100644
--- a/databases/mongodb44/files/aarch64/patch-src_third__party_mozjs-60_gen-config.sh
+++ b/databases/mongodb44/files/aarch64/patch-src_third__party_mozjs-60_gen-config.sh
@@ -1,6 +1,6 @@
---- src/third_party/mozjs-60/gen-config.sh.orig	2019-10-11 03:28:57 UTC
+--- src/third_party/mozjs-60/gen-config.sh.orig	2023-05-10 02:21:42 UTC
 +++ src/third_party/mozjs-60/gen-config.sh
-@@ -28,6 +28,9 @@ _xcode_setup() {
+@@ -28,6 +28,9 @@ case "$_Path" in
  }
  
  case "$_Path" in
@@ -10,7 +10,7 @@
      "platform/aarch64/linux")
          _CONFIG_OPTS="--host=aarch64-linux"
  	;;
-@@ -82,9 +85,9 @@ esac
+@@ -82,9 +85,9 @@ rm config.cache || true
  cd mozilla-release/js/src
  rm config.cache || true
  
diff --git a/databases/mongodb44/files/patch-SConstruct b/databases/mongodb44/files/patch-SConstruct
index 9fc72edebc07..4d4576d66465 100644
--- a/databases/mongodb44/files/patch-SConstruct
+++ b/databases/mongodb44/files/patch-SConstruct
@@ -1,6 +1,6 @@
---- SConstruct.orig	2021-07-07 09:17:06 UTC
+--- SConstruct.orig	2023-05-10 02:21:42 UTC
 +++ SConstruct
-@@ -1213,9 +1213,9 @@ if has_option('variables-help'):
+@@ -1269,9 +1269,9 @@ if has_option('variables-help'):
      print(env_vars.GenerateHelpText(env))
      Exit(0)
  
@@ -11,9 +11,9 @@
 +#if unknown_vars:
 +#    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
  
- if get_option('install-action') != 'default' and get_option('ninja') != "disabled":
-     env.FatalError("Cannot use non-default install actions when generating Ninja.")
-@@ -2091,7 +2091,7 @@ if env.TargetOSIs('posix'):
+ install_actions.setup(env, get_option('install-action'))
+ 
+@@ -2196,7 +2196,7 @@ if env.TargetOSIs('posix'):
              # If runtime hardening is requested, then build anything
              # destined for an executable with the necessary flags for PIE.
              env.AppendUnique(
@@ -22,7 +22,7 @@
                  PROGLINKFLAGS=['-pie'],
              )
  
-@@ -2106,7 +2106,7 @@ if env.TargetOSIs('posix'):
+@@ -2211,7 +2211,7 @@ if env.TargetOSIs('posix'):
                           "-Wno-unknown-pragmas",
                           "-Winvalid-pch"] )
      # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
@@ -31,3 +31,12 @@
          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'):
diff --git a/databases/mongodb44/pkg-message b/databases/mongodb44/pkg-message
new file mode 100644
index 000000000000..43e45ca6a35a
--- /dev/null
+++ b/databases/mongodb44/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+  message: <<EOM
+MongoDB on Rasperry Pi can work but is unsupported upstream.
+Please read https://jira.mongodb.org/browse/SERVER-71772 if you run this on a non-LSE ARM cpu.
+EOM
+}
+]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306302216.35UMGRBP063428>