Skip to content
Snippets Groups Projects
  1. May 19, 2022
    • Matthew Pickering's avatar
      hadrian: Add bootstrap scripts for building without cabal-install · 8bb0547b
      Matthew Pickering authored and sheaf's avatar sheaf committed
      These scripts are originally from the cabal-install repo with a few
      small tweaks.
      
      This utility allows you to build hadrian without cabal-install, which can be useful
      for packagers. If you are a developer then build hadrian using cabal-install.
      
      If you want to bootstrap with ghc-8.10.5 then run the ./bootstrap script with the
      `plan-bootstrap-8.10.5.json` file.
      
          bootstrap.py -d plan-bootstrap-8.10.5.json -w /path/to-ghc
      
      The result of the bootstrap script will be a hadrian binary in
      `_build/bin/hadrian`.
      
      There is a script (using nix) which can be used to generate the bootstrap plans for the range
      of supported GHC versions using nix.
      
          generate_bootstrap_plans
      
      Otherwise you can run the commands in ./generate_bootstrap_plans directly.
      
      Fixes #17103
      8bb0547b
    • Simon Peyton Jones's avatar
      Add arity to the INLINE pragmas for pattern synonyms · 34e224ea
      Simon Peyton Jones authored and Zubin's avatar Zubin committed
      The lack of INLNE arity was exposed by #21531.  The fix is
      simple enough, if a bit clumsy.
      
      (cherry picked from commit 65d31d05)
      34e224ea
    • sheaf's avatar
      Fix cloneWanted for coercion holes · cce2270e
      sheaf authored and Zubin's avatar Zubin committed
      A small bug was introduced in cloneWanted in 8bb52d91, which meant
      that when cloning an evidence variable we could end up creating a
      coercion hole instead of a new EvVar!
      
      Fixes #21130
      
      (cherry picked from commit 428dd729)
      cce2270e
    • Simon Peyton Jones's avatar
      Check for uninferrable variables in tcInferPatSynDecl · 31305da4
      Simon Peyton Jones authored and Zubin's avatar Zubin committed
      This fixes #21479
      
      See Note [Unquantified tyvars in a pattern synonym]
      
      While doing this, I found that some error messages pointed at the
      pattern synonym /name/, rather than the /declaration/ so I widened the
      SrcSpan to encompass the declaration.
      
      (cherry picked from commit bdc99cc2)
      31305da4
  2. May 13, 2022
  3. May 12, 2022
    • Matthew Pickering's avatar
      hadrian: Flag cabal flag handling · 7b3c91b8
      Matthew Pickering authored and Zubin's avatar Zubin committed
      This patch basically deletes some ad-hoc handling of Cabal Flags and
      replaces it with a correct query of the LocalBuildInfo. The flags in the
      local build info can be modified by users by passing hadrian options
      
      For example (!4331)
      
      ```
      *.genapply.cabal.configure.opts += --flags=unregisterised
      ```
      
      And all the flags specified by the `Cabal Flags` builder were already
      passed to configure properly using `--flags`.
      
      (cherry picked from commit c832ae93)
      7b3c91b8
  4. May 10, 2022
    • Matthew Pickering's avatar
      bytestring: Bump to 0.11.3.1 · c4d0fd0c
      Matthew Pickering authored
      Updates bytestring submodule
      
      Ticket #21196
      c4d0fd0c
    • Greg Steuck's avatar
      Disable warnings for unused goto labels · 78b56d99
      Greg Steuck authored and Matthew Pickering's avatar Matthew Pickering committed
      Clang on OpenBSD aborts compilation with this diagnostics:
      ```
      % "inplace/bin/ghc-stage1" -optc-Wno-error=unused-label -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wno-aggregate-return -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist-install/build/./autogen -optc-Irts/include/../dist-install/build/include -optc-Irts/include/. -optc-Irts/. -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=rts -optc-Wno-unknown-pragmas -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DRtsWay=\"rts_v\" -static  -O0 -H64m -Wall -fllvm-fill-undef-with-garbage    -Werror -this-unit-id rts -dcmm-lint     -package-env - -i -irts -irts/dist-install/build -Irts/dist-install/build -irts/dist-install/build/./autogen -Irts/dist-install/build/./autogen -Irts/include/../dist-install/build/include -Irts/include/. -Irts/. -optP-DCOMPILING_RTS -optP-DFS_NAMESPACE=rts        -O2 -Wcpp-undef   -Wnoncanonical-monad-instances  -c rts/linker/Elf.c -o rts/dist-install/build/linker/Elf.o
      
      rts/linker/Elf.c:2169:1: error:
           error: unused label 'dl_iterate_phdr_fail' [-Werror,-Wunused-label]
           |
      2169 | dl_iterate_phdr_fail:
           | ^
      dl_iterate_phdr_fail:
      ^~~~~~~~~~~~~~~~~~~~~
      
      rts/linker/Elf.c:2172:1: error:
           error: unused label 'dlinfo_fail' [-Werror,-Wunused-label]
           |
      2172 | dlinfo_fail:
           | ^
      dlinfo_fail:
      ^~~~~~~~~~~~
      2 errors generated.
      ```
      
      (cherry picked from commit 8961d632)
      78b56d99
    • Greg Steuck's avatar
      Kill a use of %n format specifier · fd5e1bd6
      Greg Steuck authored and Matthew Pickering's avatar Matthew Pickering committed
      This format has been used as a security exploit vector for decades
      now.  Some operating systems (OpenBSD, Android, MSVC). It is targeted
      for removal in C2X standard:
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2834.htm
      
      This requires extending the debug message function to return the
      number of bytes written (like printf(3)), to permit %n format
      specifier in one in one invocation of statsPrintf() in
      report_summary().
      
      Implemented by Matthias Kilian (kili<AT>outback.escape.de)
      
      (cherry picked from commit e2c48b98)
      fd5e1bd6
    • Ben Gamari's avatar
      testsuite: Add test for #21465 · 774cef4e
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      (cherry picked from commit 284f33d6)
      774cef4e
    • Ben Gamari's avatar
      rts: Ensure that XMM registers are preserved on Win64 · 3d40b5fa
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      Previously we only preserved the bottom 64-bits of the callee-saved
      128-bit XMM registers, in violation of the Win64 calling convention.
      Fix this.
      
      Fixes #21465.
      
      (cherry picked from commit baac50fb)
      3d40b5fa
    • Hécate Kleidukos's avatar
      Add documentation to the ByteArray# primetype. · 6be905f2
      Hécate Kleidukos authored and Matthew Pickering's avatar Matthew Pickering committed
      close #21417
      
      (cherry picked from commit 60071076)
      6be905f2
  5. May 09, 2022
    • Andreas Klebinger's avatar
      Fix a shadowing issue in StgUnarise. · 8ecdff13
      Andreas Klebinger authored and Zubin's avatar Zubin committed
      For I assume performance reasons we don't record no-op replacements
      during unarise. This lead to problems with code like this:
      
          f = \(Eta_B0 :: VoidType) x1 x2 ->
             ... let foo = \(Eta_B0 :: LiftedType) -> g x y Eta_B0
                 in ...
      
      Here we would record the outer Eta_B0 as void rep, but would not
      shadow Eta_B0 inside `foo` because this arg is single-rep and so
      doesn't need to replaced. But this means when looking at occurence
      sites we would check the env and assume it's void rep based on the
      entry we made for the (no longer in scope) outer `Eta_B0`.
      
      Fixes #21396 and the ticket has a few more details.
      
      (cherry picked from commit 49bd7584)
      8ecdff13
    • Matthew Pickering's avatar
      RTS: Zero gc_cpu_start and gc_cpu_end after accounting · 7109045a
      Matthew Pickering authored and Zubin's avatar Zubin committed
      When passed a combination of `-N` and `-qn` options the cpu time for
      garbage collection was being vastly overcounted because the counters
      were not being zeroed appropiately.
      
      When -qn1 is passed, only 1 of the N avaiable GC threads is chosen to
      perform work, the rest are idle. At the end of the GC period, stat_endGC
      traverses all the GC threads and adds up the elapsed time from each of
      them. For threads which didn't participate in this GC, the value of the
      cpu time should be zero, but before this patch, the counters were not
      zeroed and hence we would count the same elapsed time on many subsequent
      iterations (until the thread participated in a GC again).
      
      The most direct way to zero these fields is to do so immediately after
      the value is added into the global counter, after which point they are
      never used again.
      
      We also tried another approach where we would zero the counter in
      yieldCapability but there are some (undiagnosed) siations where a
      capbility would not pass through yieldCapability before the GC ended and
      the same double counting problem would occur.
      
      Fixes #21082
      
      (cherry picked from commit 840a6811)
      7109045a
    • ARATA Mizuki's avatar
      bitReverse functions in GHC.Word are since base-4.14.0.0, not 4.12.0.0 · 6da799a4
      ARATA Mizuki authored and Zubin's avatar Zubin committed
      They were added in 33173a51, which constitutes GHC 8.10.1 / base-4.14.0.0
      
      (cherry picked from commit 16d86b97)
      6da799a4
    • sheaf's avatar
      List GHC.Event.Internal in base.cabal on Windows · bb7e0333
      sheaf authored and Zubin's avatar Zubin committed
      GHC.Event.Internal was not listed in base.cabal on Windows. This caused
      undefined reference errors. This patch adds it back, by moving it out
      of the OS-specific logic in base.cabal.
      
      Fixes #21245.
      
      (cherry picked from commit 244da9eb)
      bb7e0333
    • Richard Eisenberg's avatar
      Make inert_cycle_breakers into a stack. · fb979c8b
      Richard Eisenberg authored and Zubin's avatar Zubin committed
      Close #20231.
      
      (cherry picked from commit 1617fed3)
      fb979c8b
    • Simon Peyton Jones's avatar
      Fix bug in weak loop-breakers in OccurAnal · 7fa56ee2
      Simon Peyton Jones authored and Zubin's avatar Zubin committed
      Note [Weak loop breakers] explains why we need to track variables free
      in RHS of rules.  But we need to do this for /inactive/ rules as well
      as active ones, unlike the rhs_fv_env stuff.
      
      So we now have two fields in node Details, one for free vars of
      active rules, and one for free vars of all rules.
      
      This was shown up by #20820, which is now fixed.
      
      (cherry picked from commit ad835531)
      7fa56ee2
    • vdukhovni's avatar
      Use POSIX shell syntax to redirect stdout/err · de5e1651
      vdukhovni authored and Zubin's avatar Zubin committed
      FreeBSD (and likely NetBSD) /bin/sh does not support '>& word' to
      redirect stdout + stderr.  (Also the preferred syntax in bash would
      be '&> word' to avoid surprises when `word` is "-" or a number).
      
      Resolves: #20760
      (cherry picked from commit d3c7f9be)
      de5e1651
    • John Ericson's avatar
      Let LLVM and C handle > native size arithmetic · 8105bbb0
      John Ericson authored and Zubin's avatar Zubin committed
      NCG needs to call slow FFI functions where we "borrow" the C compiler's
      implementation, but there is no reason why we need to do that for LLVM,
      or the unregisterized backend where everything is via C anyways!
      
      (cherry picked from commit beef6135)
      (cherry picked from commit ebf9d471)
      8105bbb0
    • Sergei Trofimovich's avatar
      UNREG: implement 64-bit mach ops for 32-bit targets · ef09e16b
      Sergei Trofimovich authored and Zubin's avatar Zubin committed
      
      Noticed build failures like
      ```
      ghc-stage1: panic! (the 'impossible' happened)
        GHC version 9.3.20210721:
              pprCallishMachOp_for_C: MO_x64_Ne not supported!
      ```
      on `--tagget=hppa2.0-unknown-linux-gnu`.
      
      The change does not fix all 32-bit unreg target problems,
      but at least allows linking final ghc binaries.
      
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      (cherry picked from commit 20173629)
      (cherry picked from commit 1f914ce7)
      ef09e16b
    • Ryan Scott's avatar
      Hadrian: Allow building with GHC 9.2 · 78abeb10
      Ryan Scott authored and Zubin's avatar Zubin committed
      A separate issue is the fact that many of `hadrian`'s modules produce
      `-Wincomplete-uni-patterns` warnings under 9.2, but that is probably best left
      to a separate patch.
      
      (cherry picked from commit 724df9c3)
      (cherry picked from commit db881a97)
      78abeb10
    • Ben Gamari's avatar
      gitlab-ci: Add release job for armv7-deb10 · a1f66c83
      Ben Gamari authored and Zubin's avatar Zubin committed
      (cherry picked from commit de772f89)
      a1f66c83
    • sheaf's avatar
      GHCi: don't normalise partially instantiated types · 509ed1a9
      sheaf authored and Zubin's avatar Zubin committed
        This patch skips performing type normalisation when we haven't
        fully instantiated the type. That is, in tcRnExpr
        (used only for :type in GHCi), skip normalisation if
        the result type responds True to isSigmaTy.
      
        Fixes #20974
      
      (cherry picked from commit 4ad8ce0b)
      509ed1a9
  6. Apr 06, 2022
  7. Mar 05, 2022
  8. Mar 04, 2022
Loading