Tags: avdv/scalals
Tags
Fix creating a fully static binary Using `NIX_LDFLAGS` to pass in the `-static` flag does not work, since the CC wrapper decides early on (using the `checkLinkType` helper funtion) if the link type is dynamic or not, only looking at the passed arguments (and response files). Depending on this, it will then pass the `-dynamic-linker` flag to the linker which we need to avoid. We need to pass `-static` directly when invoking the CC wrapper. Fortunately, the `NIX_CFLAGS_LINK` variable already contains this flag (on Linux).
PreviousNext