X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-cabal%2Fghc-cabal.hs;h=cce40c51cd98be0a608e3c4d1de90a45413588b5;hb=47d37047e1f51f32184e7a3b6e68a22c2156ae32;hp=25c94a1f80cbda325ab307422493a174f3815240;hpb=3ae432721d71d208f1021bf3cf0b21ae405cadd8;p=ghc-hetmet.git diff --git a/utils/ghc-cabal/ghc-cabal.hs b/utils/ghc-cabal/ghc-cabal.hs index 25c94a1..cce40c5 100644 --- a/utils/ghc-cabal/ghc-cabal.hs +++ b/utils/ghc-cabal/ghc-cabal.hs @@ -176,7 +176,7 @@ doInstall ghc ghcpkg strip topdir directory distDir libsubdir = toPathTemplate "$pkgid", docdir = toPathTemplate $ if relocatableBuild - then "$topdir/$pkgid" + then "$topdir/../doc/html/libraries/$pkgid" else (myDocdir "$pkgid"), htmldir = toPathTemplate "$docdir" } @@ -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) @@ -354,7 +363,7 @@ generate config_args distdir directory variablePrefix ++ "_HC_OPTS = " ++ escape (unwords ( programDefaultArgs ghcProg ++ hcOptions GHC bi - ++ extensionsToFlags (compiler lbi) (extensions bi) + ++ extensionsToFlags (compiler lbi) (usedExtensions bi) ++ programOverrideArgs ghcProg)), variablePrefix ++ "_CC_OPTS = " ++ unwords (ccOptions bi), variablePrefix ++ "_CPP_OPTS = " ++ unwords (cppOptions bi),