I've been using this hack to work around the Linux/sparc64 compile failure described in Issue #47994, especially since the underlying glibc PR build/27558 doesn't seem to be making progress and some fix is required to have LLVM build on sparc64-unknown-linux-gnu at all, as evidenced on the buildbot.
I don't expect this patch to be commited, just posting for reference.
Tested on sparc64-unknown-linux-gnu.