summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-09-13 10:12:59 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-09-13 10:12:59 +0000
commit4a82c60e35612612921c74b3448e79b0a60de780 (patch)
treebb1d5698c52f9e668632492ef75af0109ff13fcf
parentd710c3a401d90bd1535193985a1c83cd5f4164dc (diff)
downloadhaskell-4a82c60e35612612921c74b3448e79b0a60de780.tar.gz
filter out the gcc-lib directory from the rts package's library-dirs
fixes problems when building with GHC 6.10 on Windows
-rw-r--r--utils/ghc-cabal/ghc-cabal.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/ghc-cabal/ghc-cabal.hs b/utils/ghc-cabal/ghc-cabal.hs
index 25c94a1f80..41abd390e1 100644
--- a/utils/ghc-cabal/ghc-cabal.hs
+++ b/utils/ghc-cabal/ghc-cabal.hs
@@ -328,7 +328,16 @@ generate config_args distdir directory
-- GHC's rts package:
hackRtsPackage index =
case PackageIndex.lookupPackageName index (PackageName "rts") of
- [(_,[rts])] -> PackageIndex.insert rts{ Installed.ldOptions = [] } index
+ [(_,[rts])] ->
+ PackageIndex.insert rts{
+ Installed.ldOptions = [],
+ Installed.libraryDirs = filter (not . ("gcc-lib" `isSuffixOf`)) (Installed.libraryDirs rts)} index
+ -- GHC <= 6.12 had $topdir/gcc-lib in their
+ -- library-dirs for the rts package, which causes
+ -- problems when we try to use the in-tree mingw,
+ -- due to accidentally picking up the incompatible
+ -- libraries there. So we filter out gcc-lib from
+ -- the RTS's library-dirs here.
_ -> error "No (or multiple) ghc rts package is registered!!"
dep_ids = map snd (externalPackageDeps lbi)