diff --git a/shake-ats.cabal b/shake-ats.cabal
--- a/shake-ats.cabal
+++ b/shake-ats.cabal
@@ -1,5 +1,5 @@
 name:                shake-ats
-version:             0.1.0.3
+version:             0.1.0.4
 synopsis:            Utilities for building ATS projects with shake
 description:         Various helper functions for building [ATS](http://www.ats-lang.org/) with the [shake](http://shakebuild.com/) library
 homepage:            https://github.com/vmchale/shake-ats#readme
diff --git a/src/Development/Shake/ATS.hs b/src/Development/Shake/ATS.hs
--- a/src/Development/Shake/ATS.hs
+++ b/src/Development/Shake/ATS.hs
@@ -16,6 +16,7 @@
 
 import           Control.Monad
 import           Control.Monad.IO.Class
+import           Data.Bool                  (bool)
 import           Data.Either                (fromRight)
 import           Data.List                  (intercalate)
 import           Data.Maybe                 (fromMaybe)
@@ -88,11 +89,11 @@
         cmd_ ["mkdir", "-p", dropDirectory1 out]
         path <- fromMaybe "" <$> getEnv "PATH"
         let toLibs = fmap ("-l" <>)
-        -- -latslib
+        let libs' = bool libs ("gc" : libs) gc
         command
             [EchoStderr False, AddEnv "PATSHOME" home, AddEnv "PATH" (home ++ "/bin:" ++ path), AddEnv "PATSHOMELOCS" $ patsHomeLocs 5]
             (home ++ "/bin/patscc")
-            ([sourceFile, "-DGNU_SOURCE", "-atsccomp", "gcc -flto -I" ++ h ++ "/ccomp/runtime/ -I" ++ h ++ " -L" ++ h' ++ "/lib", gcFlag gc, "-o", out, "-cleanaft", "-O2", "-mtune=native", "-flto"] <> toLibs libs)
+            ([sourceFile, "-atsccomp", "gcc -flto -I" ++ h ++ "/ccomp/runtime/ -I" ++ h ++ " -L" ++ h' ++ "/lib", gcFlag gc, "-o", out, "-cleanaft", "-O2", "-mtune=native", "-flto"] <> toLibs libs')
 
 -- | Build a @.lats@ file.
 atsLex :: Rules ()
