The N64 SDK docs, if not the SDK itself, leaked at one point. I would expect that by now the whole thing has leaked long ago.
Come to think of it, it must have, because the bit-perfect recompilation projects are using the exact compilers from the SDK.
You can buy CDs of the SGI SDK on ebay.
Recompilation projects aren't bit perfect, only decomps. They use a recompiled version of the compilers for Linux so that they don't need to emulated with QEMU like they used to, though.
Yeah, the full SDK leaked decades ago when the system was still economically relevant to Nintendo.