comparison src/compiler.sml @ 1368:b2bc8bcd546f

Switch from libmhash to OpenSSL
author Adam Chlipala <adam@chlipala.net>
date Sun, 26 Dec 2010 11:13:37 -0500
parents fd34210bc3e5
children bf58ca871c00
comparison
equal deleted inserted replaced
1367:8301ee4ab58c 1368:b2bc8bcd546f
1283 1283
1284 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = 1284 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} =
1285 let 1285 let
1286 val proto = Settings.currentProtocol () 1286 val proto = Settings.currentProtocol ()
1287 1287
1288 val (lib, mhash) = if Settings.getStaticLinking () then 1288 val lib = if Settings.getStaticLinking () then
1289 (#linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a", Config.libMhash ^ "/libmhash.a") 1289 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a"
1290 else 1290 else
1291 ("-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto, "-L" ^ Config.libMhash ^ " -lmhash") 1291 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto
1292 1292
1293 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ 1293 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ
1294 ^ " " ^ #compile proto 1294 ^ " " ^ #compile proto
1295 ^ " -c " ^ cname ^ " -o " ^ oname 1295 ^ " -c " ^ cname ^ " -o " ^ oname
1296 1296
1297 val link = "gcc -Werror -O3 -lm -lcrypt -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ mhash ^ " " ^ oname 1297 val link = "gcc -Werror -O3 -lm -lcrypt -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ oname
1298 ^ " -o " ^ ename 1298 ^ " -o " ^ ename
1299 1299
1300 val (compile, link) = 1300 val (compile, link) =
1301 if profile then 1301 if profile then
1302 (compile ^ " -pg", link ^ " -pg") 1302 (compile ^ " -pg", link ^ " -pg")