summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch')
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch290
1 files changed, 290 insertions, 0 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