Mercurial > urweb
diff src/compiler.sml @ 1317:e12cef71aa1a
Karn Kallio's patch for static mhash linking
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 18 Nov 2010 14:22:04 -0500 |
parents | d2ad997ca157 |
children | a6427d1eda6f |
line wrap: on
line diff
--- a/src/compiler.sml Sat Nov 13 14:38:06 2010 -0500 +++ b/src/compiler.sml Thu Nov 18 14:22:04 2010 -0500 @@ -1225,16 +1225,16 @@ let val proto = Settings.currentProtocol () - val lib = if Settings.getStaticLinking () then - #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" - else - "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto + val (lib, mhash) = if Settings.getStaticLinking () then + (#linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a", Config.libMhash ^ "/libmhash.a") + else + ("-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto, "-L" ^ Config.libMhash ^ " -lmhash") val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ ^ " " ^ #compile proto ^ " -c " ^ cname ^ " -o " ^ oname - val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ oname + val link = "gcc -Werror -O3 -lm -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ mhash ^ " " ^ oname ^ " -o " ^ ename val (compile, link) =