[petsc-dev] Configure LD flags

Stefano Zampini stefano.zampini at gmail.com
Sun Sep 15 04:11:37 CDT 2019


I don't understand the separation of concerns for the configure variables
LDFLAGS LIBS

Also, are LDFLAGS for the shared linker only, or for creating the final
executable
How one can specify flags for the shared linker that are not used for
creating the dynamic executable (and viceversa)?

This is because, with Cray wrappers, we need to pass LDFLAGS=-dynamic at
configure time.
Then, when configuring HYPRE, LDFLAGS are passed and used for the shared
linker, resulting in an error when creating libHYPRE.so

cc -shared -o libHYPRE.so ...a bunch of .o files.... ...libraries....
-dynamic

The -dynamic at the end makes cc think it is creating an executable,  and
fail for missing main.

-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190915/bf157780/attachment.html>


More information about the petsc-dev mailing list