summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2017-03-06 13:42:47 -0500
committerBen Gamari <ben@smart-cactus.org>2017-03-06 16:16:18 -0500
commit016b10c50e365ca62a9baffa1c590f4efa8db409 (patch)
treea1042d2a38067854dbd94cda2bb39c73f51b9acd
parent8ca4bb1ce9d94bb9f519f620c1f5ed8063007d33 (diff)
downloadhaskell-016b10c50e365ca62a9baffa1c590f4efa8db409.tar.gz
Add GCC bin folder to search path.
D3155 added pthread by default to GHCi. However this was only tested using something running in an msys2 shell. As it turns out it's been picking up pthread in the environment and not the inplace gcc. This results in an error when using ghci outside of msys2. Test Plan: start cmd, start ghc-stage2 --interactive Reviewers: austin, hvr, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3279
-rw-r--r--compiler/ghci/Linker.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index 49f57e51b0..390d914169 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -345,8 +345,10 @@ linkCmdLineLibs' hsc_env pls =
if null cmdline_lib_specs then return pls
else do
- -- Add directories to library search paths
- let all_paths = let paths = framework_paths
+ -- Add directories to library search paths, this only has an effect
+ -- on Windows. On Unix OSes this function is a NOP.
+ let all_paths = let paths = takeDirectory (fst $ sPgm_c $ settings dflags)
+ : framework_paths
++ lib_paths
++ [ takeDirectory dll | DLLPath dll <- libspecs ]
in nub $ map normalise paths