Skip to content

Commit

Permalink
boost: Add patch to workaround mpl compiler error with gcc 8.3 and c+…
Browse files Browse the repository at this point in the history
…+17. (spack#39144)

Works around this issue: boostorg/mpl#44

Co-authored-by: psakievich <psakiev@sandia.gov>
  • Loading branch information
vbrunini and psakievich authored Feb 13, 2024
1 parent c048101 commit e4c8714
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
61 changes: 61 additions & 0 deletions var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
--- a/boost/mpl/quote.hpp 2022-09-29 11:47:28.395587000 -0600
+++ b/boost/mpl/quote.hpp 2022-09-29 11:47:35.363536000 -0600
@@ -119,7 +119,7 @@
#define i_ BOOST_PP_FRAME_ITERATION(1)

template<
- template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F
+ template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F
, typename Tag = void_
>
struct BOOST_PP_CAT(quote,i_)

--- a/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:39:47.776457000 -0600
+++ b/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:40:15.807044000 -0600
@@ -24,7 +24,7 @@
};

template<
- template< typename P1 > class F
+ template< typename T1 > class F
, typename Tag = void_
>
struct quote1
@@ -41,7 +41,7 @@
};

template<
- template< typename P1, typename P2 > class F
+ template< typename T1, typename T2 > class F
, typename Tag = void_
>
struct quote2
@@ -58,7 +58,7 @@
};

template<
- template< typename P1, typename P2, typename P3 > class F
+ template< typename T1, typename T2, typename T3 > class F
, typename Tag = void_
>
struct quote3
@@ -75,7 +75,7 @@
};

template<
- template< typename P1, typename P2, typename P3, typename P4 > class F
+ template< typename T1, typename T2, typename T3, typename T4 > class F
, typename Tag = void_
>
struct quote4
@@ -96,8 +96,8 @@

template<
template<
- typename P1, typename P2, typename P3, typename P4
- , typename P5
+ typename T1, typename T2, typename T3, typename T4
+ , typename T5
>
class F
, typename Tag = void_
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/boost/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ def libs(self):
# Patch to workaround compiler bug
patch("nvhpc-find_address.patch", when="@1.75.0:1.76%nvhpc")

# Patch to workaround gcc-8.3 compiler issue https://github.com/boostorg/mpl/issues/44
patch("boost_gcc83_cpp17_fix.patch", when="@1.69:%gcc@8.3")

# Fix for version comparison on newer Clang on darwin
# See: https://github.com/boostorg/build/issues/440
# See: https://github.com/macports/macports-ports/pull/6726
Expand Down

0 comments on commit e4c8714

Please sign in to comment.