[WiP] Creating a snap package of LDC

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sun Aug 28 13:27:21 PDT 2016


On 28 Aug 2016, at 21:12, Joseph Rushton Wakeling via digitalmars-d-ldc 
wrote:
>> So, my question is, what would be the minimum requirements for a 
>> linker to accompany ldc2 […]
>
> ... could anyone advise ... ?

You need a GCC-compatible linker driver, which links in the C standard 
libraries. (The latter is the reason why (g)cc is used instead of ld.) 
You might need to pull in the full GCC package if there is no other way 
to depend on a C toolchain.

>> and how would I ensure that the built ldc2 tries to use _that_ linker 
>> rather than some other one?

You can set the CC environment variable when invoking LDC (or use the 
hidden "-gcc" option). Otherwise, we use llvm::findProgramByName("gcc"), 
which searches the PATH.

  — David


More information about the digitalmars-d-ldc mailing list