https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112963
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> --- I cannot peak for the others, but Darwin does not need '-lm' because it is part of libc [libSystem] (adding -lm actually symlinks to libSystem and alters the effective library order on the link line so I'd prefer to avoid it, if possible). We managed to make this work for libgfortran, I need to check how.