As noted in #17508, currently ld.gold's treatment of non-PIC code is
broken in ways that break linking of musl. Make sure we don't use it in
cases where this will certainly result in broken compilation.
Prevents the segfault reported in #17508 and elsewhere.