From 6ec7f45fd25a978c9f955f0c07790e1e42949d4b Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 31 May 2001 09:37:23 +0000 Subject: [PATCH] [project @ 2001-05-31 09:37:23 by simonmar] Clarify the situation with GHCi object files, and add instructions for building one from a .a file. --- ghc/docs/users_guide/packages.sgml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/ghc/docs/users_guide/packages.sgml b/ghc/docs/users_guide/packages.sgml index 9ba677d..1ef87cb 100644 --- a/ghc/docs/users_guide/packages.sgml +++ b/ghc/docs/users_guide/packages.sgml @@ -80,6 +80,19 @@ tell the compiler when it should make an inter-DLL call rather than an intra-DLL call (inter-DLL calls require an extra indirection). + + Versions of the Haskell libraries for use with GHCi + may also be included: GHCi cannot load .a + files directly, instead it will look for an object file + called HSfoo.o (the object suffix + varies between platforms, as usual) and load that. An + object file can be built from a .a + archive as follows (using GNU ld on + Unix): + + +ld -r --whole-archive -o HSfoo.o libHSfoo.a + @@ -266,6 +279,42 @@ package, with the .a or .dll suffix omitted. On Unix, the lib prefix is also omitted. + + For use with GHCi, each library should have an + object file too. The name of the object file does + not have a lib + prefix, and has the normal object suffix for your + platform. + + For example, if we specify a Haskell library as + HSfoo in the package spec, then the + various flavours of library that GHC actually uses will be + called: + + + libHSfoo.a + + The name of the library on Unix + systems. + + + + HSfoo.dll + + The name of the dynamic library on Windows + systems. + + + + HSfoo.o + HSfoo.obj + + The object version of the library used by + GHCi. + + + + -- 1.7.10.4