Skip to content
Permalink
Browse files
feat: add aarch64-rhel build support
  • Loading branch information
diannasoreil authored and kocolosk committed Feb 7, 2022
1 parent 7c7eb6d commit 9387f4fdc4c1013fb32bb8442147988a529df7f0
Showing 3 changed files with 39 additions and 2 deletions.
@@ -148,6 +148,14 @@ centos8: SPIDERMONKEY_DEV=mozjs60-devel
centos8: SM_VER=60
centos8: sm-ver-rpm make-rpmbuild centos

# aarch64 RHEL-based
aarch64-rhel: DIST=rhel
# Needs 68 for aarch compat, we're using the included one here
aarch64-rhel: SPIDERMONKEY=couch-js-68
aarch64-rhel: SPIDERMONKEY_DEV=couch-js-68-devel
aarch64-rhel: SM_VER=68
aarch64-rhel: sm-ver-rpm make-rpmbuild centos

openSUSE: centos7


@@ -0,0 +1,23 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 5 Mar 2020 16:36:42 +0300
Subject: [PATCH] Build with SpiderMonkey 60 on ARM 64

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

diff --git a/configure b/configure
index 38e62e317..995b537f8 100755
--- a/configure
+++ b/configure
@@ -178,12 +178,6 @@ parse_opts() {

parse_opts $@

-if [ "${ARCH}" = "aarch64" ] && [ "${SM_VSN}" != "1.8.5" ]
-then
- echo "ERROR: SpiderMonkey 60 is known broken on ARM 64 (aarch64). Use 1.8.5 instead."
- exit 1
-fi
-
echo "==> configuring couchdb in rel/couchdb.config"
cat > rel/couchdb.config << EOF
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -28,10 +28,11 @@ Prefix: %{prefix}
Group: Applications/Databases
URL: https://couchdb.apache.org/
Vendor: The Apache Software Foundation
BuildArch: x86_64 ppc64le
ExclusiveArch: x86_64 ppc64le
BuildArch: x86_64 ppc64le aarch64
ExclusiveArch: x86_64 ppc64le aarch64
Exclusiveos: linux
Packager: CouchDB Developers <dev@couchdb.apache.org>
Patch1: 0001-build-with-sm68-on-aarch64.patch

%if 0%{?suse_version}
BuildRequires: erlang
@@ -92,6 +93,11 @@ languages and environments.
# NOTE: Stripping binaries causes issues so we skip it.
%define __os_install_post %{nil}

%prep
%ifarch aarch64
%patch01 -p1
%endif

%build
./configure --spidermonkey-version=%SM_VER%
%{__make} release

0 comments on commit 9387f4f

Please sign in to comment.