1. 26 Jan, 2018 1 commit
    • Ömer Sinan Ağacan's avatar
      Linker: ignore empty paths in addEnvPaths · cacba075
      Ömer Sinan Ağacan authored
      Previously `splitEnv` worked like this:
      
          > splitEnv "foo:::bar::baz:"
          ["foo","","","bar","","baz",""]
      
      with this patch:
      
          > splitEnv working_dir "foo:::bar:baz:"
          ["foo",working_dir,working_dir"bar","baz",working_dir]
      
      This fixes #14695, where having a trailing `:` in the env variable
      caused ghci to pass empty `-B` parameter to `gcc`, which in turned
      caused the next parameter (`--print-file-name`) to be considered as the
      argument to `-B`. As a result ghci did not work.
      
      The `working_dir` argument is to have a similar behavior with POSIX:
      according to chapter 8.3 zero-length prefix means current working
      directory.
      
      Reviewers: hvr, bgamari, AndreasK, simonmar
      
      Reviewed By: bgamari, AndreasK, simonmar
      
      Subscribers: AndreasK, rwbarton, thomie, carter
      
      GHC Trac Issues: #14695
      
      Differential Revision: https://phabricator.haskell.org/D4330
      cacba075
  2. 17 Oct, 2016 1 commit
  3. 01 Sep, 2016 1 commit
    • Tamar Christina's avatar
      Added support for deprecated POSIX functions on Windows. · e5ecb201
      Tamar Christina authored
      Summary:
      With the introduction of 8.0.1 We've stopped supporting in GHCi
      the use of POSIX functions under their deprecated names on Windows.
      
      This to be compatible with object and libraries from the most
      popular compilers on the platform (Microsoft and Intel compilers).
      
      However this brings a confusing disparity between the compiled and
      interpreted behavior since MingW-W64 does support the deprecated names.
      
      Also It seems clear that package writers won't update their packages to
      properly support Windows. As such I have added redirects in the RTS
      for the deprecated functions as listed on
      
      https://msdn.microsoft.com/en-us/library/ms235384.aspx.
      
      This won't export the functions (as in, they won't be in the symbol table
      of compiled code for the RTS.) but we inject them into the symbol table
      of the dynamic linker at startup.
      
      Test Plan:
      ./validate
      and
      
      make test TEST="ffi017 ffi021"
      
      Reviewers: thomie, simonmar, RyanGlScott, bgamari, austin, hvr, erikd
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: RyanGlScott, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2500
      
      GHC Trac Issues: #12209, #12497, #12496
      e5ecb201
  4. 13 Jun, 2016 1 commit
    • Tamar Christina's avatar
      Add thin library support to Windows too · 5cee88d7
      Tamar Christina authored
      Summary:
      Code already existed in the RTS to add thin library support for non-Windows
      operating systems. This adds it to Windows as well.
      
      ar thin libraries have the exact same format as normal archives except they
      have a different magic string and they don't copy the object files into the
      archive.
      
      Instead each header entry points to the location of the object file on disk.
      This is useful when a library is only created to satisfy a compile time dependency
      instead of to be distributed. This saves the time required for copying.
      
      Test Plan: ./validate and new test T11788
      
      Reviewers: austin, bgamari, simonmar, erikd
      
      Reviewed By: bgamari, simonmar
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2323
      
      GHC Trac Issues: #11788
      5cee88d7
  5. 04 Apr, 2016 1 commit
  6. 24 Mar, 2016 1 commit
  7. 21 Feb, 2016 1 commit
  8. 31 Dec, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      Drop redundant/explicit `=1` in `-DFOO=1` flags · 0d207378
      Herbert Valerio Riedel authored
      Quoting the POSIX standard for the `-D` C compiler flag:
      
        -D  name[=value]
      
            Define name as if by a C-language #define directive.
            If no `=value` is given, a value of 1 shall be used.
            [...]
      
      Removing this explicit `=1` definition from `-D` flags which are used to
      define boolean macro constants makes the CLI invocation a bit more
      idiomatic and reduces visual noise in debugging output
      (flags containing `=`s are additionally put in single-quotes by GHC)
      0d207378
  9. 22 Jul, 2015 1 commit
    • gcampax's avatar
      Two step allocator for 64-bit systems · 0d1a8d09
      gcampax authored
      Summary:
      The current OS memory allocator conflates the concepts of allocating
      address space and allocating memory, which makes the HEAP_ALLOCED()
      implementation excessively complicated (as the only thing it cares
      about is address space layout) and slow. Instead, what we want
      is to allocate a single insanely large contiguous block of address
      space (to make HEAP_ALLOCED() checks fast), and then commit subportions
      of that in 1MB blocks as we did before.
      This is currently behind a flag, USE_LARGE_ADDRESS_SPACE, that is only enabled for
      certain OSes.
      
      Test Plan: validate
      
      Reviewers: simonmar, ezyang, austin
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D524
      
      GHC Trac Issues: #9706
      0d1a8d09
  10. 17 Jul, 2015 1 commit
    • thomie's avatar
      Testsuite: small test cleanups · ac0feece
      thomie authored
      * don't print anything to stdout
      * add missing Makefile
      * also ignore mk/ghcconfig*.mk when using installed compiler
      * prevent warning: -rtsopts and -with-rtsopts have no effect with -shared
      ac0feece
  11. 20 Jan, 2015 1 commit
    • Simon Marlow's avatar
      Make the linker_unload test less fragile · 6108d95a
      Simon Marlow authored
      Summary:
      Now it invokes the GHC API to load packages, rather than trying to do it
      manually.  This should fix most of the issues we've had with this test,
      and might make it work on Windows too.
      6108d95a
  12. 05 Dec, 2014 1 commit
  13. 02 Dec, 2014 1 commit
    • Simon Peyton Jones's avatar
      Revert "Make the linker API thread-safe" · 4b51194d
      Simon Peyton Jones authored
      This reverts commit b5e8b3b1.
      
      I reverted it because one of these two patches
        9e6e4796 Add purgeObj()
        b5e8b3b1 Make the linker API thread-safe
      
      causes a seg-fault on Windows.  The seg-fault happens immediately
      the linker is invoked, in ghci or in Template Haskell.
      
      I believe that it is the "linker API thread-safe" commit that causes
      the seg-fault; it happens even if the "purgeObj" commit alone is
      reverted.  But since the two patches mess with the same code, to
      revert the "linker API" patch I had revert both.
      4b51194d
  14. 28 Nov, 2014 1 commit
    • Simon Marlow's avatar
      Make the linker API thread-safe · b5e8b3b1
      Simon Marlow authored
      We used to be able to rely on the client to use the API in a
      single-threaded way, but now that the GC calls into the linker to
      unload objects this isn't a safe assumption.
      b5e8b3b1
  15. 08 Oct, 2014 1 commit
    • Simon Marlow's avatar
      Make the linker more robust to errors · 5300099e
      Simon Marlow authored
      Summary:
      When linking fails because there was a problem with the supplied
      object file, then we should not barf() or exit, we should emit a
      suitable error message and return an error code to the caller.  We
      should also free all memory that might have been allocated during
      linking, and generally not do any damage.  This patch fixes most
      common instances of this problem.
      
      Test Plan: validate
      
      Reviewers: rwbarton, austin, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: simonmar, ezyang, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D294
      5300099e
  16. 07 Aug, 2014 1 commit
    • kgardas's avatar
      fix linker_unload test for ghc configurations with --with-gmp-libraries · 2b3c6216
      kgardas authored
      The issue is presented in Makefile logic where it attempts to start
      linker_unload and pass it HSinteger-gmp library for unload,
      but the library name is prefixed with two directories names. The first
      is of ghc's integer-gmp/build itself and another is the directory name
      passed to --with-gmp-libraries= configure parameter. The testcase then
      fails on unloading integer-gmp/build directory thinking that this is
      a library to unload. The issue is solved by cuting (head -1) the first
      library name from the list and using this for unloading the HSinteger-gmp
      library. I use head -1 instead of cut -d ' ' here since ghc may be
      installed into the directory with space(s) in its name like in the case
      when running validate.
      2b3c6216
  17. 06 Aug, 2014 1 commit
  18. 04 Aug, 2014 1 commit
    • kgardas's avatar
      fix linker_unload test on Solaris/i386 platform · 65e5dbcd
      kgardas authored
      Summary:
      This patch set fixes two issues in linker_unload test case
      on Solaris/i386 platform. First there is an issue in linker_unload.c
      which causes warning to be emitted about _FILE_OFFSET_BITS redefined.
      This is solved by including ghcconfig.h as a first header file.
      Another issue is that on Solaris and its builders we use to configure
      ghc with --with-gmp-libraries=/usr/lib and this causes issue with
      test case Makefile's logic. It attempts to start linker_unload
      and pass it HSinteger-gmp library for unload, but the library
      name is prefixed with two directories names. The first is of
      ghc's integer-gmp/build itself and another is the directory name
      passed to --with-gmp-libraries= configure parameter. In case
      of Solaris this is /usr/lib. The testcase then fails on unloading
      integer-gmp/build directory thinking that this is a library to unload.
      This issue is solved by cuting the first library name from the list
      and using this for unloading the HSinteger-gmp library.
      
      Test Plan: validate
      
      Reviewers: ezyang, austin
      
      Reviewed By: ezyang, austin
      
      Subscribers: phaskell, simonmar, relrod, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D110
      65e5dbcd
  19. 01 Mar, 2014 1 commit
  20. 27 Feb, 2014 1 commit
  21. 17 Sep, 2013 2 commits
  22. 16 Sep, 2013 1 commit
  23. 14 Sep, 2013 2 commits
  24. 13 Sep, 2013 1 commit
  25. 22 Aug, 2013 2 commits
  26. 15 Mar, 2013 1 commit
  27. 05 Feb, 2013 1 commit
  28. 25 Jan, 2013 1 commit
  29. 21 Aug, 2012 1 commit
  30. 02 Jul, 2012 1 commit
  31. 27 Apr, 2012 1 commit
  32. 02 Mar, 2012 1 commit
  33. 06 Nov, 2011 1 commit
  34. 06 Sep, 2011 1 commit
  35. 01 Sep, 2011 1 commit
  36. 20 Jul, 2011 1 commit
  37. 20 Apr, 2011 1 commit
    • Simon Peyton Jones's avatar
      Add TEST_HC_OPTS to every Makefile invocation of TEST_HC · 6c32ee85
      Simon Peyton Jones authored
      In the testsuite there are numerous Makefiles that invoke $(TEST_HC).
      But, unlike the tests invoked directly by the harness, they didn't pass
      -dno-debug-output, or $(EXTRA_HC_OPTS).
      
      This patch goes part-way towards the goal of making the two consistent:
      
      * Almost all invocations in the Makefiles now go
          '$(TEST_HC)' $(TEST_HC_OPTS)
      
      * In test.mk we initialise
           TEST_HC_OPTS = -dno-debug-output $(EXTRA_HC_OPTS)
      
      Still to come (I don't know how to do these)
      
      * The invocations of TEST_HC via cabal are not treated
        (eg cabal01, cabal04), and they should be
      
      * TEST_HC_OPTS should probably be initialised the same way
        as the Python script computes the flags to pass to the
        TEST_HC that it calls directly
      6c32ee85