From 014f83d65d4f1dc7f8c9800c8fcc7bb027c3bf87 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 22 May 2009 17:13:10 +0000 Subject: [PATCH] Moved the extra parameters in the compiler commands so that the source file is always the last parameter --- config/CompilerCommands.hs.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/CompilerCommands.hs.in b/config/CompilerCommands.hs.in index 0e0aed9..d7791f9 100644 --- a/config/CompilerCommands.hs.in +++ b/config/CompilerCommands.hs.in @@ -9,20 +9,17 @@ tockIncludeFlags :: String tockIncludeFlags = "-I. -I" ++ pkgIncludeDir cCommand :: String -> String -> String -> String -cCommand inp out extra = "@CC@ @TOCK_CFLAGS@ " ++ tockIncludeFlags ++ " -c -o " ++ out ++ " " ++ inp - ++ " " ++ extra +cCommand inp out extra = "@CC@ @TOCK_CFLAGS@ " ++ tockIncludeFlags ++ " -c -o " ++ out ++ " " ++ extra ++ " " ++ inp cAsmCommand :: String -> String -> String -> String -cAsmCommand inp out extra = "@CC@ @TOCK_CFLAGS@ -S " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ inp ++ - " " ++ extra +cAsmCommand inp out extra = "@CC@ @TOCK_CFLAGS@ -S " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ extra ++ " " ++ inp cLinkCommand :: [String] -> String -> String -> String cLinkCommand files out extra = "@CC@ @TOCK_CFLAGS@ -o " ++ out ++ " " ++ (concat (intersperse " " files)) ++ " @TOCK_CLDFLAGS@" ++ " " ++ extra cxxCommand :: String -> String -> String -> String -cxxCommand inp out extra = "@CXX@ @TOCK_CXXFLAGS@ " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ inp ++ " @TOCK_CXXLDFLAGS@" - ++ " " ++ extra +cxxCommand inp out extra = "@CXX@ @TOCK_CXXFLAGS@ " ++ tockIncludeFlags ++ " -o " ++ out ++ " @TOCK_CXXLDFLAGS@ " ++ extra ++ " " ++ inp hCommand :: String -> String -> String hCommand inp out = "@GHC@ --make " ++ inp ++ " -o " ++ out