comparison src/compiler.sml @ 435:f7b25375c0cf

GCCARGS configure option
author Adam Chlipala <adamc@hcoop.net>
date Tue, 28 Oct 2008 15:05:16 -0400
parents 5de838fb0950
children bd9ee9aeca2f
comparison
equal deleted inserted replaced
434:c471345f5165 435:f7b25375c0cf
509 fun compileC {cname, oname, ename, libs} = 509 fun compileC {cname, oname, ename, libs} =
510 let 510 let
511 val urweb_o = clibFile "urweb.o" 511 val urweb_o = clibFile "urweb.o"
512 val driver_o = clibFile "driver.o" 512 val driver_o = clibFile "driver.o"
513 513
514 val compile = "gcc -Wstrict-prototypes -Werror -O3 -I include -c " ^ cname ^ " -o " ^ oname 514 val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I include -c " ^ cname ^ " -o " ^ oname
515 val link = "gcc -Werror -O3 -lm -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname ^ " " ^ driver_o ^ " -o " ^ ename 515 val link = "gcc -Werror -O3 -lm -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname ^ " " ^ driver_o ^ " -o " ^ ename
516 in 516 in
517 if not (OS.Process.isSuccess (OS.Process.system compile)) then 517 if not (OS.Process.isSuccess (OS.Process.system compile)) then
518 print "C compilation failed\n" 518 print "C compilation failed\n"
519 else if not (OS.Process.isSuccess (OS.Process.system link)) then 519 else if not (OS.Process.isSuccess (OS.Process.system link)) then