1. 25 Jun, 2020 2 commits
    • Ben Gamari's avatar
      hadrian/make: Detect makeindex · 4acc2934
      Ben Gamari authored
      Previously we would simply assume that makeindex was available.
      Now we correctly detect it in `configure` and respect this conclusion in
      hadrian and make.
    • Ben Gamari's avatar
      make: Respect XELATEX variable · 30e42652
      Ben Gamari authored
      Previously we simply ignored the XELATEX variable when building
      PDF documentation.
  2. 17 Jun, 2020 1 commit
  3. 01 Jun, 2020 1 commit
  4. 21 Feb, 2020 1 commit
  5. 23 Oct, 2019 1 commit
    • Ben Gamari's avatar
      Drop duplicate -optl's from GHC invocations · 21663693
      Ben Gamari authored
      Previously the make build system would pass things like
      `-optl-optl-Wl,-x -optl-optl-Wl,noexecstack` to GHC. This would
      naturally result in mass confusion as GHC would pass `-optl-Wl,-x` to
      GCC. GCC would in turn interpret this as `-o ptl-Wl,-x`, setting the
      output pass of the invocation.
      The problem that `-optl` was added to the command-line in two places in
      the build system. Fix this.
      Fixes #17385.
  6. 08 Oct, 2019 1 commit
  7. 07 Oct, 2019 1 commit
  8. 05 Oct, 2019 1 commit
    • John Ericson's avatar
      Per stage headers, ghc_boot_platform.h -> stage 0 ghcplatform.h · 05419e55
      John Ericson authored
      The generated headers are now generated per stage, which means we can
      skip hacks like `ghc_boot_platform.h` and just have that be the stage 0
      header as proper. In general, stages are to be embraced: freely generate
      everything in each stage but then just build what you depend on, and
      everything is symmetrical and efficient. Trying to avoid stages because
      bootstrapping is a mind bender just creates tons of bespoke
      mini-mind-benders that add up to something far crazier.
      Hadrian was pretty close to this "stage-major" approach already, and so
      was fairly easy to fix. Make needed more work, however: it did know
      about stages so at least there was a scaffold, but few packages except
      for the compiler cared, and the compiler used its own counting system.
      That said, make and Hadrian now work more similarly, which is good for
      the transition to Hadrian. The merits of embracing stage aside, the
      change may be worthy for easing that transition alone.
  9. 03 Oct, 2019 1 commit
  10. 02 Sep, 2019 1 commit
  11. 29 May, 2019 1 commit
    • Alp Mestanogullari's avatar
      testsuite: introduce 'static_stats' tests · 7a75a094
      Alp Mestanogullari authored
      They are a particular type of perf tests. This patch introduces a
      'stats_files_dir' configuration field in the testsuite driver where all
      haddock timing files (and possibly others in the future) are assumed to live.
      We also change both the Make and Hadrian build systems to pass respectively
      $(TOP)/testsuite/tests/perf/haddock/ and
      <build root>/stage1/haddock-timing-files/ as the value of that new
      configuration field, and to generate the timing files in those directories
      in the first place while generating documentation with haddock.
      This new test type can be seen as one dedicated to examining stats files that
      are generated while building a GHC distribution. This also lets us get rid of
      the 'extra_files' directives in the all.T entries for haddock.base,
      haddock.Cabal and haddock.compiler.
  12. 27 May, 2019 1 commit
    • Moritz Angermann's avatar
      Lowercase windows imports · 4b228768
      Moritz Angermann authored
      While windows and macOS are currently on case-insensitive file
      systems, this poses no issue on those.  When cross compiling from
      linux with a case sensitive file system and mingw providing only
      lowercase headers, this in fact produces an issue.  As such we just
      lowercase the import headers, which should still work fine on a
      case insensitive file system and also enable mingw's headers to
      be usable porperly.
  13. 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
  14. 15 Mar, 2019 1 commit
  15. 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
  16. 10 Feb, 2019 1 commit
  17. 23 Jan, 2019 1 commit
    • Alec Theriault's avatar
      Hadrian: support in-tree GMP · efc95841
      Alec Theriault authored
      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
  18. 06 Jan, 2019 2 commits
    • Zejun Wu's avatar
      Fix bindist for ghci library · 3fb726d0
      Zejun Wu authored
      https://phabricator.haskell.org/D5169 built libghci for both vanilla way
      and profiling way. We need to include both in the bindist list so they
      will be installed.
      Test Plan:
      $ grep '^BuildFlavour' mk/build.mk
      $ make test_bindist
      $ grep HSghc-prim bindist-list.uniq
    • Ben Gamari's avatar
      make: Silence some xelatex output · 3a509d29
      Ben Gamari authored
      Currently build logs from GitLab CI around around 7 megabytes each. Of this,
      around 2 megabytes is latex output. This is quite silly as essentially all of
      this output is unresolved references in the early latex iterations.
      Here we silence this output.
      However, to make sure that we don't silence errors we allow each xelatex
      invocation besides the last to fail.
  19. 17 Dec, 2018 1 commit
    • Zejun Wu's avatar
      Merge sections in profiling .a to .p_o and use it whenever it exists · de56a67a
      Zejun Wu authored
      We do this for vanilla way already.
      Let's also merge sections for profiling way and use it instead of the .a
      library when it exists.
      Test Plan:
       $ inplace/bin/ghc-stage2 --interactive -prof -fexternal-interpreter
       GHCi, version 8.7.20180921: http://www.haskell.org/ghc/  :? for help
       Prelude> pid <- System.Posix.Process.getProcessID
       Prelude> maps <- readFile $ "/proc/" ++ show pid ++ "/maps"
       Prelude> pid
       Prelude> putStrLn $ unlines $ take 20 $ lines maps
       00400000-02103000 r-xp 00000000 00:1a 199277344
       02104000-02106000 r--p 01d03000 00:1a 199277344
       02106000-02417000 rw-p 01d05000 00:1a 199277344
       02417000-0280a000 rw-p 00000000 00:00 0
       40098000-400b0000 rwxp 000d2000 00:1a 199276023
       400b7000-400d8000 rwxp 00000000 00:00 0
       401d1000-401d2000 rwxp 000e9000 00:1a 199276023
       40415000-40419000 rwxp 0000b000 00:1a 199275165
       404f8000-40526000 rwxp 000af000 00:1a 199274234
      Reviewers: simonmar, bgamari, austin, hvr
      Reviewed By: simonmar
      Subscribers: rwbarton, carter
      Differential Revision: https://phabricator.haskell.org/D5169
  20. 11 Dec, 2018 1 commit
  21. 04 Mar, 2018 1 commit
  22. 21 Feb, 2018 1 commit
  23. 18 Feb, 2018 1 commit
  24. 26 Oct, 2017 1 commit
  25. 09 Sep, 2017 1 commit
  26. 29 Aug, 2017 2 commits
    • Tamar Christina's avatar
      Add gen-dll as replacement for dll-split · 5f6a8204
      Tamar Christina authored
      This tool can be used to generate dll's for any list of object files
      given to it. It will then repartition them automatically to fit within
      a dll and generates as many dll's as needed to do this. Cyclic dependencies
      between these generated dlls are handle automatically so there is no need
      to tell it how to partition.
      It is also a lot more general than `dll-split` as it is able to split any
      package not just `libGHC`. It also uses a trick using GNU style import libraries
      to hide the splitting from the rest of the pipeline. Which means come linking time
      you don't need to know which dll contains what symbol or how many split dlls were
      The import libraries are by default created with libtool. However since libtool is BFD
      based it is very slow. So if present and detected by configure the `genlib` tool
      from the msys2 project is used. This makes a difference of about ~45 minutes when compiling.
      To install `genlib` run `pacman -Sy mingw-w64-$(uname -m)-tools-git`.
      More detailed explaination of the process can be found here
      Test Plan: ./validate
      Reviewers: austin, hvr, bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: snowleopard, rwbarton, thomie, erikd, #ghc_windows_task_force
      GHC Trac Issues: #5987
      Differential Revision: https://phabricator.haskell.org/D3883
    • Tamar Christina's avatar
      Remove dll-split. · 5266ab90
      Tamar Christina authored
      This patch removes dll-split from the code base, the reason is dll-split
      no longer makes any sense. It was designed to split a dll in two, but we
      now already have many more symbols than would fit inside two dlls. So we
      need a third one. This means there's no point in having to maintain this
      list as it'll never work anyway and the solution isn't scalable.
      Test Plan: ./validate
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, #ghc_windows_task_force
      GHC Trac Issues: #5987
      Differential Revision: https://phabricator.haskell.org/D3882
  27. 01 Aug, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Enable building Cabal with parsec · 36fe21aa
      Herbert Valerio Riedel authored
      Cabal's parser has been rewritten in terms of Parsec (which is not
      enabled yet in Cabal-2.0 by default, but can be enabled by a cabal
      flag). The plan for Cabal is to drop support for the non-parsec parser,
      so we need to prepare GHC to cope with new situation.
      However, this means that lib:Cabal requires three new library
      dependency submodules,
       - parsec
       - text
       - mtl
      What complicates matters is that we need to build `ghc-cabal` early on
      during the bootstrap phase which currently needs to invoke `ghc --make`
      directly. So these additional dependencies need to be integrated into
      the monolithic `ghc --make` invocation which produces the `ghc-cabal`
      Test Plan: `./validate --fast` passed
      Reviewers: austin, bgamari
      Subscribers: erikd, phadej, rwbarton, thomie
      Differential Revision: https://phabricator.haskell.org/D3757
  28. 07 Jul, 2017 1 commit
    • Tamar Christina's avatar
      Implement split-sections support for windows. · bd4fdc6a
      Tamar Christina authored
      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
  29. 03 Jul, 2017 1 commit
  30. 08 Jun, 2017 1 commit
  31. 25 May, 2017 1 commit
    • Sergei Trofimovich's avatar
      rules: add per-library EXTRA_HC_OPTS · f011f587
      Sergei Trofimovich authored
      Sometimes it's handy to change a compiler flag
      for a library in stage{0,1,2}.
      Usage example:
          libraries/binary_EXTRA_HC_OPTS += -O1
          libraries/containers_EXTRA_HC_OPTS += -O1
          libraries/bytestring_EXTRA_HC_OPTS += -O1
      Here override default -O2 defined in .cabal files
      for these libraries to speed build up.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
  32. 23 Apr, 2017 1 commit
    • Sergei Trofimovich's avatar
      ghc: tweak cross-compilation to mingw32 · 8908ba31
      Sergei Trofimovich authored
      The build failure when cross-compiling from
      linux to windows looks like:
          HC [stage 1] ghc/stage2/build/tmp/ghc-stage2.exe
            Call hs_init_ghc() from your main() function to set these options.
        /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find -lHSghc-8.3-0
      Similar to commit 745032dd
      ("rts: tweak cross-compilation to mingw32") decision to split
      stage2 should be done based based on TargetOS, not HostOS.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
  33. 15 Mar, 2017 1 commit
    • Simon Marlow's avatar
      Always build GHCi libs · a7be1631
      Simon Marlow authored
      Since the introduction of -split-sections, using GHCi with the RTS
      linker is really slow:
      $ time (echo :quit | ./inplace/bin/ghc-stage2 --interactive -fexternal-interpreter)
      GHCi, version 8.1.20170304: http://www.haskell.org/ghc/  :? for help
      Prelude> Leaving GHCi.
      real        0m3.793s
      (when we use `-fexternal-interpreter` it uses the RTS linker by default,
      you can make it use the system linker by adding `-dynamic`)
      Building the GHCi libs doesn't take much time or space in the GHC build,
      but makes things much quicker for people using the RTS linker:
      $ time (echo :quit | ./inplace/bin/ghc-stage2 --interactive -fexternal-interpreter)
      GHCi, version 8.1.20170304: http://www.haskell.org/ghc/  :? for help
      Prelude> Leaving GHCi.
      real        0m0.285s
      So I propose that we build and ship them unconditionally.
      Test Plan: validate, perf tests above
      Reviewers: bgamari, austin, niteria, erikd, Phyx
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, snowleopard
      Differential Revision: https://phabricator.haskell.org/D3298
  34. 23 Feb, 2017 1 commit
    • rwbarton's avatar
      Set $1_$2_SplitSections in distdir-opts.mk not build-package.mk · 3cb9b52f
      rwbarton authored
      After commit a50082c1 we use -ffunction-sections -fdata-sections
      for all C compilations, when $1_$2_SplitSections is set. But that
      variable was set in build-package.mk which is not run for the RTS.
      As a result the RTS was not being split, leading to larger binaries.
      This commit fixes RTS splitting by moving the definition of
      $1_$2_SplitSections to distdir-opts.mk, which is run for the RTS
      (and also from build-package.mk).
      Test Plan:
      manual ./validate and check that RTS and base .c files
      are split, but not object files in the compiler
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, snowleopard, olsner
      Differential Revision: https://phabricator.haskell.org/D3137
  35. 12 Feb, 2017 1 commit
    • olsner's avatar
      Apply SplitSections to all C compilations · a50082c1
      olsner authored
      Previously this was added only to the RTS's C files (those are the bulk
      of it though), but there are C bits in ghc-prim, integer-gmp and base
      Followup for #8405, allows the large table of character properties in
      base to be stripped when not used.
      Test Plan: validate
      Reviewers: austin, bgamari, simonmar
      Reviewed By: bgamari
      Subscribers: thomie, snowleopard
      Differential Revision: https://phabricator.haskell.org/D3121
  36. 10 Feb, 2017 1 commit
  37. 08 Feb, 2017 1 commit