Cross-compile macOS to Ubuntu

kinke noone at
Mon Dec 31 14:48:41 UTC 2018

On Sunday, 30 December 2018 at 17:19:00 UTC, Paolo Invernizzi 
> There's a plan to add more flexibility in specifying the linker 
> command line for `-link-internally`?

Thanks for experimenting and confirming.
The etc/ldc2.conf file may provide enough flexibility already. 
There are switches injected before the explicit cmdline args, and 
switches (`post-switches`) appended after the explicit ones.
If the problematic order only involves object files, you could 
try adding the startup object files to `switches` (directly, 
i.e., `Scrt1.o`, not as linker arg `-LScrt1.o`), and `crtendS.o` 
etc. to `post-switches`.
IIRC, there's a special case where we move the single compiled 
object file in front of all other object files; you may have to 
use `-singleobj=false` to work around that.

More information about the Digitalmars-d mailing list