mail-filter/rspamd-3.1 automatically uses lld or gold if installed. This produces misleading error messages if incompatible flags are used (e.g., "Your system does not support getaddrinfo call, please consider upgrading it to run rspamd"). It's possible to work around this by setting MYCMAKEARGS="-DLINKER_NAME=bfd" via package.env, but this isn't well-documented. Also, bug 606124 suggests packages should use the default linker. Is it safe to assume the default linker is bfd if tc-ld-is-gold and tc-ld-is-lld return false?
I think it'd be best to remove the check rather than analyze what the intended LD is (e.g. perhaps user has a more obscure -fuse-ld=mold). It doesn't seem to do anything special with LINKER_NAME beside force -fuse-ld=${LINKER_NAME} While could just remove that bit.. the entire cmake/Toolset.cmake seem unnecessary to me (adding -O3 and toolchain checks that the users should be controlling). I tried adding this to src_prepare: > cmake/Toolset.cmake || die Seems to work (removes -O3, -fuse-ld, etc..), but I didn't fully test -- leaving it up to the maintainers to decide how to handle this.
I have had the linker related part removal in my stash for some time, but emptying cmake/Toolset.cmake seems to be better. Thanks, PR is ready.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45c18da33fe7f9ec1d9eb61d8c60406a867c63bb commit 45c18da33fe7f9ec1d9eb61d8c60406a867c63bb Author: Petr Vaněk <arkamar@atlas.cz> AuthorDate: 2021-11-29 18:37:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-12-01 20:02:18 +0000 mail-filter/rspamd: respect user compiler flags choice The Toolset.cmake file seems to be unnecessary, it tries to control flags which in Gentoo should be controlled by user. This applies a change suggested in [1]. [1] https://bugs.gentoo.org/827550#c1 Closes: https://bugs.gentoo.org/827550 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/23127 Signed-off-by: Sam James <sam@gentoo.org> mail-filter/rspamd/rspamd-3.1.ebuild | 2 ++ mail-filter/rspamd/rspamd-9999.ebuild | 2 ++ 2 files changed, 4 insertions(+)