summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch')
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch250
1 files changed, 250 insertions, 0 deletions
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 {}
+