digitalmars.D.ldc - Fully statically linked binary
- Jacob Carlborg (10/10) Jul 11 2017 With LDC it's possible to build a fully statically linked binary using
- kinke (3/7) Jul 11 2017 It's only used for linking (in essence, forwarding `-static` to
- Jacob Carlborg (4/6) Jul 11 2017 Ok, cool, thanks.
With LDC it's possible to build a fully statically linked binary using the "-static" flag. My question is: is it required to invoke the compiler with the "-static" flag or is it enough to invoke the linker with the "-static" flag? I'm not sure if the code generation will be different when doing a fully statically linked binary. I think I've read somewhere that different TLS models might be used depending on if static or dynamic linking is used. This is on Linux (and possible on FreeBSD if static linking works there). -- /Jacob Carlborg
Jul 11 2017
On Tuesday, 11 July 2017 at 08:14:59 UTC, Jacob Carlborg wrote:With LDC it's possible to build a fully statically linked binary using the "-static" flag. My question is: is it required to invoke the compiler with the "-static" flag or is it enough to invoke the linker with the "-static" flag?It's only used for linking (in essence, forwarding `-static` to gcc) and doesn't affect the relocation model etc.
Jul 11 2017
On 2017-07-11 19:40, kinke wrote:It's only used for linking (in essence, forwarding `-static` to gcc) and doesn't affect the relocation model etc.Ok, cool, thanks. -- /Jacob Carlborg
Jul 11 2017