summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2020-12-01 10:31:27 +0000
committerTim-Philipp Müller <tim@centricular.com>2021-01-13 01:06:14 +0000
commitabf3cfb0a48fc94f8c616e3dade8b509ca6d062c (patch)
treec5afa8ea700e6ca60af71abd55ceb13107a63a42
parent76115179a4b397beca2636e2776962adb63b7bd8 (diff)
openssl: add support for macOS arm64
Bump version to 1.1.1h that includes support for Apple silicon Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
-rw-r--r--recipes/openssl.recipe8
-rw-r--r--recipes/openssl/0001-Add-darwin64-arm64-cc-build-target.patch34
2 files changed, 40 insertions, 2 deletions
diff --git a/recipes/openssl.recipe b/recipes/openssl.recipe
index e6305cce..dd1827c2 100644
--- a/recipes/openssl.recipe
+++ b/recipes/openssl.recipe
@@ -8,11 +8,11 @@ class Recipe(recipe.Recipe):
# Note: openssl helpfully moves tarballs somewhere else (old/x.y.z/)
# whenever a new release comes out, so make sure to mirror to fdo when
# bumping the release!
- version = '1.1.1g'
+ version = '1.1.1h'
licenses = [{License.OPENSSL: ['LICENSE']}]
stype = SourceType.TARBALL
url = 'https://ftp.openssl.org/source/{0}-{1}.tar.gz'.format(name, version)
- tarball_checksum = 'ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46'
+ tarball_checksum = '5c9ca8774bd7b03e5784f26ae9e9e6d749c9da2438545077e6b3d755a06595d9'
deps = ['ca-certificates', 'zlib']
# Parallel make fails randomly due to undefined macros, probably races
allow_parallel_build = False
@@ -31,6 +31,8 @@ class Recipe(recipe.Recipe):
# https://github.com/openssl/openssl/pull/12400
'openssl/0001-crypto-win-Don-t-use-disallowed-APIs-on-UWP.patch',
'openssl/0002-win-onecore-Build-with-APPCONTAINER-for-UWP-compat.patch',
+ # https://github.com/openssl/openssl/pull/13476 '1.1.1i'
+ 'openssl/0001-Add-darwin64-arm64-cc-build-target.patch',
]
files_bins = ['openssl']
@@ -70,6 +72,8 @@ class Recipe(recipe.Recipe):
return 'darwin-i386-cc'
if self.config.target_arch == Architecture.X86_64:
return 'darwin64-x86_64-cc'
+ if self.config.target_arch == Architecture.ARM64:
+ return 'darwin64-arm64-cc'
raise InvalidRecipeError(self, "Unknown macOS platform")
if self.config.target_platform == Platform.LINUX:
if self.config.target_arch == Architecture.X86:
diff --git a/recipes/openssl/0001-Add-darwin64-arm64-cc-build-target.patch b/recipes/openssl/0001-Add-darwin64-arm64-cc-build-target.patch
new file mode 100644
index 00000000..697bf601
--- /dev/null
+++ b/recipes/openssl/0001-Add-darwin64-arm64-cc-build-target.patch
@@ -0,0 +1,34 @@
+From c3ff8d3f7281d613b392e6b8574da5b7cd7275b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= <felix.buenemann@gmail.com>
+Date: Sun, 22 Nov 2020 23:06:06 +0100
+Subject: [PATCH] Add darwin64-arm64-cc build target
+
+This adds support for the Apple Silicon M1 hardware on macOS Big Sur.
+
+CLA: trivial
+---
+ Configurations/10-main.conf | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
+index eb92c24..cea4feb 100644
+--- a/Configurations/10-main.conf
++++ b/Configurations/10-main.conf
+@@ -1557,6 +1557,14 @@ my %targets = (
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
+ perlasm_scheme => "macosx",
+ },
++ "darwin64-arm64-cc" => {
++ inherit_from => [ "darwin-common", asm("aarch64_asm") ],
++ CFLAGS => add("-Wall"),
++ cflags => add("-arch arm64"),
++ lib_cppflags => add("-DL_ENDIAN"),
++ bn_ops => "SIXTY_FOUR_BIT_LONG",
++ perlasm_scheme => "ios64",
++ },
+
+ ##### GNU Hurd
+ "hurd-x86" => {
+--
+2.23.0
+