[project @ 2002-12-06 09:50:22 by simonmar]
authorsimonmar <unknown>
Fri, 6 Dec 2002 09:50:22 +0000 (09:50 +0000)
committersimonmar <unknown>
Fri, 6 Dec 2002 09:50:22 +0000 (09:50 +0000)
Stub objects are called foo_stub.o, not foo.stub_o.  In other words,
findLinkable (aka maybe_getFileLinkable in the 5.04 branch) has never
worked.

ghc/compiler/main/Finder.lhs

index 3491a72..348eee6 100644 (file)
@@ -312,13 +312,11 @@ mkHomeModLocation mod_name is_root path basename extension = do
 
    addToFinderCache mod_name result
    return result
-\end{code}
 
 -- -----------------------------------------------------------------------------
 -- findLinkable isn't related to the other stuff in here, 
 -- but there' no other obvious place for it
 
-\begin{code}
 findLinkable :: ModuleName -> ModLocation -> IO (Maybe Linkable)
 findLinkable mod locn
    | Just obj_fn <- ml_obj_file locn
@@ -327,7 +325,7 @@ findLinkable mod locn
          then return Nothing 
          else 
          do let stub_fn = case splitFilename3 obj_fn of
-                             (dir, base, ext) -> dir ++ "/" ++ base ++ ".stub_o"
+                             (dir, base, ext) -> dir ++ "/" ++ base ++ "_stub.o"
             stub_exist <- doesFileExist stub_fn
             obj_time <- getModificationTime obj_fn
             if stub_exist
@@ -335,4 +333,4 @@ findLinkable mod locn
              else return (Just (LM obj_time mod [DotO obj_fn]))
    | otherwise
    = return Nothing
-\end{code}
\ No newline at end of file
+\end{code}