i686-apple-darwin10 to i386-pc-linux-gnu, ld invoked with gnu options
Titus von Boxberg
Sun Jun 26 13:21:00 GMT 2011
Am 26.06.2011 um 14:26 schrieb Andrea Franceschini:
> Yann, Titus, all,
> 2011/6/24 Yann E. MORIN <email@example.com>:
>> What does the MacOS-X' ld says to used static/shared libraries? GNU ld
>> at least supports the equivalents:
>> - for static: -Bstatic -dn -non_shared -static
>> - for shared: -Bdynamic -dy -call_shared
>> If you can find a common option for both, then the better.
> 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
> Anyways I could
> get past the point in my original email by not forcing libstdcxx to be
> linked statically. Like Titus, I'm not really sure why we should
> consider linking gcc statically against libstcxx (and at this point I
> can say I chose that option with no knowledge about it, just because
> it sounded nice :).
> As for my newest error, Titus, that was the actual error. You can find
> the build.log at http://www.morpheu5.net/build-20110626-0.log see if
> you can spot something more than me.
"Pagina non trovata"
Searching gives no risultati.
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc