https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111928
--- Comment #4 from Dimitar Dimitrov <dimitar at gcc dot gnu.org> --- If I remove the "AC_CHECK_LIBM" line from libquadmath/configure.ac, and re-generate autoconf there, then the build passes. I don't understand why that line was added. Just a few lines below I see checks for specific functions from libm.