brew reinstall gcc
did not work for me. I tried brew uninstall gcc && brew install gcc
, which did not solve the issue either.
I had to edit my ~/.R/Makevars
file and add -L/opt/homebrew/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/aarch64-apple-darwin24/14/
to LDFLAGS
.