Thread overview | |||||
---|---|---|---|---|---|
|
July 11, 2017 Fully statically linked binary | ||||
---|---|---|---|---|
| ||||
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
|
July 11, 2017 Re: Fully statically linked binary | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | 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.
|
July 11, 2017 Re: Fully statically linked binary | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | 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 |
Copyright © 1999-2021 by the D Language Foundation