comparison src/compiler.sml @ 1528:7770ef82c463

Configure correct C compiler options for Pthreads
author Adam Chlipala <adam@chlipala.net>
date Thu, 04 Aug 2011 17:06:50 -0400
parents 52fbd8534ef3
children 659a2f71f5e5
comparison
equal deleted inserted replaced
1527:cccf8bf64b30 1528:7770ef82c463
1318 val lib = if Settings.getStaticLinking () then 1318 val lib = if Settings.getStaticLinking () then
1319 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" 1319 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a"
1320 else 1320 else
1321 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto 1321 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto
1322 1322
1323 val compile = Config.ccompiler ^ " " ^ Config.ccArgs ^ " -Wimplicit -Werror -Wno-unused-value -O3 -I " ^ Config.includ 1323 val compile = Config.ccompiler ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " -Wimplicit -Werror -Wno-unused-value -O3 -I " ^ Config.includ
1324 ^ " " ^ #compile proto 1324 ^ " " ^ #compile proto
1325 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname 1325 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname
1326 1326
1327 val link = Config.ccompiler ^ " -Werror -O3 -lm -pthread " ^ Config.ccArgs ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ escapeFilename oname 1327 val link = Config.ccompiler ^ " -Werror -O3 -lm " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " " ^ Config.pthreadLibs
1328 ^ " -o " ^ escapeFilename ename ^ " " ^ libs 1328 ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ escapeFilename oname ^ " -o " ^ escapeFilename ename ^ " " ^ libs
1329 1329
1330 val (compile, link) = 1330 val (compile, link) =
1331 if profile then 1331 if profile then
1332 (compile ^ " -pg", link ^ " -pg") 1332 (compile ^ " -pg", link ^ " -pg")
1333 else 1333 else