diff options
author | Adam Chlipala <adam@chlipala.net> | 2010-11-18 14:22:04 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2010-11-18 14:22:04 -0500 |
commit | a1e0d431cb9f57321716aaa7584bf045406287c5 (patch) | |
tree | 21d925508e3cebab2d7dc4092845a7538df70dac /src/compiler.sml | |
parent | a76bfb6d78445f3d36765cb6a0fda43697c16a72 (diff) |
Karn Kallio's patch for static mhash linking
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 038fa0ff..c4e8977f 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -1225,16 +1225,16 @@ fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = 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) = |