projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make -dynload sysdep mean to embed rpaths in shared libs as well as binaries
[ghc-hetmet.git]
/
compiler
/
main
/
Packages.lhs
diff --git
a/compiler/main/Packages.lhs
b/compiler/main/Packages.lhs
index
41ca465
..
86b4693
100644
(file)
--- a/
compiler/main/Packages.lhs
+++ b/
compiler/main/Packages.lhs
@@
-26,6
+26,7
@@
module Packages (
getPreloadPackagesAnd,
collectIncludeDirs, collectLibraryPaths, collectLinkOpts,
getPreloadPackagesAnd,
collectIncludeDirs, collectLibraryPaths, collectLinkOpts,
+ packageHsLibs,
-- * Utils
isDllName
-- * Utils
isDllName
@@
-391,8
+392,7
@@
findWiredInPackages dflags pkgs preload this_package = do
(haskell98PackageId, [""]),
(thPackageId, [""]),
(dphSeqPackageId, [""]),
(haskell98PackageId, [""]),
(thPackageId, [""]),
(dphSeqPackageId, [""]),
- (dphParPackageId, [""]),
- (ndpPackageId, ["-seq", "-par"]) ]
+ (dphParPackageId, [""])]
matches :: PackageConfig -> (PackageId, [String]) -> Bool
pc `matches` (pid, suffixes)
matches :: PackageConfig -> (PackageId, [String]) -> Bool
pc `matches` (pid, suffixes)
@@
-640,14
+640,17
@@
getPackageLinkOpts dflags pkgs =
collectLinkOpts :: DynFlags -> [PackageConfig] -> [String]
collectLinkOpts dflags ps = concat (map all_opts ps)
where
collectLinkOpts :: DynFlags -> [PackageConfig] -> [String]
collectLinkOpts dflags ps = concat (map all_opts ps)
where
+ libs p = packageHsLibs dflags p ++ extraLibraries p
+ all_opts p = map ("-l" ++) (libs p) ++ ldOptions p
+
+packageHsLibs :: DynFlags -> PackageConfig -> [String]
+packageHsLibs dflags p = map (mkDynName . addSuffix) (hsLibraries p)
+ where
tag = buildTag dflags
rts_tag = rtsBuildTag dflags
mkDynName | opt_Static = id
| otherwise = (++ ("-ghc" ++ cProjectVersion))
tag = buildTag dflags
rts_tag = rtsBuildTag dflags
mkDynName | opt_Static = id
| otherwise = (++ ("-ghc" ++ cProjectVersion))
- libs p = map (mkDynName . addSuffix) (hsLibraries p)
- ++ extraLibraries p
- all_opts p = map ("-l" ++) (libs p) ++ ldOptions p
addSuffix rts@"HSrts" = rts ++ (expandTag rts_tag)
addSuffix other_lib = other_lib ++ (expandTag tag)
addSuffix rts@"HSrts" = rts ++ (expandTag rts_tag)
addSuffix other_lib = other_lib ++ (expandTag tag)