1. 31 Oct, 2016 2 commits
    • Tamar Christina's avatar
      Align GHCi's library search order more closely with LDs · 795be0ea
      Tamar Christina authored
      Summary:
      Given a static library and an import library in the same folder. e.g.
      
      ```
      libfoo.a
      libfoo.dll.a
      ```
      
      running `ghci -lfoo` we should prefer the import library `libfoo.dll.a`
      over `libfoo.a` because we prefer having to just load the DLL.
      And not having to do any linking.
      
      This also more closely emulated the behaviour of LD, which has a search order of
      
      ```
      libxxx.dll.a
      xxx.dll.a
      libxxx.a
      cygxxx.dll (*)
      libxxx.dll
      xxx.dll
      ```
      
      Test Plan: ./validate
      
      Reviewers: RyanGlScott, austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: RyanGlScott
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2651
      
      GHC Trac Issues: #12771
      795be0ea
    • Gabor Greif's avatar
      Typos in comments · 80d4a033
      Gabor Greif authored
      80d4a033
  2. 30 Oct, 2016 1 commit
  3. 29 Oct, 2016 1 commit
    • Simon Marlow's avatar
      Fix a bug in parallel GC synchronisation · 4e088b49
      Simon Marlow authored
      Summary:
      The problem boils down to global variables: in particular gc_threads[],
      which was being modified by a subsequent GC before the previous GC had
      finished with it.  The fix is to not use global variables.
      
      This was causing setnumcapabilities001 to fail (again!).  It's an old
      bug though.
      
      Test Plan:
      Ran setnumcapabilities001 in a loop for a couple of hours.  Before this
      patch it had been failing after a few minutes.  Not a very scientific
      test, but it's the best I have.
      
      Reviewers: bgamari, austin, fryguybob, niteria, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2654
      4e088b49
  4. 28 Oct, 2016 6 commits
  5. 27 Oct, 2016 5 commits
  6. 26 Oct, 2016 7 commits
  7. 25 Oct, 2016 1 commit
  8. 24 Oct, 2016 5 commits
  9. 23 Oct, 2016 1 commit
  10. 22 Oct, 2016 9 commits
    • Matthew Pickering's avatar
      a6bcf878
    • Erik de Castro Lopo's avatar
      rts/package.conf.in: Fix CPP usage · aaede1ec
      Erik de Castro Lopo authored
      Summary:
      The configure script sets `HAVE_LIBNUMA` to either `0` or `1` but this
      file had `#ifdef HAVE_LIBNUMA`. This surfaced as a side-effect of
      1050e46b. CPP is really hard to get right.
      
      Test Plan: Validate on harbourmaster
      
      Reviewers: simonmar, bgamari, austin, mpickering
      
      Reviewed By: mpickering
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2631
      aaede1ec
    • Michal Terepeta's avatar
      cmm/Hoopl/Dataflow: minor cleanup · b76cf04e
      Michal Terepeta authored
      
      
      This doesn't have any functional changes, it simply removes one
      unnecessary top binding and improves the comments.
      Signed-off-by: Michal Terepeta's avatarMichal Terepeta <michal.terepeta@gmail.com>
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2619
      b76cf04e
    • Matthew Pickering's avatar
      Refactoring: Delete copied function in backpack/NameShape · 6e9a51c0
      Matthew Pickering authored
      Also moved a few utility functions which work with Avails into
      the Avail module to avoid import loops and increase discoverability.
      
      Reviewers: austin, bgamari, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2629
      6e9a51c0
    • Erik de Castro Lopo's avatar
      Add -Wcpp-undef warning flag · 3cb32d8b
      Erik de Castro Lopo authored
      When enabled, this new warning flag passes `-Wundef` to the C
      pre-processor which causes the pre-processor to warn on uses of
      the `#if` directive on undefined identifiers.
      
      It is not currently enabled in any of the standard warning groups.
      
      Test Plan: Make sure the two tests pass on all major platforms.
      
      Reviewers: hvr, carter, Phyx, bgamari, austin
      
      Reviewed By: Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2626
      
      GHC Trac Issues: #12752
      3cb32d8b
    • Matthew Pickering's avatar
      Skip T5611 on OSX as it fails non-deterministically. · a662f46c
      Matthew Pickering authored
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2622
      
      GHC Trac Issues: #12751
      a662f46c
    • Darshan Kapashi's avatar
      rts: configure.ac should populate HAVE_LIBNUMA instead of USE_LIBNUMA · 1050e46b
      Darshan Kapashi authored
      Code in rts/ which deals with numa checks for `#if HAVE_LIBNUMA`,
      however this macro is not populated during `./configure`.
      https://phabricator.haskell.org/D2329 changed this code last and we
      instead set `USE_LIBNUMA` which fails to setup numa correctly.
      
      Test Plan:
      From main directory in ghc,
      
        ./configure && make clean && make boot && make
        cd nofib/parallel/queens
        ../../../inplace/bin/ghc-stage2 Main.hs -rtsopts -threaded
        ./Main 15 +RTS -N24 -s -A64m --numa
      
      This fails before this patch with
      
        Main: --numa: OS reports NUMA is not available
      
      After the fix, it works as expected.
      
      Run the validation script,
      
        ./validate
      
      (It fails with an error in `compiler/utils/Util.hs` saying
      `GHC.Stack.CallStack` not found, once I remove this 1 line from this
      file , the script works)
      
      Reviewers: hvr, austin, bgamari, erikd, simonmar
      
      Reviewed By: erikd, simonmar
      
      Subscribers: mpickering, thomie, erikd, niteria
      
      Differential Revision: https://phabricator.haskell.org/D2620
      
      GHC Trac Issues: #12741
      1050e46b
    • Simon Marlow's avatar
      Fix failure in setnumcapabilities001 (#12728) · acc98510
      Simon Marlow authored
      The value of enabled_capabilities can change across a call to
      requestSync(), and we were erroneously using an old value, causing
      things to go wrong later.  It manifested as an assertion failure, I'm
      not sure whether there are worse consequences or not, but we should
      get this fix into 8.0.2 anyway.
      
      The failure didn't happen for me because it only shows up on machines
      with fewer than 4 processors, due to the new logic to enable -qn
      automatically.  I've bumped the test parameter 8 to make it more
      likely to exercise that code.
      
      Test Plan: Ran setnumcapabilities001 many times
      
      Reviewers: niteria, austin, erikd, rwbarton, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2617
      
      GHC Trac Issues: #12728
      acc98510
    • Duncan Coutts's avatar
      Add and use a new dynamic-library-dirs field in the ghc-pkg info · f41a8a36
      Duncan Coutts authored
      Summary:
      Build systems / package managers want to be able to control the file
      layout of installed libraries. In general they may want/need to be able
      to put the static libraries and dynamic libraries in different places.
      The ghc-pkg library regisrtation needs to be able to handle this.
      
      This is already possible in principle by listing both a static lib dir
      and a dynamic lib dir in the library-dirs field (indeed some previous
      versions of Cabal did this for shared libs on ELF platforms).
      
      The downside of listing both dirs is twofold. There is a lack of
      precision, if we're not careful with naming then we could end up
      picking up the wrong library. The more immediate problem however is
      that if we list both directories then both directories get included
      into the ELF and Mach-O shared object runtime search paths. On ELF this
      merely slows down loading of shared libs (affecting prog startup time).
      On the latest OSX versions this provokes a much more serious problem:
      that there is a rather low limit on the total size of the section
      containing the runtime search path (and lib names and related) and thus
      listing any unnecessary directories wastes the limited space.
      
      So the solution in this patch is fairly straightforward: split the
      static and dynamic library search paths in the ghc-pkg db and its use
      within ghc. This is a traditional solution: pkg-config has the same
      static / dynamic split (though it describes in in terms of private and
      public, but it translates into different behaviour for static and
      dynamic linking).
      
      Indeed it would make perfect sense to also have a static/dynamic split
      for the list of the libraries to use i.e. to have dynamic variants of
      the hs-libraries and extra-libraries fields. These are not immediately
      required so this patch does not add it, but it is a reasonable
      direction to follow.
      
      To handle compatibility, if the new dynamic-library-dirs field is not
      specified then its value is taken from the library-dirs field.
      
      Contains Cabal submodule update.
      
      Test Plan:
      Run ./validate
      
      Get christiaanb and carter to test it on OSX Sierra, in combination
      with Cabal/cabal-install changes to the default file layout for
      libraries.
      
      Reviewers: carter, austin, hvr, christiaanb, bgamari
      
      Reviewed By: christiaanb, bgamari
      
      Subscribers: ezyang, Phyx, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2611
      
      GHC Trac Issues: #12479
      f41a8a36
  11. 21 Oct, 2016 2 commits