diff --git a/src/tools/pgi.jam b/src/tools/pgi.jam index 95136c60e..5278ea288 100644 --- a/src/tools/pgi.jam +++ b/src/tools/pgi.jam @@ -1,4 +1,5 @@ # Copyright Noel Belcourt 2007. +# Copyright 2017, NVIDIA CORPORATION. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) @@ -36,17 +37,10 @@ rule init ( version ? : command * : options * ) flags pgi.compile DEFINES $(condition) : [ feature.get-values : $(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 : $(options) ] : unchecked ; - # always link lib rt to resolve clock_gettime() - flags pgi.link FINDLIBS-SA : rt [ - feature.get-values : $(options) ] : unchecked ; - gcc.init-link-flags pgi gnu $(condition) ; } @@ -56,18 +50,18 @@ generators.register-c-compiler pgi.compile.c++ : CPP : OBJ : pgi ; generators.register-fortran-compiler pgi.compile.fortran : FORTRAN : OBJ : pgi ; # Declare flags and actions for compilation -flags pgi.compile OPTIONS : -Kieee ; -flags pgi.compile OPTIONS shared : -fpic -fPIC ; +flags pgi.compile OPTIONS shared : -fpic ; flags pgi.compile OPTIONS on : -gopt ; -flags pgi.compile OPTIONS on : -xprofile=tcov ; -flags pgi.compile OPTIONS speed : -fast -Mx,8,0x10000000 ; -flags pgi.compile OPTIONS space : -xO2 -xspace ; -# flags pgi.compile OPTIONS multi : -mt ; +flags pgi.compile OPTIONS off : -O0 ; +flags pgi.compile OPTIONS speed : -fast ; +flags pgi.compile OPTIONS space : -fast ; flags pgi.compile OPTIONS off : -Minform=severe ; flags pgi.compile OPTIONS on : -Minform=warn ; +flags pgi.compile OPTIONS on : -Werror ; -flags pgi.compile.c++ OPTIONS off : -INLINE:none ; +flags pgi.compile.c++ OPTIONS off : --no_rtti ; +flags pgi.compile.c++ OPTIONS off : --no_exceptions ; flags pgi.compile OPTIONS ; flags pgi.compile.c++ OPTIONS ; @@ -95,9 +89,8 @@ actions compile.fortran flags pgi.link OPTIONS on : -gopt ; # Strip the binary when no debugging is needed flags pgi.link OPTIONS off : -s ; -flags pgi.link OPTIONS on : -xprofile=tcov ; flags pgi.link OPTIONS ; -flags pgi.link OPTIONS shared : -fpic -fPIC ; +flags pgi.link OPTIONS shared : -fpic ; flags pgi.link LINKPATH ; flags pgi.link FINDLIBS-ST ; flags pgi.link FINDLIBS-SA ; @@ -107,24 +100,14 @@ flags pgi.link LINK-RUNTIME static : static ; flags pgi.link LINK-RUNTIME shared : dynamic ; flags pgi.link RPATH ; -# 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 ; - 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,9 @@ rule link.dll ( targets * : sources * : properties * ) 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