Well, I found the solution embarrasingly quickly after continuing to search.
See this answer. The blog post linked in that answer gives instructions for applying the fix on a Mac; ignore all instructions about the Mac SDK.
Quick solution:
- Edit /usr/local/MATLAB/R2016b/bin/glnxa64/mexopts/gfortran.xml
- In the line beginning with "LINKLIBS=..." remove both references to gfortranbegin
- Add -lgcc_s.1 to the end of that line inside the quotes
- At the bottom of the file, within the GFORTRANBEGIN_LIBDIR block, replace 'dirExists name="$$"' with 'dirExists name="/"'.
- Save the file and set up the Fortran compiler as normal. This worked for me on Gentoo using gfortran 8.2.0-r6.