1. 14 Nov, 2016 1 commit
    • Ben Gamari's avatar
      rts: Fix build when linked with gold · 6bee8644
      Ben Gamari authored
      As reported in #12812, the runtime system fails to build when linked
      with gold due to a missing dependency on libpthread.
      
      Additionally, rts/package.conf.in uses the WORD_SIZE_IN_BITS macro
      defined by MachDeps.h, which it does not #include. Fix this.
      
      Test Plan: Validate with gold linker
      
      Reviewers: hsyl20, austin, erikd, simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2695
      
      GHC Trac Issues: #12816
      
      (cherry picked from commit 2cfbee89)
      6bee8644
  2. 18 Nov, 2015 1 commit
  3. 01 Nov, 2015 1 commit
    • kgardas's avatar
      Enforce linkage with pthread library on OpenBSD · c8e866a1
      kgardas authored
      This patch enforces linkage with pthread library on OpenBSD. This is
      done in order to avoid linker errors when linking with libffi which
      requires POSIX threading but itself is not linked with libpthread
      directly. So client binaries (of libffi) needs to link against
      libpthread explicitly
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D1410
      c8e866a1
  4. 17 Oct, 2015 1 commit
    • Ben Gamari's avatar
      Libdw: Add libdw-based stack unwinding · a6a3dabc
      Ben Gamari authored
      This adds basic support to the RTS for DWARF-assisted unwinding of the
      Haskell and C stack via libdw. This only adds the infrastructure;
      consumers of this functionality will be introduced in future diffs.
      
      Currently we are carrying the initial register collection code in
      Libdw.c but this will eventually make its way upstream to libdw.
      
      Test Plan: See future patches
      
      Reviewers: Tarrasch, scpmw, austin, simonmar
      
      Reviewed By: austin, simonmar
      
      Subscribers: simonmar, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D1196
      
      GHC Trac Issues: #10656
      a6a3dabc
  5. 15 Oct, 2015 1 commit
    • Edward Z. Yang's avatar
      Update Cabal to HEAD, IPID renamed to Component ID. · 5b0191f7
      Edward Z. Yang authored
      
      
      This commit contains a Cabal submodule update which unifies installed
      package IDs and package keys under a single notion, a Component ID.
      We update GHC to keep follow this unification.  However, this commit
      does NOT rename installed package ID to component ID and package key to
      unit ID; the plan is to do that in a companion commit.
      
          - Compiler info now has "Requires unified installed package IDs"
      
          - 'exposed' is now expected to contain unit keys, not IPIDs.
      
          - Shadowing is no more.  We now just have a very simple strategy
            to deal with duplicate unit keys in combined package databases:
            if their ABIs are the same, use the latest one; otherwise error.
            Package databases maintain the invariant that there can only
            be one entry of a unit ID.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari, hvr, goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1184
      
      GHC Trac Issues: #10714
      5b0191f7
  6. 10 Dec, 2014 1 commit
    • Marios Titas's avatar
      compiler: fix trac issue #9817 · 7ca5bb09
      Marios Titas authored
      Summary:
      When we call runHandlers, we must pass it a ForeignPtr. To ensure that
      this happens, we introduce a wrapper that receives a plain Ptr and
      converts it into a ForeignPtr. Then we adjust startSignalHandlers in
      rts/posix/Signals.c to call the wrapper instead of calling runHandlers
      directly.
      
      Reviewers: hvr, austin, rwbarton, simonmar
      
      Reviewed By: austin, simonmar
      
      Subscribers: simonmar, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D515
      
      GHC Trac Issues: #9817
      7ca5bb09
  7. 12 Nov, 2014 1 commit
  8. 20 Oct, 2014 1 commit
  9. 02 Oct, 2014 1 commit
    • Edward Z. Yang's avatar
      Rename _closure to _static_closure, apply naming consistently. · 35672072
      Edward Z. Yang authored
      
      
      Summary:
      In preparation for indirecting all references to closures,
      we rename _closure to _static_closure to ensure any old code
      will get an undefined symbol error.  In order to reference
      a closure foobar_closure (which is now undefined), you should instead
      use STATIC_CLOSURE(foobar).  For convenience, a number of these
      old identifiers are macro'd.
      
      Across C-- and C (Windows and otherwise), there were differing
      conventions on whether or not foobar_closure or &foobar_closure
      was the address of the closure.  Now, all foobar_closure references
      are addresses, and no & is necessary.
      
      CHARLIKE/INTLIKE were not changed, simply alpha-renamed.
      
      Part of remove HEAP_ALLOCED patch set (#8199)
      
      Depends on D265
      Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@mit.edu>
      
      Test Plan: validate
      
      Reviewers: simonmar, austin
      
      Subscribers: simonmar, ezyang, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D267
      
      GHC Trac Issues: #8199
      35672072
  10. 05 Aug, 2014 1 commit
    • Edward Z. Yang's avatar
      Package keys (for linking/type equality) separated from package IDs. · 66218d15
      Edward Z. Yang authored
      
      
      This patch set makes us no longer assume that a package key is a human
      readable string, leaving Cabal free to "do whatever it wants" to allocate
      keys; we'll look up the PackageId in the database to display to the user.
      This also means we have a new level of qualifier decisions to make at the
      package level, and rewriting some Safe Haskell error reporting code to DTRT.
      
      Additionally, we adjust the build system to use a new ghc-cabal output
      Make variable PACKAGE_KEY to determine library names and other things,
      rather than concatenating PACKAGE/VERSION as before.
      
      Adds a new `-this-package-key` flag to subsume the old, erroneously named
      `-package-name` flag, and `-package-key` to select packages by package key.
      
      RFC: The md5 hashes are pretty tough on the eye, as far as the file
      system is concerned :(
      
      ToDo: safePkg01 test had its output updated, but the fix is not really right:
      the rest of the dependencies are truncated due to the fact the we're only
      grepping a single line, but ghc-pkg is wrapping its output.
      
      ToDo: In a later commit, update all submodules to stop using -package-name
      and use -this-package-key.  For now, we don't do it to avoid submodule
      explosion.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, simonmar, hvr, austin
      
      Subscribers: simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D80
      66218d15
  11. 08 Jun, 2014 1 commit
    • Sergei Trofimovich's avatar
      Raise exceptions when blocked in bad FDs (fixes Trac #4934) · 9fd507e5
      Sergei Trofimovich authored
      
      
      Before the patch any call to 'select()' with 'bad_fd' led to:
      - unblocking of all threads
      - hiding exception for 'threadWaitRead bad_fd'
      
      The patch fixes both cases in this way:
      after 'select()' failure we iterate over each blocked descriptor
      and poll individually to see it's actual status, which is:
      - READY (move to run queue)
      - BLOCKED (leave in blocked queue)
      - INVALID (send an IOErrror exception)
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      9fd507e5
  12. 04 May, 2014 1 commit
  13. 03 May, 2014 1 commit
    • Sergei Trofimovich's avatar
      fix rts exported symbols base_GHCziIOziException_allocationLimitExceeded_closure · 54b31f74
      Sergei Trofimovich authored
      Commit  b0534f78
      
       added new exported rts symbols,
      but slightly misspelled them.
      
      Observer on first compiled program:
      > Linking dist/build/haskell-updater/haskell-updater ...
      > /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(Schedule.o): In function `scheduleWaitThread':
      > (.text+0xc4c): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
      > /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
      > (.text+0x2fa): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
      > collect2: error: ld returned 1 exit status
      
      CC: Simon Marlow <marlowsd@gmail.com>
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      54b31f74
  14. 02 May, 2014 1 commit
    • Simon Marlow's avatar
      Per-thread allocation counters and limits · b0534f78
      Simon Marlow authored
      This tracks the amount of memory allocation by each thread in a
      counter stored in the TSO.  Optionally, when the counter drops below
      zero (it counts down), the thread can be sent an asynchronous
      exception: AllocationLimitExceeded.  When this happens, given a small
      additional limit so that it can handle the exception.  See
      documentation in GHC.Conc for more details.
      
      Allocation limits are similar to timeouts, but
      
        - timeouts use real time, not CPU time.  Allocation limits do not
          count anything while the thread is blocked or in foreign code.
      
        - timeouts don't re-trigger if the thread catches the exception,
          allocation limits do.
      
        - timeouts can catch non-allocating loops, if you use
          -fno-omit-yields.  This doesn't work for allocation limits.
      
      I couldn't measure any impact on benchmarks with these changes, even
      for nofib/smp.
      b0534f78
  15. 17 Feb, 2014 1 commit
  16. 20 Jun, 2013 1 commit
  17. 19 Jun, 2013 7 commits
  18. 28 Apr, 2013 1 commit
  19. 27 Apr, 2013 1 commit
  20. 23 Mar, 2013 1 commit
    • ian@well-typed.com's avatar
      Change how we handle libffi · b30015e7
      ian@well-typed.com authored
      I think overall the new approach is simpler. Rather than unpacking
      the libffi.a and putting the .o files into our libHSrts.a, we just
      use the libffi.a.
      
      This change also means that when compiling programs for the dyn
      way, they get explicitly linked against libffi.so (rather than
      relying on librts.so being linked against it). This might
      fix a problem on FreeBSD, where programs cannot find libffi.so.
      b30015e7
  21. 12 Feb, 2013 2 commits
  22. 29 Nov, 2012 1 commit
    • ian@well-typed.com's avatar
      Add configure option to use system provided libffi; fixes #5743 · 3005e909
      ian@well-typed.com authored
      Based on patch from Peter Trommler:
      
          From 293495d40f62e691520331a41c6d85d82e120169 Mon Sep 17 00:00:00 2001
          From: Peter Trommler <ptrommler@acm.org>
          Date: Sun, 21 Oct 2012 18:47:01 +0200
          Subject: [PATCH] Add configure option to use system provided libffi This
           fixes track # 5743 and #4496.
      3005e909
  23. 03 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Build the dynamic way by default on Linux/amd64 · 898cb090
      ian@well-typed.com authored
      This required various build system changes to get the build to go
      through.
      
      In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs
      to find their libraries. In the future, we might change the inplace tree
      to be the same shape as an installed tree instead. However, this would
      mean changing the way we do installation, as currently we use cabal's
      installation methods to install the libraries, but that only works if
      the libraries are under libraries/foo/dist-install/build/..., rather
      than in inplace/lib/...
      898cb090
  24. 12 Sep, 2012 1 commit
  25. 21 May, 2012 1 commit
  26. 02 May, 2012 2 commits
  27. 12 Jan, 2012 1 commit
  28. 08 Jan, 2012 1 commit
    • Ian Lynagh's avatar
      Refactoring · 9e452874
      Ian Lynagh authored
      This is working towards being able to put ghcautoconf.h and
      ghcplatform.h in includes/dist
      9e452874
  29. 08 Dec, 2011 1 commit
    • PHO's avatar
      Resurrect UseLibFFIForAdjustors from bitrot. · 616b6697
      PHO authored
      * Pass -Irts/dist/build to the C preprocessor to expose libffi headers (ffi.h and ffitarget.h) to foreign import wrappers during the building process of GHC itself.
      * Install libffi headers into $(ghcheaderdir) just like any other C headers. Otherwise an installed GHC can't find them when it wants to compile foreign import wrappers.
      * Include libffi headers in the bindist for the same reason.
      616b6697
  30. 02 Dec, 2011 1 commit
    • Ian Lynagh's avatar
      Move includes/DerivedConstants.h and includes/GHCConstants.h into dist dirs · e8723129
      Ian Lynagh authored
      When they existed, they were getting included in the includes_H_FILES
      variable (as it uses wildcard to find all header files). But the
      .depends files for the programs that generate the headers depend on
      $(includes_H_FILES), so the .depends files looked out-of-date once the
      headers had been created. This caused unnecessary make reinvocations.
      
      So now we put them in dist* directories, where they ought to be anyway.
      e8723129
  31. 09 Nov, 2011 1 commit
  32. 14 Oct, 2011 1 commit
    • Ian Lynagh's avatar
      Simplify the libffi build · 7c3b22ed
      Ian Lynagh authored
      We now put the libffi objects into the RTS library, rather than trying
      to mangle libffi into being a ghc package itself. It would be nicer to
       make it a separate library (but not a ghc package), but for now
       hopefully this will get the build going through on Windows again.
      7c3b22ed