Sujet : flang-new shared object linking
De : jahns (at) *nospam* idontlikespam.dkrz.de (Thomas Jahns)
Groupes : comp.lang.fortranDate : 07. Nov 2024, 13:41:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vgicip$2ljnv$1@dont-email.me>
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
Please excuse my asking about something that's not strictly Fortran the language but rather a very specific implementation. I figured this might be the place to find someone knowledgeable about this.
I've tried out the flang-new component of llvm 18.1.6 recently, but stumbled when building a shared library on RHEL 8 Linux: the library code from libFortranRuntime.a and libFortranDecimal.a is always pulled into the shared object. That probably is fine for a library intended to be used from other language code as a plugin for e.g. Python but rather impractical for a library meant to be used from a binary also built with flang-new. Besides adding unnecessary code to the build that also sets up everything needed for a later version conflict when the library built with an older version of flang-new is used by a program built with a newer version.
I can't seem to make flang-new stop pulling its run-time library into the shared library, specifically the options -nostdlib and -nodefaultlibs seem to be non-working for flang-new.
If anyone knows how to solve this problem, please give a hint.
Thomas