From d580c5506c2b1f25a1531b94c1d12e90dc428964 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 20 Jul 2021 05:50:51 -0400 Subject: [PATCH] boost: Allow building with GCC on macOS (#24895) --- .../packages/boost/context-macho-gcc.patch | 22 +++++++++++++++++++ .../repos/builtin/packages/boost/package.py | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/context-macho-gcc.patch 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 + 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 ++ : sysv ++ 64 ++ x86 ++ mach-o ++ 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 @@ def libs(self): # 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'):