app-admin/gkrellm-2.3.4 uses the variable $LINK_FLAGS instead of the traditional $LDFLAGS to pass linker options. Gentoo has an override in the calls to emake to include user LDFLAGS, and the upstream build rule does mention $(LINK_FLAGS) in its build of gkrellm and gkrellmd. Unfortunately, it places $LINK_FLAGS at the end of the rule, so position-sensitive options like --as-needed appear after all the libraries that it could affect, rendering it useless. Since LDFLAGS are used in the rule, position-insensitive options like --hash-style=gnu are respected and so Portage does not flag the file as ignoring LDFLAGS. I will attach a minor ebuild patch that uses sed to reorder the rule so that the linker flags occur early enough in the link line.
Created attachment 248641 [details, diff] Patch to gkrellm-2.3.4.ebuild to sed upstream Makefiles to fix LDFLAGS ordering This patch swaps the order of "-o <OUTPUT> $(LIBS)" and "$LINK_FLAGS" so that the linker flags appear before $(LIBS).
It looks to me like gkrellm-2.3.5 support LDFLAGS at an appropriate location relative to $(LIBS), so this will be fixed in the next version bump.
2.3.5 is in the tree, which properly respects LDFLAGS in the right place, and (I believe) --as-needed works now. Please reopen this bug if I am mistaken.