summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch290
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch250
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py7
3 files changed, 546 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch
new file mode 100644
index 0000000000..925592e321
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch
@@ -0,0 +1,290 @@
+diff -uNr boost_1_63_0/boost/mpl/assert.hpp boost_1_63_0/boost/mpl/assert.hpp
+--- boost_1_63_0/boost/mpl/assert.hpp 2016-12-22 07:33:17.000000000 -0500
++++ boost_1_63_0/boost/mpl/assert.hpp 2017-05-31 20:09:43.704689605 -0400
+@@ -56,7 +56,7 @@
+ // and GCC (which issues "unused variable" warnings when static constants are used
+ // at a function scope)
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
+- || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)
++ || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
+ # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
+ #else
+ # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
+diff -uNr boost_1_63_0/boost/type_traits/is_floating_point.hpp boost_1_63_0/boost/type_traits/is_floating_point.hpp
+--- boost_1_63_0/boost/type_traits/is_floating_point.hpp 2016-12-22 07:33:20.000000000 -0500
++++ boost_1_63_0/boost/type_traits/is_floating_point.hpp 2017-05-31 20:12:50.187001957 -0400
+@@ -20,8 +20,9 @@
+ template<> struct is_floating_point<float> : public true_type{};
+ template<> struct is_floating_point<double> : public true_type{};
+ template<> struct is_floating_point<long double> : public true_type{};
+-
+-#if defined(BOOST_HAS_FLOAT128)
++
++// In PGI compiler, __float128 is a typedef, not its own type.
++#if defined(BOOST_HAS_FLOAT128) && !defined(__PGI)
+ template<> struct is_floating_point<__float128> : public true_type{};
+ #endif
+
+diff -uNr boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp
+--- boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp 2016-12-22 07:33:20.000000000 -0500
++++ boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp 2017-05-31 20:11:12.365788989 -0400
+@@ -98,11 +98,7 @@
+ };
+
+ public:
+- functor()
+-#if defined(__PGI)
+- : eof()
+-#endif
+- {}
++ functor() {}
+
+ #if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+ // somehow VC7.1 needs this (meaningless) assignment operator
+diff -uNr boost_1_63_0/boost/cstdint.hpp boost_1_63_0/boost/cstdint.hpp
+--- boost_1_63_0/boost/cstdint.hpp 2016-12-22 07:33:14.000000000 -0500
++++ boost_1_63_0/boost/cstdint.hpp 2017-05-31 20:04:52.821068853 -0400
+@@ -367,9 +367,6 @@
+ #include <stddef.h>
+ #endif
+
+-// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config.
+-#if !defined(__PGIC__)
+-
+ #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \
+ || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
+ || defined(__CYGWIN__) \
+@@ -393,8 +390,6 @@
+
+ #endif
+
+-#endif // !defined(__PGIC__)
+-
+ #endif // BOOST_CSTDINT_HPP
+
+
+diff -uNr boost_1_63_0/libs/filesystem/src/operations.cpp boost_1_63_0/libs/filesystem/src/operations.cpp
+--- boost_1_63_0/libs/filesystem/src/operations.cpp 2016-12-22 07:33:15.000000000 -0500
++++ boost_1_63_0/libs/filesystem/src/operations.cpp 2017-05-31 20:06:26.492231150 -0400
+@@ -2051,10 +2051,6 @@
+ return ok;
+ }
+
+-#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
+-#define dirent dirent64
+-#endif
+-
+ error_code dir_itr_first(void *& handle, void *& buffer,
+ const char* dir, string& target,
+ fs::file_status &, fs::file_status &)
+diff -uNr boost_1_63_0/tools/build/src/engine/boehm_gc/configure boost_1_63_0/tools/build/src/engine/boehm_gc/configure
+--- boost_1_63_0/tools/build/src/engine/boehm_gc/configure 2016-12-22 07:33:21.000000000 -0500
++++ boost_1_63_0/tools/build/src/engine/boehm_gc/configure 2017-05-31 13:02:25.089265415 -0400
+@@ -9286,7 +9286,7 @@
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
++ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+@@ -9722,7 +9722,7 @@
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+- pgcc*) # Portland Group C compiler
++ pgcc* | pgc++*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+@@ -13421,7 +13421,7 @@
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+- pgCC*)
++ pgc++*)
+ # Portland Group C++ compiler
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+@@ -14098,7 +14098,7 @@
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+- pgCC*)
++ pgc++*)
+ # Portland Group C++ compiler.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+@@ -15812,7 +15812,7 @@
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-static'
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
++ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl_F77='-Wl,'
+@@ -16248,7 +16248,7 @@
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+- pgcc*) # Portland Group C compiler
++ pgcc* | pgc++*) # Portland Group C compiler
+ whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+@@ -18386,7 +18386,7 @@
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-static'
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
++ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+@@ -18822,7 +18822,7 @@
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+- pgcc*) # Portland Group C compiler
++ pgcc* | pgc++*) # Portland Group C compiler
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+diff -uNr boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4
+--- boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 2016-12-22 07:33:21.000000000 -0500
++++ boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 2017-05-31 13:02:56.629643895 -0400
+@@ -3325,7 +3325,7 @@
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+- pgCC*)
++ pgc++*)
+ # Portland Group C++ compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+@@ -4977,7 +4977,7 @@
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+- pgCC*)
++ pgc++*)
+ # Portland Group C++ compiler.
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+@@ -5225,7 +5225,7 @@
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
++ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+diff -uNr boost_1_63_0/tools/build/src/tools/pgi.jam boost_1_63_0/tools/build/src/tools/pgi.jam
+--- boost_1_63_0/tools/build/src/tools/pgi.jam 2016-12-22 07:33:21.000000000 -0500
++++ boost_1_63_0/tools/build/src/tools/pgi.jam 2017-05-31 20:25:19.726296130 -0400
+@@ -25,7 +25,7 @@
+ {
+ local condition = [ common.check-init-parameters pgi : version $(version) ] ;
+
+- local l_command = [ common.get-invocation-command pgi : pgCC : $(command) ] ;
++ local l_command = [ common.get-invocation-command pgi : pgc++ : $(command) ] ;
+
+ common.handle-options pgi : $(condition) : $(l_command) : $(options) ;
+
+@@ -36,17 +36,10 @@
+ flags pgi.compile DEFINES $(condition) :
+ [ feature.get-values <define> : $(options) ] : unchecked ;
+
+- # IOV_MAX support
+- flags pgi.compile DEFINES $(condition) : __need_IOV_MAX : unchecked ;
+-
+ # set link flags
+ flags pgi.link FINDLIBS-ST : [
+ feature.get-values <find-static-library> : $(options) ] : unchecked ;
+
+- # always link lib rt to resolve clock_gettime()
+- flags pgi.link FINDLIBS-SA : rt [
+- feature.get-values <find-shared-library> : $(options) ] : unchecked ;
+-
+ gcc.init-link-flags pgi gnu $(condition) ;
+ }
+
+@@ -56,18 +49,19 @@
+ generators.register-fortran-compiler pgi.compile.fortran : FORTRAN : OBJ : <toolset>pgi ;
+
+ # Declare flags and actions for compilation
+-flags pgi.compile OPTIONS : -Kieee ;
+-flags pgi.compile OPTIONS <link>shared : -fpic -fPIC ;
++flags pgi.compile OPTIONS <link>shared : -fpic ;
+ flags pgi.compile OPTIONS <debug-symbols>on : -gopt ;
+-flags pgi.compile OPTIONS <profiling>on : -xprofile=tcov ;
+-flags pgi.compile OPTIONS <optimization>speed : -fast -Mx,8,0x10000000 ;
+-flags pgi.compile OPTIONS <optimization>space : -xO2 -xspace ;
+-# flags pgi.compile OPTIONS <threading>multi : -mt ;
++flags pgi.compile OPTIONS <optimization>off : -O0 ;
++flags pgi.compile OPTIONS <optimization>speed : -fast ;
++flags pgi.compile OPTIONS <optimization>space : -fast ;
+
+ flags pgi.compile OPTIONS <warnings>off : -Minform=severe ;
+ flags pgi.compile OPTIONS <warnings>on : -Minform=warn ;
++flags pgi.compile OPTIONS <warnings-as-errors>on : -Werror ;
+
+ flags pgi.compile.c++ OPTIONS <inlining>off : -INLINE:none ;
++flags pgi.compile.c++ OPTIONS <rtti>off : --no_rtti ;
++flags pgi.compile.c++ OPTIONS <exception-handling>off : --no_exceptions ;
+
+ flags pgi.compile OPTIONS <cflags> ;
+ flags pgi.compile.c++ OPTIONS <cxxflags> ;
+@@ -95,9 +89,8 @@
+ flags pgi.link OPTIONS <debug-symbols>on : -gopt ;
+ # Strip the binary when no debugging is needed
+ flags pgi.link OPTIONS <debug-symbols>off : -s ;
+-flags pgi.link OPTIONS <profiling>on : -xprofile=tcov ;
+ flags pgi.link OPTIONS <linkflags> ;
+-flags pgi.link OPTIONS <link>shared : -fpic -fPIC ;
++flags pgi.link OPTIONS <link>shared : -fpic ;
+ flags pgi.link LINKPATH <library-path> ;
+ flags pgi.link FINDLIBS-ST <find-static-library> ;
+ flags pgi.link FINDLIBS-SA <find-shared-library> ;
+@@ -107,24 +100,14 @@
+ flags pgi.link LINK-RUNTIME <runtime-link>shared : dynamic ;
+ flags pgi.link RPATH <dll-path> ;
+
+-# On gcc, there are separate options for dll path at runtime and
+-# link time. On Solaris, there's only one: -R, so we have to use
+-# it, even though it's bad idea.
+-flags pgi.link RPATH <xdll-path> ;
+-
+ rule link ( targets * : sources * : properties * )
+ {
+ SPACE on $(targets) = " " ;
+ }
+
+-# reddish can only link statically and, somehow, the presence of -Bdynamic on the link line
+-# marks the executable as a dynamically linked exec even though no dynamic libraries are supplied.
+-# Yod on redstorm refuses to load an executable that is dynamically linked.
+-# removing the dynamic link options should get us where we need to be on redstorm.
+-# "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
+ actions link bind LIBRARIES
+ {
+- "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bstatic -l$(FINDLIBS-ST) -Bdynamic -l$(FINDLIBS-SA) -B$(LINK-RUNTIME)
++ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
+ }
+
+ # Slight mods for dlls
+@@ -133,11 +116,10 @@
+ SPACE on $(targets) = " " ;
+ }
+
+-# "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" -h$(<[1]:D=) -G "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
+
+ actions link.dll bind LIBRARIES
+ {
+- "$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" -Wl,-h -Wl,$(<[1]:D=) "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
++ "$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+ }
+
+ actions updated together piecemeal pgi.archive
diff --git a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch
new file mode 100644
index 0000000000..3bfb989f80
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch
@@ -0,0 +1,250 @@
+diff -uNr boost_1_63_0/boost/archive/archive_exception.hpp boost_1_63_0/boost/archive/archive_exception.hpp
+--- boost_1_63_0/boost/archive/archive_exception.hpp 2016-12-22 07:33:19.000000000 -0500
++++ boost_1_63_0/boost/archive/archive_exception.hpp 2017-06-01 22:07:26.013983567 -0400
+@@ -42,13 +42,6 @@
+ class BOOST_SYMBOL_VISIBLE archive_exception :
+ public virtual std::exception
+ {
+-private:
+- char m_buffer[128];
+-protected:
+- BOOST_ARCHIVE_DECL unsigned int
+- append(unsigned int l, const char * a);
+- BOOST_ARCHIVE_DECL
+- archive_exception() BOOST_NOEXCEPT;
+ public:
+ typedef enum {
+ no_exception, // initialized without code
+@@ -90,6 +83,15 @@
+ BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ;
+ virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
+ virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ;
++protected:
++ BOOST_ARCHIVE_DECL unsigned int
++ append(unsigned int l, const char * a);
++ BOOST_ARCHIVE_DECL
++ archive_exception() BOOST_NOEXCEPT;
++private:
++ char m_buffer[128];
++ BOOST_ARCHIVE_DECL void
++ pgi_bug_workaround_init(archive_exception *, const char *, const char *);
+ };
+
+ }// namespace archive
+diff -uNr boost_1_63_0/boost/archive/xml_archive_exception.hpp boost_1_63_0/boost/archive/xml_archive_exception.hpp
+--- boost_1_63_0/boost/archive/xml_archive_exception.hpp 2016-12-22 07:33:19.000000000 -0500
++++ boost_1_63_0/boost/archive/xml_archive_exception.hpp 2017-05-31 21:02:03.373700156 -0400
+@@ -47,6 +47,9 @@
+ );
+ BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ;
+ virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
++private:
++ BOOST_ARCHIVE_DECL void
++ pgi_bug_workaround_init_xml(xml_archive_exception *, exception_code, const char *, const char *);
+ };
+
+ }// namespace archive
+diff -uNr boost_1_63_0/libs/serialization/src/archive_exception.cpp boost_1_63_0/libs/serialization/src/archive_exception.cpp
+--- boost_1_63_0/libs/serialization/src/archive_exception.cpp 2016-12-22 07:33:19.000000000 -0500
++++ boost_1_63_0/libs/serialization/src/archive_exception.cpp 2017-06-01 22:06:14.193128909 -0400
+@@ -37,83 +37,90 @@
+ }
+
+ BOOST_ARCHIVE_DECL
+-archive_exception::archive_exception(
+- exception_code c,
+- const char * e1,
+- const char * e2
+-) BOOST_NOEXCEPT :
+- code(c)
++void
++archive_exception::pgi_bug_workaround_init(archive_exception *new_object, const char *e1, const char *e2)
+ {
+ unsigned int length = 0;
+- switch(code){
++ switch(new_object->code){
+ case no_exception:
+- length = append(length, "uninitialized exception");
++ length = new_object->append(length, "uninitialized exception");
+ break;
+- case unregistered_class:
+- length = append(length, "unregistered class");
++ case archive_exception::unregistered_class:
++ length = new_object->append(length, "unregistered class");
+ if(NULL != e1){
+- length = append(length, " - ");
+- length = append(length, e1);
++ length = new_object->append(length, " - ");
++ length = new_object->append(length, e1);
+ }
+ break;
+ case invalid_signature:
+- length = append(length, "invalid signature");
++ length = new_object->append(length, "invalid signature");
+ break;
+ case unsupported_version:
+- length = append(length, "unsupported version");
++ length = new_object->append(length, "unsupported version");
+ break;
+ case pointer_conflict:
+- length = append(length, "pointer conflict");
++ length = new_object->append(length, "pointer conflict");
+ break;
+ case incompatible_native_format:
+- length = append(length, "incompatible native format");
++ length = new_object->append(length, "incompatible native format");
+ if(NULL != e1){
+- length = append(length, " - ");
+- length = append(length, e1);
++ length = new_object->append(length, " - ");
++ length = new_object->append(length, e1);
+ }
+ break;
+ case array_size_too_short:
+- length = append(length, "array size too short");
++ length = new_object->append(length, "array size too short");
+ break;
+ case input_stream_error:
+- length = append(length, "input stream error");
++ length = new_object->append(length, "input stream error");
+ break;
+ case invalid_class_name:
+- length = append(length, "class name too long");
++ length = new_object->append(length, "class name too long");
+ break;
+ case unregistered_cast:
+- length = append(length, "unregistered void cast ");
+- length = append(length, (NULL != e1) ? e1 : "?");
+- length = append(length, "<-");
+- length = append(length, (NULL != e2) ? e2 : "?");
++ length = new_object->append(length, "unregistered void cast ");
++ length = new_object->append(length, (NULL != e1) ? e1 : "?");
++ length = new_object->append(length, "<-");
++ length = new_object->append(length, (NULL != e2) ? e2 : "?");
+ break;
+ case unsupported_class_version:
+- length = append(length, "class version ");
+- length = append(length, (NULL != e1) ? e1 : "<unknown class>");
++ length = new_object->append(length, "class version ");
++ length = new_object->append(length, (NULL != e1) ? e1 : "<unknown class>");
+ break;
+ case other_exception:
+ // if get here - it indicates a derived exception
+ // was sliced by passing by value in catch
+- length = append(length, "unknown derived exception");
++ length = new_object->append(length, "unknown derived exception");
+ break;
+ case multiple_code_instantiation:
+- length = append(length, "code instantiated in more than one module");
++ length = new_object->append(length, "code instantiated in more than one module");
+ if(NULL != e1){
+- length = append(length, " - ");
+- length = append(length, e1);
++ length = new_object->append(length, " - ");
++ length = new_object->append(length, e1);
+ }
+ break;
+ case output_stream_error:
+- length = append(length, "output stream error");
++ length = new_object->append(length, "output stream error");
+ break;
+ default:
+ BOOST_ASSERT(false);
+- length = append(length, "programming error");
++ length = new_object->append(length, "programming error");
+ break;
+ }
+ }
+
+ BOOST_ARCHIVE_DECL
++archive_exception::archive_exception(
++ exception_code c,
++ const char * e1,
++ const char * e2
++) BOOST_NOEXCEPT :
++ code(c)
++{
++ pgi_bug_workaround_init(this, e1, e2);
++}
++
++BOOST_ARCHIVE_DECL
+ archive_exception::archive_exception(archive_exception const & oth) BOOST_NOEXCEPT :
+ std::exception(oth),
+ code(oth.code)
+diff -uNr boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp
+--- boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp 2016-12-22 07:33:19.000000000 -0500
++++ boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp 2017-05-31 20:58:15.650876427 -0400
+@@ -26,41 +26,48 @@
+ namespace archive {
+
+ BOOST_ARCHIVE_DECL
++void
++xml_archive_exception::pgi_bug_workaround_init_xml(xml_archive_exception *new_object, exception_code c, const char *e1, const char *e2)
++{
++ switch(c){
++ case xml_archive_parsing_error:
++ new_object->append(0, "unrecognized XML syntax");
++ break;
++ case xml_archive_tag_mismatch:{
++ unsigned int l;
++ l = new_object->append(0, "XML start/end tag mismatch");
++ if(NULL != e1){
++ l = new_object->append(l, " - ");
++ new_object->append(l, e1);
++ }
++ break;
++ }
++ case xml_archive_tag_name_error:
++ new_object->append(0, "Invalid XML tag name");
++ break;
++ default:
++ BOOST_ASSERT(false);
++ new_object->append(0, "programming error");
++ break;
++ }
++}
++
++BOOST_ARCHIVE_DECL
+ xml_archive_exception::xml_archive_exception(
+ exception_code c,
+ const char * e1,
+ const char * e2
+ ) :
+ archive_exception(other_exception, e1, e2)
+- {
+- switch(c){
+- case xml_archive_parsing_error:
+- archive_exception::append(0, "unrecognized XML syntax");
+- break;
+- case xml_archive_tag_mismatch:{
+- unsigned int l;
+- l = archive_exception::append(0, "XML start/end tag mismatch");
+- if(NULL != e1){
+- l = archive_exception::append(l, " - ");
+- archive_exception::append(l, e1);
+- }
+- break;
+- }
+- case xml_archive_tag_name_error:
+- archive_exception::append(0, "Invalid XML tag name");
+- break;
+- default:
+- BOOST_ASSERT(false);
+- archive_exception::append(0, "programming error");
+- break;
+- }
+- }
++{
++ pgi_bug_workaround_init_xml(this, c, e1, e2);
++}
+
+ BOOST_ARCHIVE_DECL
+ xml_archive_exception::xml_archive_exception(xml_archive_exception const & oth) :
+ archive_exception(oth)
+- {
+- }
++{
++}
+
+ BOOST_ARCHIVE_DECL xml_archive_exception::~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
+
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 9ac2d7e2ab..4076b61ed8 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -150,6 +150,10 @@ class Boost(Package):
patch('call_once_variadic.patch', when='@:1.56.0%gcc@5:')
+ # Patch fix for PGI compiler
+ patch('boost_1.63.0_pgi.patch', when='@1.63.0%pgi')
+ patch('boost_1.63.0_pgi_17.4_workaround.patch', when='@1.63.0%pgi@17.4')
+
def url_for_version(self, version):
url = "http://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2"
return url.format(version.dotted, version.underscored)
@@ -162,7 +166,8 @@ class Boost(Package):
'icpc': 'intel',
'clang++': 'clang',
'xlc++': 'xlcpp',
- 'xlc++_r': 'xlcpp'}
+ 'xlc++_r': 'xlcpp',
+ 'pgc++': 'pgi'}
if spec.satisfies('@1.47:'):
toolsets['icpc'] += '-linux'