1. 19 Nov, 2019 1 commit
  2. 06 Nov, 2019 1 commit
  3. 30 Oct, 2019 1 commit
  4. 29 Oct, 2019 1 commit
  5. 25 Oct, 2019 1 commit
    • Ben Gamari's avatar
      configure: Drop GccLT46 · 519f5162
      Ben Gamari authored
      GCC 4.6 was released 7 years ago. I think we can finally assume that
      it's available. This is a simplification prompted by #15742.
      519f5162
  6. 22 Oct, 2019 1 commit
    • Stefan Schulze Frielinghaus's avatar
      Implement s390x LLVM backend. · fd8b666a
      Stefan Schulze Frielinghaus authored
      This patch adds support for the s390x architecture for the LLVM code
      generator. The patch includes a register mapping of STG registers onto
      s390x machine registers which enables a registerised build.
      fd8b666a
  7. 12 Oct, 2019 1 commit
    • John Ericson's avatar
      Simplify Configure in a few ways · c2290596
      John Ericson authored
       - No need to distinguish between gcc-llvm and clang. First of all,
         gcc-llvm is quite old and surely unmaintained by now. Second of all,
         none of the code actually care about that distinction!
      
         Now, it does make sense to consider C multiple frontends for LLVMs in
         the form of clang vs clang-cl (same clang, yes, but tweaked
         interface). But this is better handled in terms of "gccish vs
         mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't
         think it is useful saving the existing code for that.
      
       - Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in
         mk/config.h the normal way, rather than hacking it post-hoc. No point
         keeping these special cases around for now reason.
      
       - Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`.
      
       - Abstract check + flag override for unregisterised and tables next to
         code.
      
      Oh, and as part of the above I also renamed/combined some variables
      where it felt appropriate.
      
       - GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other
       Camal case ones. It was never about gcc-llvm, or Apple's renamed clang,
       to be clear.
      
       - llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the
       other all-caps snake case ones. llvm_CC_FLAVOR was just silly
       indirection *and* an odd name to boot.
      c2290596
  8. 07 Oct, 2019 2 commits
  9. 05 Oct, 2019 1 commit
  10. 05 Sep, 2019 1 commit
    • John Ericson's avatar
      Make sure all boolean settings entries use `YES` / `NO` · b55ee979
      John Ericson authored
      Some where using `True` / `False`, a legacy of when they were in
      `Config.hs`. See #16914 / d238d306 for a similar problem.
      
      Also clean up the configure variables names for consistency and clarity
      while we're at it. "Target" makes clear we are talking about outputted
      code, not where GHC itself runs.
      b55ee979
  11. 10 Aug, 2019 1 commit
    • Joachim Breitner's avatar
      Consolidate `TablesNextToCode` and `GhcUnreigsterised` in configure (#15548) · 81860281
      Joachim Breitner authored
      `TablesNextToCode` is now a substituted by configure, where it has the
      correct defaults and error handling. Nowhere else needs to duplicate
      that, though we may want the compiler to to guard against bogus settings
      files.
      
      I renamed it from `GhcEnableTablesNextToCode` to `TablesNextToCode` to:
      
       - Help me guard against any unfixed usages
      
       - Remove any lingering connotation that this flag needs to be combined
         with `GhcUnreigsterised`.
      
      Original reviewers:
      
      Original subscribers: TerrorJack, rwbarton, carter
      
      Original Differential Revision: https://phabricator.haskell.org/D5082
      81860281
  12. 14 Jun, 2019 1 commit
    • Ben Gamari's avatar
      Maintain separate flags for C++ compiler invocations · 7bc5d6c6
      Ben Gamari authored
      Previously we would pass flags intended for the C compiler to the C++
      compiler (see #16738). This would cause, for instance, `-std=gnu99` to
      be passed to the C++ compiler, causing spurious test failures. Fix this
      by maintaining a separate set of flags for C++ compilation invocations.
      7bc5d6c6
  13. 14 May, 2019 1 commit
  14. 01 May, 2019 1 commit
  15. 25 Mar, 2019 1 commit
    • Takenobu Tani's avatar
      Update Wiki URLs to point to GitLab · 3769e3a8
      Takenobu Tani authored
      This moves all URL references to Trac Wiki to their corresponding
      GitLab counterparts.
      
      This substitution is classified as follows:
      
      1. Automated substitution using sed with Ben's mapping rule [1]
          Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
          New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...
      
      2. Manual substitution for URLs containing `#` index
          Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
          New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz
      
      3. Manual substitution for strings starting with `Commentary`
          Old: Commentary/XxxYyy...
          New: commentary/xxx-yyy...
      
      See also !539
      
      [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
      3769e3a8
  16. 16 Mar, 2019 1 commit
  17. 09 Mar, 2019 1 commit
    • Ben Gamari's avatar
      Rip out perl dependency · b760269c
      Ben Gamari authored
      The object splitter was the last major user of perl. There remain a few
      uses in nofib but we can just rely on the system's perl for this since
      it's not critical to the build.
      b760269c
  18. 06 Mar, 2019 1 commit
    • Ben Gamari's avatar
      Rip out object splitting · 37f257af
      Ben Gamari authored
      The splitter is an evil Perl script that processes assembler code.
      Its job can be done better by the linker's --gc-sections flag. GHC
      passes this flag to the linker whenever -split-sections is passed on
      the command line.
      
      This is based on @DemiMarie's D2768.
      
      Fixes Trac #11315
      Fixes Trac #9832
      Fixes Trac #8964
      Fixes Trac #8685
      Fixes Trac #8629
      37f257af
  19. 24 Feb, 2019 1 commit
    • Vladislav Zavialov's avatar
      Expression/command ambiguity resolution · e61f6e35
      Vladislav Zavialov authored
      This patch removes 'HsArrApp' and 'HsArrForm' from 'HsExpr' by
      introducing a new ambiguity resolution system in the parser.
      
      Problem: there are places in the grammar where we do not know whether we
      are parsing an expression or a command:
      
      	proc x -> do { (stuff) -< x }   -- 'stuff' is an expression
      	proc x -> do { (stuff) }        -- 'stuff' is a command
      
      Until we encounter arrow syntax (-<) we don't know whether to parse
      'stuff' as an expression or a command.
      
      The old solution was to parse as HsExpr always, and rejig later:
      
      	checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs)
      
      This meant polluting 'HsExpr' with command-related constructors. In
      other words, limitations of the parser were affecting the AST, and
      all other code (the renamer, the typechecker) had to deal with these
      extra constructors by panicking.
      
      We fix this abstraction leak by parsing into an intermediate
      representation, 'ExpCmd':
      
      	data ExpCmdG b where
      	  ExpG :: ExpCmdG HsExpr
      	  CmdG :: ExpCmdG HsCmd
      
      	type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs))
      
      	checkExp :: ExpCmd -> PV (LHsExpr GhcPs)
      	checkCmd :: ExpCmd -> PV (LHsCmd GhcPs)
      	checkExp f = f ExpG  -- interpret as an expression
      	checkCmd f = f CmdG  -- interpret as a command
      
      See Note [Ambiguous syntactic categories] for details.
      
      Now the intricacies of parsing have no effect on the hsSyn AST when it
      comes to the expression/command ambiguity.
      
      Future work: apply the same principles to the expression/pattern
      ambiguity.
      e61f6e35
  20. 23 Jan, 2019 1 commit
    • Alec Theriault's avatar
      Hadrian: support in-tree GMP · efc95841
      Alec Theriault authored
      Summary:
      This adds top-level configure flags '--with-intree-gmp' and
      '--with-framework-preferred', both of which are especially relevant
      on MacOS.
      
      Besides gaining two new flags, Hadrian also had to be taught what to
      do with the 'framework' in .cabal files.
      
      Test Plan:
      ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh
      ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos
      
      Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari
      
      Subscribers: rwbarton, erikd
      
      GHC Trac Issues: #16001
      
      Differential Revision: https://phabricator.haskell.org/D5417
      efc95841
  21. 22 Nov, 2018 1 commit
  22. 10 Sep, 2018 1 commit
  23. 21 Aug, 2018 1 commit
  24. 08 Aug, 2018 1 commit
  25. 27 Jul, 2018 1 commit
    • Simon Jakobi's avatar
      Make :doc work for the ghc library · 25e1ea99
      Simon Jakobi authored
      We already include -haddock in the GhcLibHcOpts in order to include
      the boot libraries' docs in their .hi-files.
      
      By including -haddock in the GhcStage2HcOpts and GhcStage3HcOpts, we
      make the docs for the ghc library also available to the GHCi :doc
      command.
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4913
      25e1ea99
  26. 06 Jul, 2018 1 commit
  27. 04 Jun, 2018 1 commit
    • Simon Jakobi's avatar
      Serialize docstrings to ifaces, display them with new GHCi :doc command · 85309a3c
      Simon Jakobi authored
      If `-haddock` is set, we now extract docstrings from the renamed ast
      and serialize them in the .hi-files.
      
      This includes some of the changes from D4749 with the notable
      exceptions of the docstring lexing and renaming.
      
      A currently limited and experimental GHCi :doc command can be used
      to display docstrings for declarations.
      
      The formatting of pretty-printed docstrings is changed slightly,
      causing some changes in testsuite/tests/haddock.
      
      Test Plan: ./validate
      
      Reviewers: alexbiehl, hvr, gershomb, harpocrates, bgamari
      
      Reviewed By: alexbiehl
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4758
      85309a3c
  28. 06 Mar, 2018 1 commit
  29. 02 Mar, 2018 1 commit
  30. 21 Feb, 2018 1 commit
  31. 03 Feb, 2018 1 commit
    • Ben Gamari's avatar
      ghc-prim: Emulate C11 atomics when not available · 217e4170
      Ben Gamari authored
      GCC's __sync primitives apparently "usually" imply a full barrier,
      meaning they can be used to emulate the more precise C11 atomics albeit
      with a loss of efficiency. This restores compatibility with GCC 4.4.
      
      This partially reverts commit 59de2909.
      
      Test Plan: Validate on Centos
      
      Reviewers: hvr, simonmar, trommler
      
      Subscribers: rwbarton, thomie, erikd, carter
      
      GHC Trac Issues: #14244
      
      Differential Revision: https://phabricator.haskell.org/D4364
      217e4170
  32. 06 Nov, 2017 1 commit
    • Peter Trommler's avatar
      Update autoconf test for gcc to require 4.7 and up · 59de2909
      Peter Trommler authored
      Fixing #14244 required the newer gcc atomic built-ins that are provided
      from 4.7 and up. This updates the test to check for minimum gcc version
      4.7.
      
      The version tests for 3.4 (!), 4.4, and 4.6 are no longer needed and can
      be removed. This makes the build system simpler.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari, hvr, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D4165
      59de2909
  33. 26 Sep, 2017 1 commit
    • Ben Gamari's avatar
      configure: Don't hard-code strip tool · 65f7d87a
      Ben Gamari authored
      For reasons that I don't entirely understand we didn't previously detect
      `strip` using autoconf. This naturally broke during cross-compilation.
      How did this ever work? I have no idea.
      
      Test Plan: Try cross-compiling
      
      Reviewers: austin, hvr, angerman
      
      Subscribers: rwbarton, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D4008
      65f7d87a
  34. 09 Sep, 2017 1 commit
  35. 06 Sep, 2017 1 commit
    • Moritz Angermann's avatar
      Clean up opt and llc · 22733532
      Moritz Angermann authored
      The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean
      up introduces a shared data structure to carry the arguments we pass to
      each tool so that corresponding flags are next to each other. It drops
      the hard coded data layouts in favor of using `-mtriple` and have LLVM
      infer them. Furthermore we add `clang` as a proper tool, so we don't
      rely on assuming that `clang` is called `clang` on the `PATH` when using
      `clang` as the assembler.  Finally this diff also changes the type of
      `optLevel` from `Int` to `Word`, as we do not have negative optimization
      levels.
      
      Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon
      
      Reviewed By: kavon
      
      Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj,
      kavon, simonmar, thomie, erikd, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3352
      22733532
  36. 13 Jul, 2017 1 commit
    • Tamar Christina's avatar
      [skip ci] Temporarily disable split-sections on Windows. · f656fba1
      Tamar Christina authored
      Summary:
      This temporarily disabled split-sections again on Windows because
      of the overhead in linking it introduces. Unfortunately because BFD
      is so slow a testsuite run gets almost 2x slower. Simply linking
      Hello World takes an unacceptable long time.
      
      So for now, it'll be disabled as we look into different linkers such
      as LLD.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #12913
      
      Differential Revision: https://phabricator.haskell.org/D3731
      f656fba1
  37. 07 Jul, 2017 1 commit
    • Tamar Christina's avatar
      Implement split-sections support for windows. · bd4fdc6a
      Tamar Christina authored
      Summary:
      Initial implementation of split-section on Windows.
      
      This also corrects section namings and uses the platform
      convention of `$` instead of `.` to separate sections.
      
      Implementation is based on @awson's patches to binutils.
      
      Binutils requires some extra help when compiling the libraries
      for GHCi usage. We drop the `-T` and use implicit scripts to amend
      the linker scripts instead of replacing it.
      
      Because of these very large GHCi object files, we need big-obj support,
      which will be added by another patch.
      
      Test Plan: ./validate
      
      Reviewers: awson, austin, bgamari
      
      Subscribers: dfeuer, rwbarton, thomie, snowleopard, #ghc_windows_task_force
      
      GHC Trac Issues: #12913
      
      Differential Revision: https://phabricator.haskell.org/D3383
      bd4fdc6a
  38. 03 Jul, 2017 1 commit
  39. 23 May, 2017 1 commit