summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2021-07-20 05:50:51 -0400
committerGitHub <noreply@github.com>2021-07-20 11:50:51 +0200
commitd580c5506c2b1f25a1531b94c1d12e90dc428964 (patch)
treea8f44dbb84f025f2886276e396987d8e4434722a
parent0bf5156cafeec1aa92bbf226138f6dd700d31e32 (diff)
downloadspack-d580c5506c2b1f25a1531b94c1d12e90dc428964.tar.gz
spack-d580c5506c2b1f25a1531b94c1d12e90dc428964.tar.bz2
spack-d580c5506c2b1f25a1531b94c1d12e90dc428964.tar.xz
spack-d580c5506c2b1f25a1531b94c1d12e90dc428964.zip
boost: Allow building with GCC on macOS (#24895)
-rw-r--r--var/spack/repos/builtin/packages/boost/context-macho-gcc.patch22
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py5
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch b/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch
new file mode 100644
index 0000000000..f36f86a2eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch
@@ -0,0 +1,22 @@
+diff --git a/build/Jamfile.v2 b/build/Jamfile.v2
+index eb83bbb..8d8dac8 100644
+--- a/libs/context/build/Jamfile.v2
++++ b/libs/context/build/Jamfile.v2
+@@ -646,6 +646,17 @@ alias asm_sources
+ <toolset>clang
+ ;
+
++alias asm_sources
++ : asm/make_x86_64_sysv_macho_gas.S
++ asm/jump_x86_64_sysv_macho_gas.S
++ asm/ontop_x86_64_sysv_macho_gas.S
++ : <abi>sysv
++ <address-model>64
++ <architecture>x86
++ <binary-format>mach-o
++ <toolset>gcc
++ ;
++
+ alias asm_sources
+ : asm/make_x86_64_sysv_macho_gas.S
+ asm/jump_x86_64_sysv_macho_gas.S
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 411e20596b..2b6e587b57 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -277,6 +277,11 @@ class Boost(Package):
# and https://github.com/spack/spack/pull/21408
patch("bootstrap-toolset.patch", when="@1.75")
+ # Allow building context asm sources with GCC on Darwin
+ # See https://github.com/spack/spack/pull/24889
+ # and https://github.com/boostorg/context/issues/177
+ patch("context-macho-gcc.patch", when="+context platform=darwin %gcc")
+
def patch(self):
# Disable SSSE3 and AVX2 when using the NVIDIA compiler
if self.spec.satisfies('%nvhpc'):