File tree 3 files changed +9
-3
lines changed
Cabal/Distribution/Simple 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -809,7 +809,11 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
809
809
}
810
810
odir = fromFlag (ghcOptObjDir vanillaCcOpts)
811
811
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)
813
817
unless forRepl $
814
818
whenSharedLib forceSharedLib (runGhcProg sharedCcOpts)
815
819
unless forRepl $ whenProfLib (runGhcProg profCcOpts)
Original file line number Diff line number Diff line change @@ -1636,7 +1636,8 @@ sandboxCommand = CommandUI {
1636
1636
commandUsage = \ pname ->
1637
1637
" Usage: " ++ pname ++ " sandbox init\n "
1638
1638
++ " 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 "
1640
1641
++ " or: " ++ pname ++ " sandbox hc-pkg -- [ARGS]\n "
1641
1642
++ " or: " ++ pname ++ " sandbox list-sources\n\n "
1642
1643
++ " Flags for sandbox:" ,
Original file line number Diff line number Diff line change @@ -1052,13 +1052,14 @@ sandboxAction sandboxFlags extraArgs globalFlags = do
1052
1052
sandboxHcPkg verbosity sandboxFlags globalFlags extra
1053
1053
[" buildopts" ] -> die " Not implemented!"
1054
1054
1055
- -- Hidden commands.
1056
1055
(" delete-source" : extra) -> do
1057
1056
when (noExtraArgs extra) $
1058
1057
die " The 'sandbox delete-source' command expects \
1059
1058
\at least one argument"
1060
1059
sandboxDeleteSource verbosity extra sandboxFlags globalFlags
1061
1060
[" list-sources" ] -> sandboxListSources verbosity sandboxFlags globalFlags
1061
+
1062
+ -- Hidden commands.
1062
1063
[" dump-pkgenv" ] -> dumpPackageEnvironment verbosity sandboxFlags globalFlags
1063
1064
1064
1065
-- Error handling.
You can’t perform that action at this time.
0 commit comments