On Thu, Dec 16, 2021 at 9:55 AM Curtis Hamilton <clhamilto@gmail.com> wrote:


On Sat, Dec 11, 2021 at 6:55 PM kinke via digitalmars-d-ldc <digitalmars-d-ldc@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  that allows LDC to build using static “phobos” which lets LDC to be independent of GDC.

regards
I hate autocorrection, the file should be “driver/targetmachine.cpp”….