Skip to content

Conversation

@qmonnet
Copy link
Member

@qmonnet qmonnet commented Jul 19, 2025

The flag we've been using and documenting for static builds does the work, but is not correct:

  • It should be "-static" (compiler option, as expected by gcc for example) and not "--static" (linker option, gcc translates the former into the latter when invoking the linker).

  • It should not be passed with the CFLAGS (or in our case, EXTRA_CFLAGS), but instead with the LDFLAGS (or EXTRA_LDFLAGS), because it is a flag that will be passed to the linker.

Fix it in the README.md and in CI/release workflows.

The flag we've been using and documenting for static builds does the
work, but is not correct:

- It should be "-static" (compiler option, as expected by gcc for
  example) and not "--static" (linker option, gcc translates the former
  into the latter when invoking the linker).

- It should not be passed with the CFLAGS (or in our case,
  EXTRA_CFLAGS), but instead with the LDFLAGS (or EXTRA_LDFLAGS),
  because it is a flag that will be passed to the linker.

Fix it in the README.md and in CI/release workflows. We also need to
adjust feature detection to take the EXTRA_LDFLAGS (so far ignored) into
account.

Signed-off-by: Quentin Monnet <[email protected]>
@qmonnet qmonnet merged commit 4565cfe into main Jul 19, 2025
5 checks passed
@qmonnet qmonnet deleted the pr/static-flags branch July 19, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants