The current --as-needed "fix" in the ebuild is making the build of habak worse, since you're moving LDFLAGS from just after the compiler to the end, so that they are _ignored_ for all the object files and libraries (LDFLAGS are positional: they only work for the inputs coming _after_ them).
If you look at the --as-needed fixing guide there's the proper order of parameters in a linking call to the compiler. In the mean time I'd suggest to remove that "fix" and let the package fail rather than hiding a bug.
Reassigning to maintainer-needed since lucass has left Gentoo, bug #50581"
Closing this since I reopened the other one and reverted the so-called fix.