www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - LDC relocation flags

reply Severin Teona <teona.severin9 gmail.com> writes:
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!
Dec 18 2020
parent Johan Engelen <j j.nl> writes:
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
Dec 18 2020