Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/34c884aa8660dcce484d6af5be44db8b35c5804e >--------------------------------------------------------------- commit 34c884aa8660dcce484d6af5be44db8b35c5804e Author: Ian Lynagh <[email protected]> Date: Fri Mar 16 23:35:02 2012 +0000 Tweak the tool-finder for mingw64 >--------------------------------------------------------------- Cabal/Distribution/Simple/GHC.hs | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs index f48e148..2f6d616 100644 --- a/Cabal/Distribution/Simple/GHC.hs +++ b/Cabal/Distribution/Simple/GHC.hs @@ -111,7 +111,7 @@ import Distribution.Simple.Compiler import Distribution.Version ( Version(..), anyVersion, orLaterVersion ) import Distribution.System - ( OS(..), buildOS ) + ( OS(..), buildOS, Arch(..), buildArch ) import Distribution.Verbosity import Distribution.Text ( display, simpleParse ) @@ -251,21 +251,21 @@ configureToolchain ghcProg ghcInfo = addKnownProgram gccProgram { programFindLocation = findProg gccProgram [ if ghcVersion >= Version [6,12] [] - then mingwBinDir </> "gcc.exe" + then mingwBinDir </> binPrefix ++ "gcc.exe" else baseDir </> "gcc.exe" ], programPostConf = configureGcc } . addKnownProgram ldProgram { programFindLocation = findProg ldProgram [ if ghcVersion >= Version [6,12] [] - then mingwBinDir </> "ld.exe" + then mingwBinDir </> binPrefix ++ "ld.exe" else libDir </> "ld.exe" ], programPostConf = configureLd } . addKnownProgram arProgram { programFindLocation = findProg arProgram [ if ghcVersion >= Version [6,12] [] - then mingwBinDir </> "ar.exe" + then mingwBinDir </> binPrefix ++ "ar.exe" else libDir </> "ar.exe" ] } where @@ -276,6 +276,9 @@ configureToolchain ghcProg ghcInfo = libDir = baseDir </> "gcc-lib" includeDir = baseDir </> "include" </> "mingw" isWindows = case buildOS of Windows -> True; _ -> False + binPrefix = case buildArch of + X86_64 -> "x86_64-w64-mingw32-" + _ -> "" -- on Windows finding and configuring ghc's gcc and ld is a bit special findProg :: Program -> [FilePath] -> Verbosity -> IO (Maybe FilePath) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
