https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116400
--- Comment #17 from Iain Sandoe <iains at gcc dot gnu.org> --- on macOS we have to use gm4 (the installed version does not recognise -g or --gnu). Having said that, *developers* working on GCC on macOS most likely do have a newer version installed, since the OS one is old). End users do not need to do this. So, I suppose, the trick will be to lift the mechanism used by the configure scripts and apply that.