Building LDC for FreeBSD PowerPC64

Curtis Hamilton clhamilto at gmail.com
Thu Dec 16 14:55:52 UTC 2021


On Sat, Dec 11, 2021 at 6:55 PM kinke via digitalmars-d-ldc <
digitalmars-d-ldc at puremagic.com> wrote:

> On Saturday, 11 December 2021 at 05:15:33 UTC, Curtis Hamilton
> wrote:
> > Unfortunately I’ve not been successful in using LDC-0.17.6 or
> > ltsmaster to bootstrap and build a newer LDC release.
> >
> > But I have managed to build LDC-1.23 using GDC as the host D
> > compiler.
>
> Yeah, gdc is the suggested bootstrap way. - So you got that LDC
> to successfully build druntime and Phobos? I wouldn't have
> thought you'd get that far ;) - there's a number of (old)
> reported PowerPC issues on GitHub.
>
Yes, I’ve been successful in getting LDC to build using GDC as the host D.
In fact, the resulting build seems to be working well.  I did have to make
a few changes to the code to get everything working.

First, PowerPC64 uses elfv2 vice elfv1 on FreeBSD 13, so that needed to be
changed in “driver/target machine.cop”.  I also had to update
“druntime/src/core/sys/freebsd/config.d” for FreeBSD 13.  Most recent
druntime has been updated.

Lastly, I needed to apply the patch from @dbankov-vmware
https://github.com/dbankov-vmware/ldc/tree/fix-for-3795
 that allows LDC to build using static “phobos” which lets LDC to be
independent of GDC.

regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-ldc/attachments/20211216/0c8c2e22/attachment.htm>


More information about the digitalmars-d-ldc mailing list