diff options
Diffstat (limited to 'Build/EvilLinker.hs')
-rw-r--r-- | Build/EvilLinker.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs index c8641f649..1b57ba959 100644 --- a/Build/EvilLinker.hs +++ b/Build/EvilLinker.hs @@ -17,6 +17,7 @@ import Control.Applicative ((<$>)) import Control.Monad import System.Directory import Data.Maybe +import Data.List import Utility.Monad import Utility.Process @@ -94,13 +95,19 @@ parseCollect2 = do path <- manyTill anyChar (try $ string ldcmd) void $ char ' ' params <- restOfLine - return $ CmdParams (path ++ ldcmd) (escapeDosPaths params) Nothing + return $ CmdParams (path ++ ldcmd) (skipHack $ escapeDosPaths params) Nothing where ldcmd = "ld.exe" versionline = do void $ string "collect2 version" restOfLine - + +{- For unknown reasons, asking the linker to link this in fails, + - with error about multiple definitions of a symbol from the library. + - This is a horrible hack. -} +skipHack :: String -> String +skipHack = replace "dist/build/git-annex/git-annex-tmp/Utility/winprocess.o" "" + {- Input contains something like - c:/program files/haskell platform/foo -LC:/Program Files/Haskell Platform/ -L... - and the *right* spaces must be escaped with \ |