Hello,
Since 17.1, PGI compilers have changed their -V message to print out
PGI Compilers and Tools
Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
But while determining PIC flag for PGI compilers, m4/libtool.m4 file looks for “*Portland\ Group*” as seen here in line 4784 (http://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4#n4784)
*Intel*\ [[CF]]*Compiler*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
*Portland\ Group*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
As a result in certain situations the -fpic flag does not get set properly.
Let me know if you need more information.
Thank you.
Anh