public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55891] Problem with shared library and EQUIVALENCE on darwin 11.4.2 x86_64 Date: Tue, 22 Jan 2013 11:52:00 -0000 [thread overview] Message-ID: <bug-55891-4-ScOpQNi8Wq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55891-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55891 --- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-01-22 11:52:27 UTC --- Form https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/E_ll5RFNL14 FX said: Compiling shared libraries on Darwin is a bit more tricky than on your typical Linux system. In your case, you're missing -flat_namespace: Two-level namespace By default all references resolved to a dynamic library record the library to which they were resolved. At runtime, dyld uses that informa- tion to directly resolve symbols. The alternative is to use the -flat_namespace option. With flat namespace, the library is not recorded. At runtime, dyld will search each dynamic library in load order when resolving symbols. This is slower, but more like how other operating systems resolve symbols. (from Mac OS ld man page). Typical use case for creating a Darwin shared library is: $ gfortran -dynamiclib -undefined suppress -flat_namespace -fPIC mod.f90 -o libfoo.dylib $ gfortran main.f90 -lfoo -L. && ./a.out 40 40 This PR should probably be closed as INVALID.
next prev parent reply other threads:[~2013-01-22 11:52 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-07 2:36 [Bug fortran/55891] New: " brtnfld at hdfgroup dot org 2013-01-07 9:39 ` [Bug fortran/55891] " burnus at gcc dot gnu.org 2013-01-07 11:50 ` dominiq at lps dot ens.fr 2013-01-22 11:52 ` dominiq at lps dot ens.fr [this message] 2013-02-06 6:01 ` brtnfld at hdfgroup dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-55891-4-ScOpQNi8Wq@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).