December 18, 2020
Hi guys!

Do you know how can I compile D code using LDC with the following gcc flags?
* -msingle-pic-base
* -mpic-register=r9
* -mno-pic-data-is-text-relative.

As far as I know, there are no equivalents in D for these. Is is ok to use the -Xcc flag?
Thank you!
December 18, 2020
On Friday, 18 December 2020 at 13:00:45 UTC, Severin Teona wrote:
> Hi guys!
>
> Do you know how can I compile D code using LDC with the following gcc flags?
> * -msingle-pic-base
> * -mpic-register=r9
> * -mno-pic-data-is-text-relative.
>
> As far as I know, there are no equivalents in D for these. Is is ok to use the -Xcc flag?
> Thank you!

One direction to look into is what flags to use with Clang instead of GCC.
The -Xcc flag is not useful because that will only help with linker configuration. At least the first two flags that you mention are related to parts of codegen that I think are not done by the linker.

-Johan