The following packages in ::gentoo (and probably more in overlays?) use this function: sci-libs/coinor-csdp sci-libs/scotch sci-libs/mumps sys-cluster/gasnet It's non-trivial so it'd be better if it could be changed in a single place and maintainers didn't need to copy-paste this function every time.
It seems like kind of a hack to work around terrible build systems. I don't think this belongs in multilib.eclass. I would suggest you discuss this elsewhere; bugzilla is probably not the best place for it.
I assume toolchain doesn't want to implement this.