From 016b10c50e365ca62a9baffa1c590f4efa8db409 Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Mon, 6 Mar 2017 13:42:47 -0500 Subject: [PATCH] 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 --- compiler/ghci/Linker.hs | 6 ++++-- 1 file 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 -- GitLab