X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FPackages.lhs;h=7cb3337267537367c432efc0957c0767d6a546bb;hb=21c5c9c09a8d36b4ae8a83b17b543c332bc9cb0c;hp=e2a0a047f2834d4e85a9fad0606706c3a712ed09;hpb=880a6b90ba6d93e55a464bea585f9d7c5e4abfb3;p=ghc-hetmet.git diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs index e2a0a04..7cb3337 100644 --- a/compiler/main/Packages.lhs +++ b/compiler/main/Packages.lhs @@ -38,7 +38,7 @@ where import PackageConfig import ParsePkgConf ( loadPackageConfig ) import DynFlags ( dopt, DynFlag(..), DynFlags(..), PackageFlag(..) ) -import StaticFlags ( opt_Static ) +import StaticFlags import Config ( cProjectVersion ) import Name ( Name, nameModule_maybe ) import UniqFM @@ -51,8 +51,6 @@ import Outputable import System.Environment ( getEnv ) import Distribution.InstalledPackageInfo hiding (depends) import Distribution.Package hiding (depends, PackageId) -import Distribution.Text -import Distribution.Version import FastString import ErrUtils ( debugTraceMsg, putMsg, Message ) import Exception @@ -267,8 +265,8 @@ mungePackagePaths top_dir ps = map munge_pkg ps munge_paths = map munge_path munge_path p - | Just p' <- maybePrefixMatch "$topdir" p = top_dir ++ p' - | Just p' <- maybePrefixMatch "$httptopdir" p = toHttpPath top_dir ++ p' + | Just p' <- stripPrefix "$topdir" p = top_dir ++ p' + | Just p' <- stripPrefix "$httptopdir" p = toHttpPath top_dir ++ p' | otherwise = p toHttpPath p = "file:///" ++ p @@ -390,11 +388,9 @@ findWiredInPackages dflags pkgs preload this_package = do (basePackageId, [""]), (rtsPackageId, [""]), (haskell98PackageId, [""]), - (sybPackageId, [""]), (thPackageId, [""]), (dphSeqPackageId, [""]), - (dphParPackageId, [""]), - (ndpPackageId, ["-seq", "-par"]) ] + (dphParPackageId, [""])] matches :: PackageConfig -> (PackageId, [String]) -> Bool pc `matches` (pid, suffixes) @@ -648,8 +644,12 @@ collectLinkOpts dflags ps = concat (map all_opts ps) packageHsLibs :: DynFlags -> PackageConfig -> [String] packageHsLibs dflags p = map (mkDynName . addSuffix) (hsLibraries p) where - tag = buildTag dflags - rts_tag = rtsBuildTag dflags + non_dyn_ways = filter ((/= WayDyn) . wayName) (ways dflags) + -- the name of a shared library is libHSfoo-ghc.so + -- we leave out the _dyn, because it is superfluous + + tag = mkBuildTag (filter (not . wayRTSOnly) non_dyn_ways) + rts_tag = mkBuildTag non_dyn_ways mkDynName | opt_Static = id | otherwise = (++ ("-ghc" ++ cProjectVersion))