That's weird. Looking in the ld user manual I see that -O only matters to ld if the value is non-zero. So there's no point in doing -O9. Plus if you have your optimization flag that you are using for the compile command line, just use the same flag on the link command line. Also -relax is not listed in the ld user manual, it should be --relax, with two dashes.
If the problem still exists after changing those (and I think it probably will be), then
the problem is not necessarily in your makefile, but something in your application that
is triggering it. Does ld provide any kind of error output when it "dies"? If
so, can you post it?