the compiler pgfortran (at least versions 15.10 & 16.3) seem to be confused, when both, the -Bstatic and -Bdynamic options appear on the command line for the linking command. The command
pgfortran fxudriver.o module.o -o fxudriver -Bstatic -Llib -lfortyxima -Bdynamic
is not executed, but aborts with the error message
/usr/bin/ld: ..../16.3/linux86-64/16.3/lib/libpgmp.a(init_pthr.o): undefined reference to symbol '__tls_get_addr@@GLIBC_2.3' //lib/x86_64-linux-gnu/ld-linux-x86-64.so.2: error adding symbols: DSO missing from command line
Leaving away the -Bdynamic from the end would solve the problem, but it is automatically emitted by my build system. Also, according to the ld man-page, it is completely legid to use -Bstatic and -Bdynamic in one linker call.
Best regards, Bálint