From e58ac0705d658bcd906e0334c5259fd58f5f53f4 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 30 Mar 2022 09:14:03 +0200 Subject: Add patch to fix compilation of boost with compilers not in path (#29718) Co-authored-by: Mikael Simberg --- .../repos/builtin/packages/boost/bootstrap-compiler.patch | 13 +++++++++++++ var/spack/repos/builtin/packages/boost/package.py | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/bootstrap-compiler.patch diff --git a/var/spack/repos/builtin/packages/boost/bootstrap-compiler.patch b/var/spack/repos/builtin/packages/boost/bootstrap-compiler.patch new file mode 100644 index 0000000000..6bc1a1257c --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/bootstrap-compiler.patch @@ -0,0 +1,13 @@ +diff --git a/bootstrap.sh b/bootstrap.sh +index 654801e21f..3331483aa5 100755 +--- a/bootstrap.sh ++++ b/bootstrap.sh +@@ -226,7 +226,7 @@ rm -f config.log + if test "x$BJAM" = x; then + $ECHO "Building B2 engine.." + pwd=`pwd` +- CXX= CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh" ${TOOLSET} ++ CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh" ${TOOLSET} --cxx="$CXX" + if [ $? -ne 0 ]; then + echo + echo "Failed to build B2 build engine" diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 83b2012d3d..3b5e83813a 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -301,6 +301,9 @@ class Boost(Package): # and https://github.com/spack/spack/pull/21408 patch("bootstrap-toolset.patch", when="@1.75") + # Fix compiler used for building bjam during bootstrap + patch("bootstrap-compiler.patch", when="@1.76:") + # 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 -- cgit v1.2.3-60-g2f50