From 4f7d5513b25571f0eb091b8af04e2225f2802fed Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 13 Dec 2010 12:49:30 +0000 Subject: [PATCH] GHCi linker: Assume non-Haskell libraries are dynamic libs This works around a segfault we get when trying to load libiconv.a on some platforms. --- compiler/ghci/Linker.lhs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs index 29228b1..bd0bb35 100644 --- a/compiler/ghci/Linker.lhs +++ b/compiler/ghci/Linker.lhs @@ -1105,6 +1105,9 @@ loadFrameworks pkg -- If it isn't present, we assume it's a dynamic library. locateOneObj :: [FilePath] -> String -> IO LibrarySpec locateOneObj dirs lib + | not ("HS" `isPrefixOf` lib) + -- For non-Haskell libraries (e.g. gmp, iconv) we assume dynamic library + = assumeDll | not isDynamicGhcLib -- When the GHC package was not compiled as dynamic library -- (=DYNAMIC not set), we search for .o libraries or, if they -- 1.7.10.4