summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Simberg <mikael.simberg@iki.fi>2022-03-30 09:14:03 +0200
committerGitHub <noreply@github.com>2022-03-30 09:14:03 +0200
commite58ac0705d658bcd906e0334c5259fd58f5f53f4 (patch)
treeb46039668d6f4ec503aa0c2d81d8e73ee3d67c27
parent0182e39d44afbe0136d5c7a5a780a8a1ec7453ea (diff)
downloadspack-e58ac0705d658bcd906e0334c5259fd58f5f53f4.tar.gz
spack-e58ac0705d658bcd906e0334c5259fd58f5f53f4.tar.bz2
spack-e58ac0705d658bcd906e0334c5259fd58f5f53f4.tar.xz
spack-e58ac0705d658bcd906e0334c5259fd58f5f53f4.zip
Add patch to fix compilation of boost with compilers not in path (#29718)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
-rw-r--r--var/spack/repos/builtin/packages/boost/bootstrap-compiler.patch13
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py3
2 files changed, 16 insertions, 0 deletions
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