https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61651
--- Comment #1 from Martin Husemann <martin at netbsd dot org> --- Passing AS_FOR_TARGET (and friends) in the configure environment does not help, but explicitly adding --with-as=.. does fix the issue. So this looks like a pure configure bug.