This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Titus, Andrea, All, On Sunday 26 June 2011 15:21:04 Titus von Boxberg wrote: > Am 26.06.2011 um 14:26 schrieb Andrea Franceschini: > > To the best of my knowledge, Apple's ld supports -static and -dynamic. > > Man page for ld states that > > > > -dynamic The default. Implied by -dylib, -bundle, or -execute > > -static Produces a mach-o file that does not use the dyld. > > Only used building the kernel. > > > > though trying to compile a sample hello world results in a not working > > executable (segfaults) even if file reports it being a "Mach-O 64-bit > > executable x86_64". So I'm not sure it's an option. > > No, it's not. You simply cannot produce working statically linked > binaries on MacOS. The quote "Only used building the kernel" is true. > And (quoting from the Developer Documentation) there is no way to tell ld to > prefer a single static library instead of a single dylib of the same name > also present in the search path. > That means that there is no equivalent to the ELF command line in question > ... -Bstatic -lstdc++ -Bdynamic ... > that links (in this example) libstdc++ statically while the rest is > linked dynamically. OK, then static linking should not be used when on MacOS-X. Period. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |