1. 10 Feb, 2005 1 commit
  2. 04 Feb, 2005 1 commit
  3. 02 Feb, 2005 1 commit
  4. 31 Jan, 2005 1 commit
  5. 26 Jan, 2005 2 commits
  6. 14 Jan, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-01-14 08:01:26 by wolfgang] · 4f457f34
      wolfgang authored
      Dynamic Linking, Part 2:
      
      Hack the Makefiles to build dynamic libraries.
      This allows you to actually use dynamic libraries to greatly reduce binary
      sizes on Darwin/PowerPC and on powerpc64-linux (for now).
      
      To use this, add the following to your build.mk
      
      SplitObjs=NO
      GhcBuildDylibs=YES
      GhcStage2HcOpts=-dynamic
      GhcLibHcOpts+=-fPIC -dynamic
      GhcRtsHcOpts+=-fPIC -dynamic
      GHC_CC_OPTS+=-fPIC
      
      (You can leave out the last three lines on powerpc64-linux).
      
      Then, to compile a program using dynamic libraries, pass the -dynamic option to GHC.
      To make GHCi use the dynamic libraries instead of .o files, just delete the HS*.o files.
      
      The dynamic library files are named libHSfoo_dyn.dylib or libHSfoo_dyn.so.
      
      Note that the dynamic and static libraries are build from the same .o files,
      but we really want to build the static libraries with SplitObjs and without
      -fPIC -dynamic to achieve better code size and performance.
      
      ghc/compiler/ghci/Linker.lhs:
          When looking for a library, look for HSfoo.o first (as before),
          then look for libHSfoo_dyn.[so/dylib] before looking for
          libHSfoo.[so/dylib].
      
      ghc/compiler/main/DriverPipeline.hs:
          Main.dll_o and PrelMain.dll_o are dead, at least for now.
      
      ghc/compiler/main/Packages.lhs:
          When -dynamic is specified, add "_dyn" to all libraries specified in
          hs-libraries (not to the extra-libs).
      
      ghc/lib/compat/Makefile:
          Never build libghccompat as a dynamic lib.
      
      mk/package.mk:
          if GhcBuildDylibs is set to YES, build dynamic libraries.
      
      mk/target.mk:
          When installing .dylibs (Darwin only), update the install_name to point
          to the final location.
          (Somebody please read Apple's documentation on what install_names are,
          and then comment on whether this is a useful feature or whether it should
          be done the "normal" unix way).
      4f457f34
  7. 12 Jan, 2005 1 commit
  8. 06 Jan, 2005 1 commit
  9. 30 Nov, 2004 1 commit
  10. 26 Nov, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-11-26 16:19:45 by simonmar] · ef5b4b14
      simonmar authored
      Further integration with the new package story.  GHC now supports
      pretty much everything in the package proposal.
      
        - GHC now works in terms of PackageIds (<pkg>-<version>) rather than
          just package names.  You can still specify package names without
          versions on the command line, as long as the name is unambiguous.
      
        - GHC understands hidden/exposed modules in a package, and will refuse
          to import a hidden module.  Also, the hidden/eposed status of packages
          is taken into account.
      
        - I had to remove the old package syntax from ghc-pkg, backwards
          compatibility isn't really practical.
      
        - All the package.conf.in files have been rewritten in the new syntax,
          and contain a complete list of modules in the package.  I've set all
          the versions to 1.0 for now - please check your package(s) and fix the
          version number & other info appropriately.
      
        - New options:
      
      	-hide-package P    sets the expose flag on package P to False
      	-ignore-package P  unregisters P for this compilation
      
      	For comparison, -package P sets the expose flag on package P
              to True, and also causes P to be linked in eagerly.
      
              -package-name is no longer officially supported.  Unofficially, it's
      	a synonym for -ignore-package, which has more or less the same effect
      	as -package-name used to.
      
      	Note that a package may be hidden and yet still be linked into
      	the program, by virtue of being a dependency of some other package.
      	To completely remove a package from the compiler's internal database,
              use -ignore-package.
      
      	The compiler will complain if any two packages in the
              transitive closure of exposed packages contain the same
              module.
      
      	You *must* use -ignore-package P when compiling modules for
              package P, if package P (or an older version of P) is already
              registered.  The compiler will helpfully complain if you don't.
      	The fptools build system does this.
      
         - Note: the Cabal library won't work yet.  It still thinks GHC uses
           the old package config syntax.
      
      Internal changes/cleanups:
      
         - The ModuleName type has gone away.  Modules are now just (a
           newtype of) FastStrings, and don't contain any package information.
           All the package-related knowledge is in DynFlags, which is passed
           down to where it is needed.
      
         - DynFlags manipulation has been cleaned up somewhat: there are no
           global variables holding DynFlags any more, instead the DynFlags
           are passed around properly.
      
         - There are a few less global variables in GHC.  Lots more are
           scheduled for removal.
      
         - -i is now a dynamic flag, as are all the package-related flags (but
           using them in {-# OPTIONS #-} is Officially Not Recommended).
      
         - make -j now appears to work under fptools/libraries/.  Probably
           wouldn't take much to get it working for a whole build.
      ef5b4b14
  11. 17 Nov, 2004 1 commit
  12. 15 Nov, 2004 1 commit
  13. 14 Nov, 2004 1 commit
  14. 11 Nov, 2004 2 commits
  15. 10 Nov, 2004 1 commit
  16. 09 Nov, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-11-09 17:21:58 by simonmar] · 120f1442
      simonmar authored
      Add a compatibility library, which will mean that we can make use of
      brand new libraries directly in GHC and the tools even when compiling
      with older versions of GHC.  The library just consists of stubs that
      #include code from fptools/libraries.
      
      This isn't wired up to the build yet.
      120f1442