intel-tbb: patch for arm64 on macOS (#20039)
* intel-tbb: patch for arm64 on macOS as submitted upstream and used in homebrew * intel-tbb: check patchable versions * intel-tbb: avoid patch breakage when 2021.1 is released 2021.1-beta05 would be considered newer than 2021.1
This commit is contained in:
parent
8b2c7a6c65
commit
b33969598a
32
var/spack/repos/builtin/packages/intel-tbb/macos-arm64.patch
Normal file
32
var/spack/repos/builtin/packages/intel-tbb/macos-arm64.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 86f6dcdc17a8f5ef2382faaef860cfa5243984fe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yining Karl Li <betajippity@gmail.com>
|
||||||
|
Date: Fri, 3 Jul 2020 06:23:18 -0700
|
||||||
|
Subject: [PATCH] Add detection of arm64 architecture for macos builds
|
||||||
|
|
||||||
|
This commit adds detection of arm64 for macos builds on arm64 hardware.
|
||||||
|
The only change necessary is an additional case in the code where
|
||||||
|
macos.inc queries and detects the system architecture.
|
||||||
|
---
|
||||||
|
build/macos.inc | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/build/macos.inc b/build/macos.inc
|
||||||
|
index dde93216f5e7a9337dd83757df1ec734241d044e..2bdcde7e3042390b871fc601a930b3648ccaa124 100644
|
||||||
|
--- a/build/macos.inc
|
||||||
|
+++ b/build/macos.inc
|
||||||
|
@@ -36,11 +36,15 @@ ifndef arch
|
||||||
|
export arch:=ppc32
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
+ ifeq ($(shell /usr/sbin/sysctl -n hw.machine),arm64)
|
||||||
|
+ export arch:=arm64
|
||||||
|
+ else
|
||||||
|
ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
|
||||||
|
export arch:=intel64
|
||||||
|
else
|
||||||
|
export arch:=ia32
|
||||||
|
endif
|
||||||
|
+ endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
@ -103,15 +103,21 @@ class IntelTbb(Package):
|
|||||||
patch("gcc_generic-pedantic-4.4.patch", level=1, when='@:2019.0')
|
patch("gcc_generic-pedantic-4.4.patch", level=1, when='@:2019.0')
|
||||||
|
|
||||||
# Patch cmakeConfig.cmake.in to find the libraries where we install them.
|
# Patch cmakeConfig.cmake.in to find the libraries where we install them.
|
||||||
patch("tbb_cmakeConfig-2019.5.patch", level=0, when='@2019.5:')
|
patch("tbb_cmakeConfig-2019.5.patch", level=0, when='@2019.5:2021.0')
|
||||||
patch("tbb_cmakeConfig.patch", level=0, when='@2017.7:2019.4')
|
patch("tbb_cmakeConfig.patch", level=0, when='@2017.7:2019.4')
|
||||||
|
|
||||||
# Restore the debug targets.
|
# Restore the debug targets.
|
||||||
patch("makefile-debug.patch", when="@2020:")
|
patch("makefile-debug.patch", when="@2020:2021.0")
|
||||||
|
|
||||||
# Some very old systems don't support transactional memory.
|
# Some very old systems don't support transactional memory.
|
||||||
patch("disable-tm.patch", when='~tm')
|
patch("disable-tm.patch", when='~tm')
|
||||||
|
|
||||||
|
# Add support for building on arm64 macOS,
|
||||||
|
# also included in hombrew and already available upstream:
|
||||||
|
# https://github.com/oneapi-src/oneTBB/pull/258
|
||||||
|
# https://github.com/oneapi-src/oneTBB/commit/86f6dcdc17a8f5ef2382faaef860cfa5243984fe.patch?full_index=1
|
||||||
|
patch("macos-arm64.patch", when="@:2021.0")
|
||||||
|
|
||||||
# Version and tar file names:
|
# Version and tar file names:
|
||||||
# 2020.0 --> v2020.0.tar.gz starting with 2020
|
# 2020.0 --> v2020.0.tar.gz starting with 2020
|
||||||
# 2017.1 --> 2017_U1.tar.gz starting with 2017
|
# 2017.1 --> 2017_U1.tar.gz starting with 2017
|
||||||
|
Loading…
Reference in New Issue
Block a user