PGI 11.10 and 12.1 fail to compile C++ codes with -lstdc++

We have a c++ code that requires the standard library. It will compile under PGI 10.9 but fails with PGI 11.10 and now PGI 12.1.

Here is a simple test code reproducer (test.cpp):

#include
int
main ()
{
std::string foo = “Hello, world”
;
return 0;
}

If you compile under PGI 10.9 it will work but fails with this error message under 11.10 and 12.1:


(dog@mu-fe1 22%) pgCC -lstdc++ test.cpp
/usr/projects/hpcsoft/common/pgi/linux86-64/12.1/lib/libCz.a(eh_util.o): In function std::uncaught_exception(void)': eh_util.c:(.text+0x1f7): undefined reference to __zceh_uncaught_exception’

(dog@mu-fe1 23%) pgCC --version

pgCC 12.1-0 64-bit target on x86-64 Linux -tp istanbul
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc. All Rights Reserved.
(dog@mu-fe1 24%)


Any ideas on why?

Sorry, I forgot to mention that this is on a RHEL6.1 system.

-david

pgCC test.cpp
is all you need to compile this test.
We always compile and link with our STL.
-lstdc++ is the gnu stl. This is not required, and is not compatible with pgCC.

pgCC -lstdc++ test.cpp happened to work under version 10.9 because we used a
non gnu style of exception handling, so it never resolved any references from that library.