on master help sign in
Need to separate flags when invoking gcc

rawSystem does nothing about splitting flags into individual words, just passing the flags directly, so we need to do a bit more work. (There will be a problem if we want to do anything complicated with quoted flags...)

commite57170d06ff108623222b3c53a4969e8821bec73 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 1 Jan 2015, 17:56 (12 years ago) parent9b55e98
1 file changed+4−4
src/IRTS/CodegenC.hs+4−4
src/IRTS/CodegenC.hs+4−4
@@ -70,10 +70,10 @@ codegenC' defs out exec incs objs libs flags dbg
7070 "-I."] ++ objs ++ ["-x", "c"] ++
7171 (if (exec == Executable) then [] else ["-c"]) ++
7272 [tmpn] ++
73− libFlags ++
74− incFlags ++
75− libs ++
76− flags ++
73+ concatMap words libFlags ++
74+ concatMap words incFlags ++
75+ concatMap words libs ++
76+ concatMap words flags ++
7777 ["-o", out]
7878-- putStrLn gcc
7979 exit <- rawSystem comp args