Libats depends on libgmp, so the link order should be specified directly...

Building on Cygwin with GCC 4.7.2, [ld] complains about unresolved symbols (of GMP) in a file from [$ATSHOME/ccomp/lib/libats.a]. To fix, supply [-lats] flag explicitly after [-lgmp].