Error on Mac m1 when using a specific make file "ld: library not found for -lgcrt1.o"

I am trying to compile a make file on my mac for a program. I have been able to compile other make files using the mac, and have tested basic gfortran hello world scripts to make sure it is working. I have used brew reinstall gcc, brew reinstall gfortran, but cannot get beyond this error.

I think it has something to do with the linking to the library, I have tried uninstalling and reinstalling gcc and gfortran, and am not totally clear how to add the necessary flags to my makefile/path

Build is below: ./mkpost SRC_DIR=. make SRC_DIR=. MODE=NOTXMGR -e -f ./Makefilepost gfortran -O -DNOTXMGR -Ddarwin20.0 -pg -fcheck=all -fdefault-real-8 -O2\ -std=f2008 -Wextra -I. -DNOTXMGR -Ddarwin20.0 -o readtridyn31.exe readtridyn31.o ld: library not found for -lgcrt1.o collect2: error: ld returned 1 exit status make: *** [readtridyn31.exe] Error 1 '[' darwin20.0 = darwin20.0 ']' @echo here ./mkpost: line 18: @echo: command not found rm readtridyn31.F rm: readtridyn31.F: No such file or directory rm readmatrix4.F rm: readmatrix4.F: No such file or directory rm readparticle6.F rm: readparticle6.F: No such file or directory rm mom2dis.F rm: mom2dis.F: No such file or directory rm mom2dis35.F rm: mom2dis35.F: No such file or directory