summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'):