Successfully built headas on my Mac using the gfortran from the installer supplied at gcc.gnu.org. This places the gfortran library files in /usr/local/gfortran/lib so configure has to be altered so that F77LIBS4C in hmakerc includes this directory. If the gfortran plug-in for Xcode is used then the gfortran library files end up in /usr/local/lib which is in the link path anyway so need not be specified in F77LIBS4C. Also had to update cctools to avoid an undefined dso_handle. Had to add DHAVE_ETIME=1 to DEFS in hmakerc to ensure that etime is not defined again in xanlib/sysdep/sysc.c.
Not directly connected to gfortran but we discovered cod.dhf was not being built - this requires running hlpdhf on cod.hlp which means ensuring ia/doc is built ahead of qdp.