Skip to content

metamod: remove -s strip flag to preserve linker markers - #93

Open
blshkv wants to merge 1 commit into
rehlds:masterfrom
blshkv:fix-strip-linker-flag
Open

metamod: remove -s strip flag to preserve linker markers#93
blshkv wants to merge 1 commit into
rehlds:masterfrom
blshkv:fix-strip-linker-flag

Conversation

@blshkv

@blshkv blshkv commented Aug 13, 2026

Copy link
Copy Markdown

Summary

The -s flag in LINK_FLAGS inside the non-debug branch causes strip to run on the output shared library, which removes all symbols from the binary — including sentinel symbols used by packaging systems to verify that LDFLAGS were respected.

For example, Gentoo injects --defsym=__gentoo_check_ldflags__=0 into LDFLAGS and then checks that the resulting binary still contains __gentoo_check_ldflags__ after linking. The -s strip pass removes it, causing a QA failure:

* QA Notice: Files built without respecting LDFLAGS have been detected

Stripping should be left to the build system or packager (e.g. via INSTALL_STRIP_FLAG or CMAKE_INSTALL_DO_STRIP), not hardcoded into link flags.

Change

Remove set(LINK_FLAGS "${LINK_FLAGS} -s") from the non-debug branch in metamod/CMakeLists.txt.

The -s flag causes `strip` to run on the output binary, which removes
all symbols including sentinel symbols used by packaging systems (e.g.
Gentoo's __gentoo_check_ldflags__) to verify that LDFLAGS were respected.

Remove the flag so that stripping is left to the build system / packager.
blshkv added a commit to blshkv/ReGameDLL_CS that referenced this pull request Aug 13, 2026
The -s flag strips all symbols from the output shared library, including
sentinel symbols used by packaging systems to verify LDFLAGS were
respected (e.g. Gentoo's __gentoo_check_ldflags__).

Same issue fixed in the sibling project:
rehlds/Metamod-R#93
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.

1 participant