1. 18 Jan, 2005 7 commits
    • simonmar's avatar
      [project @ 2005-01-18 16:28:43 by simonmar] · 9cb75205
      simonmar authored
      USE_MMAP on Linux too: this is needed for sparc64-unknown-linux at
      least, and since it seems to work on i386-unknown-linux too we might
      as well enable it.  We should probably use it on more arches/OSs too.
      9cb75205
    • simonpj's avatar
      [project @ 2005-01-18 15:58:12 by simonpj] · 4a667166
      simonpj authored
      Wibble
      4a667166
    • simonmar's avatar
      [project @ 2005-01-18 13:51:28 by simonmar] · 79a733f5
      simonmar authored
      Update a comment
      79a733f5
    • simonpj's avatar
      [project @ 2005-01-18 12:18:11 by simonpj] · ac80e0de
      simonpj authored
      ------------------------
          Reorganisation of hi-boot files
        	------------------------
      
      The main point of this commit is to arrange that in the Compilation
      Manager's dependendency graph, hi-boot files are proper nodes. This
      is important to make sure that we compile everything in the right
      order.  It's a step towards hs-boot files.
      
      * The fundamental change is that CompManager.ModSummary has a new
        field, ms_boot :: IsBootInterface
      
        I also tided up CompManager a bit.  No change to the Basic Plan.
      
        ModSummary is now exported abstractly from CompManager (was concrete)
      
      * Hi-boot files now have import declarations.  The idea is they are
        compulsory, so that the dependency analyser can find them
      
      * I changed an invariant: the Compilation Manager used to ensure that
        hscMain was given a HomePackageTable only for the modules 'below' the
        one being compiled.  This was really only important for instances and
        rules, and it was a bit inconvenient.  So I moved the filter to the
        compiler itself: see HscTypes.hptInstances and hptRules.
      
      * Module Packages.hs now defines
          data PackageIdH
          = HomePackage 		-- The "home" package is the package
       				-- curently being compiled
          | ExtPackage PackageId	-- An "external" package is any other package
      
         It was just a Maybe type before, so this makes it a bit clearer.
      
      * I tried to add a bit better location info to the IfM monad, so that
        errors in interfaces come with a slightly more helpful error message.
        See the if_loc field in TcRnTypes --- and follow-on consequences
      
      * Changed Either to Maybes.MaybeErr in a couple of places (more perspicuous)
      ac80e0de
    • simonmar's avatar
      [project @ 2005-01-18 11:31:03 by simonmar] · 43d5a248
      simonmar authored
      Try again: Complain if --enable-src-tree-{happy,alex,haddock} is
      given, but the relevant sources don't exist.
      43d5a248
    • simonmar's avatar
      [project @ 2005-01-18 11:30:17 by simonmar] · be92500d
      simonmar authored
      Revert previous, used wrong version of aclocal.m4
      be92500d
    • simonmar's avatar
      [project @ 2005-01-18 11:15:53 by simonmar] · 0bdaec6a
      simonmar authored
      Complain if --enable-src-tree-{happy,alex,haddock} is given, but the
      relevant sources don't exist.
      0bdaec6a
  2. 17 Jan, 2005 2 commits
  3. 16 Jan, 2005 2 commits
    • wolfgang's avatar
      [project @ 2005-01-16 05:31:39 by wolfgang] · 7a1b0a6c
      wolfgang authored
      A first stab at position independent code generation for i386-linux.
      It doesn't work yet, but it shouldn't break anything.
      
      What we need now is one or both of the following:
      a) A volunteer to implement PIC for x86 -fvia-C
          (I definitely refuse to touch any piece of code that contains
           both Perl and x86 assembly).
      b) A volunteer to improve the NCG to the point where it can compile
         the RTS (so we won't need point a).
      7a1b0a6c
    • wolfgang's avatar
      [project @ 2005-01-16 02:50:16 by wolfgang] · e195ea85
      wolfgang authored
      pprExpr: add cases for CmmPicBaseReg and CmmRegOff
      so that we can do -fPIC -ddump-opt-cmm
      e195ea85
  4. 14 Jan, 2005 7 commits
    • wolfgang's avatar
      [project @ 2005-01-14 22:47:29 by wolfgang] · 05990bef
      wolfgang authored
      Fix a typo in the previous commit.
      05990bef
    • wolfgang's avatar
      [project @ 2005-01-14 22:12:54 by wolfgang] · acea64ed
      wolfgang authored
      When -dynamic is specified but -fPIC is not, generate code that works around
      the ELF dynamic linker's misguided attempts to keep the main program unaware
      of dynamic linking.
      
      This involves generating indirect references and computed jumps for position
      dependent code, too, and making all constant data sections writable in order
      to persuade ld to not use "COPY" relocations.
      
      Tested on powerpc-linux; in theory, it also applies to i386-linux, but other
      parts of the PIC story are missing there.
      
      Note that the writable-const-data hack could be improved a bit by
      distinguishing between "really" constant data and "relocatable" constant data,
      which would be a nice thing to do anyway.
      acea64ed
    • simonmar's avatar
      [project @ 2005-01-14 17:57:41 by simonmar] · c464eda3
      simonmar authored
      HEADS UP!  You now need to use an up to date Happy from CVS to build
      GHC.  Happy version 1.15 will be released shortly.
      
      Replace the slow hacked up String-based GetImports with one based on
      the real Haskell parser.  This requires a new addition to Happy to
      support parsing partial files.  We now avoid reading each source file
      off the disk twice: once to get its module name and imports, and again
      to parse it.  Instead we just slurp it once, and cache the StringBuffer.
      
      This should result in improved startup times for ghc --make,
      especially when there are lots of source files.
      c464eda3
    • simonmar's avatar
      [project @ 2005-01-14 16:00:55 by simonmar] · c7333e5d
      simonmar authored
      Add mk/fptools.css to $(SRC_DIST_FILES)
      c7333e5d
    • simonmar's avatar
      [project @ 2005-01-14 11:46:24 by simonmar] · 5155d694
      simonmar authored
      hGetStringBuffer: hClose the file after we've read it (duh).  This
      causes a real problem on Windows, where the file remains locked in
      GHCi, and cannot be modified until after the finalizer has closed it
      (bug #1047408).
      5155d694
    • simonmar's avatar
      [project @ 2005-01-14 11:34:44 by simonmar] · 20b21f5b
      simonmar authored
      retire $(compiling_with_4xx): we don't support compiling with 4.x any more
      20b21f5b
    • 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
  5. 13 Jan, 2005 10 commits
  6. 12 Jan, 2005 12 commits