Skip to content

Commit 7e1152e

Browse files
committed
Merge branch 'master' of github.com:haskell/cabal
2 parents 7e1bf9c + f9bec6b commit 7e1152e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cabal/Distribution/Simple/GHC.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,11 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
809809
}
810810
odir = fromFlag (ghcOptObjDir vanillaCcOpts)
811811
createDirectoryIfMissingVerbose verbosity True odir
812-
runGhcProg vanillaCcOpts
812+
runGhcProg (if isGhcDynamic
813+
-- Dynamic GHC requires C sources to be built with
814+
-- -fPIC for REPL to work. See #2207.
815+
then vanillaCcOpts { ghcOptFPic = toFlag True }
816+
else vanillaCcOpts)
813817
unless forRepl $
814818
whenSharedLib forceSharedLib (runGhcProg sharedCcOpts)
815819
unless forRepl $ whenProfLib (runGhcProg profCcOpts)

cabal-install/Distribution/Client/Setup.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,8 @@ sandboxCommand = CommandUI {
16361636
commandUsage = \pname ->
16371637
"Usage: " ++ pname ++ " sandbox init\n"
16381638
++ " or: " ++ pname ++ " sandbox delete\n"
1639-
++ " or: " ++ pname ++ " sandbox add-source [PATHS]\n\n"
1639+
++ " or: " ++ pname ++ " sandbox add-source [PATHS]\n"
1640+
++ " or: " ++ pname ++ " sandbox delete-source [PATHS]\n\n"
16401641
++ " or: " ++ pname ++ " sandbox hc-pkg -- [ARGS]\n"
16411642
++ " or: " ++ pname ++ " sandbox list-sources\n\n"
16421643
++ "Flags for sandbox:",

cabal-install/Main.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,13 +1052,14 @@ sandboxAction sandboxFlags extraArgs globalFlags = do
10521052
sandboxHcPkg verbosity sandboxFlags globalFlags extra
10531053
["buildopts"] -> die "Not implemented!"
10541054

1055-
-- Hidden commands.
10561055
("delete-source":extra) -> do
10571056
when (noExtraArgs extra) $
10581057
die "The 'sandbox delete-source' command expects \
10591058
\at least one argument"
10601059
sandboxDeleteSource verbosity extra sandboxFlags globalFlags
10611060
["list-sources"] -> sandboxListSources verbosity sandboxFlags globalFlags
1061+
1062+
-- Hidden commands.
10621063
["dump-pkgenv"] -> dumpPackageEnvironment verbosity sandboxFlags globalFlags
10631064

10641065
-- Error handling.

0 commit comments

Comments
 (0)