On a RHEL 6.2 system here’s what happens.
Simple dummy code:
int main(int argc, char **argv)
{
return 0;
}
PGI 10.9 works:
(35%) pgcc -V
pgcc 10.9-0 64-bit target on x86-64 Linux -tp nehalem-64
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
(36%) pgcc -Bstatic -o foo foo.c
(37%) ./foo
PGI 12.6 fails:
(39%) pgcc -V
pgcc 12.6-0 64-bit target on x86-64 Linux -tp sandybridge
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc. All Rights Reserved.
(40%) pgcc -Bstatic -o foo foo.c
/usr/lib64/libpthread.a(libpthread.o): In function `sem_open':
(.text+0x760d): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie