Mercurial > urweb
comparison src/compiler.sml @ 1659:8de2ea0a0701
Change linking argument order, based on reported problems in Ubuntu 11.10
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 05 Jan 2012 19:23:34 -0500 |
parents | e374b6b8ab38 |
children | 3cfc79f92db7 |
comparison
equal
deleted
inserted
replaced
1658:de0a34e28bfa | 1659:8de2ea0a0701 |
---|---|
1352 val proto = Settings.currentProtocol () | 1352 val proto = Settings.currentProtocol () |
1353 | 1353 |
1354 val lib = if Settings.getStaticLinking () then | 1354 val lib = if Settings.getStaticLinking () then |
1355 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" | 1355 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" |
1356 else | 1356 else |
1357 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto | 1357 "-L" ^ Config.lib ^ "/.. " ^ #linkDynamic proto ^ " -lurweb" |
1358 | 1358 |
1359 val opt = if debug then | 1359 val opt = if debug then |
1360 "" | 1360 "" |
1361 else | 1361 else |
1362 " -O3" | 1362 " -O3" |
1364 val compile = Config.ccompiler ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " -Wimplicit -Werror -Wno-unused-value" | 1364 val compile = Config.ccompiler ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " -Wimplicit -Werror -Wno-unused-value" |
1365 ^ opt ^ " -I " ^ Config.includ | 1365 ^ opt ^ " -I " ^ Config.includ |
1366 ^ " " ^ #compile proto | 1366 ^ " " ^ #compile proto |
1367 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname | 1367 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname |
1368 | 1368 |
1369 val link = Config.ccompiler ^ " -Werror" ^ opt ^ " -lm " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " " ^ Config.pthreadLibs | 1369 val link = Config.ccompiler ^ " -Werror" ^ opt ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " " ^ Config.pthreadLibs |
1370 ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ escapeFilename oname ^ " -o " ^ escapeFilename ename ^ " " ^ libs | 1370 ^ " " ^ lib ^ " " ^ escapeFilename oname ^ " " ^ libs ^ " -lm " ^ Config.openssl ^ " -o " ^ escapeFilename ename |
1371 | 1371 |
1372 val (compile, link) = | 1372 val (compile, link) = |
1373 if profile then | 1373 if profile then |
1374 (compile ^ " -pg", link ^ " -pg") | 1374 (compile ^ " -pg", link ^ " -pg") |
1375 else | 1375 else |