[Git][ghc/ghc][wip/backports-9.8-2] 11 commits: Bump directory to 1.3.8.5

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Oct 10 18:14:24 UTC 2024



Ben Gamari pushed to branch wip/backports-9.8-2 at Glasgow Haskell Compiler / GHC


Commits:
c0669a69 by Ben Gamari at 2024-10-10T14:14:11-04:00
Bump directory to 1.3.8.5

Bumps directory submodule.

- - - - -
c5531f83 by Matthew Pickering at 2024-10-10T14:14:17-04:00
Compatibility with 9.8.1 as boot compiler

This fixes several compatability issues when using 9.8.1 as the boot
compiler.

* An incorrect version guard on the stack decoding logic in ghc-heap
* Some ghc-prim bounds need relaxing
* ghc is no longer wired in, so we have to remove the -this-unit-id ghc
  call.

Fixes #24077

(cherry picked from commit ef3d20f83499cf129b1cacac07906b8d6188fc17)

- - - - -
6e2d2e8a by Andreas Klebinger at 2024-10-10T14:14:17-04:00
NCG: Fix a bug in jump shortcutting.

When checking if a jump has more than one destination account for the
possibility of some jumps not being representable by a BlockId.

We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing
represents non-BlockId jump destinations.

Fixes #24507

(cherry picked from commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66)

- - - - -
5dc9aadc by Ben Gamari at 2024-10-10T14:14:17-04:00
hadrian/bindist: Ensure that phony rules are marked as such

Otherwise make may not run the rule if file with the same name as the
rule happens to exist.

(cherry picked from commit d04f384f35b76a6865dfb3b17098ef69563b3779)

- - - - -
aca115c2 by Matthew Pickering at 2024-10-10T14:14:17-04:00
configure: Correctly set --target flag for linker opts

Previously we were trying to use the FP_CC_SUPPORTS_TARGET with 4
arguments, when it only takes 3 arguments. Instead we need to use the
`FP_PROG_CC_LINKER_TARGET` function in order to set the linker flags.

Actually fixes #24414

(cherry picked from commit ab9281a28f260b8f015fe43984ea6690a0669294)

- - - - -
72e3371f by Matthew Pickering at 2024-10-10T14:14:17-04:00
Fix haddock source links and hyperlinked source

There were a few issues with the hackage links:

1. We were using the package id rather than the package name for the
   package links. This is fixed by now allowing the template to mention
   %pkg% or %pkgid% and substituing both appropiatly.
2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage`
   as the new base link works on a local or remote hackage server.
3. The "src" path including too much stuff, so cross-package source
   links were broken as the template was getting double expanded.

Fixes #24086

(cherry picked from commit 23f2a478b7dc6b61cab86cf7d0db7fec8a6d9a1f)

- - - - -
864b4721 by Rodrigo Mesquita at 2024-10-10T14:14:17-04:00
rts: free error message before returning

Fixes a memory leak in rts/linker/PEi386.c

(cherry picked from commit dd530bb7e22e953e4cec64a5fd6c39fddc152c6f)

- - - - -
44947481 by Cheng Shao at 2024-10-10T14:14:17-04:00
rts: add missing ccs_mutex guard to internal_dlopen

See added comment for details. Closes #24423.

- - - - -
75890c9f by Ben Gamari at 2024-10-10T14:14:17-04:00
rts/linker: Don't unload native objects when dlinfo isn't available

To do so is unsafe as we have no way of identifying references to
symbols provided by the object.

Fixes #24513. Fixes #23993.

- - - - -
328503ee by Alexis King at 2024-10-10T14:14:17-04:00
linker: Avoid linear search when looking up Haskell symbols via dlsym

See the primary Note [Looking up symbols in the relevant objects] for a
more in-depth explanation.

When dynamically loading a Haskell symbol (typical when running a splice or
GHCi expression), before this commit we would search for the symbol in
all dynamic libraries that were loaded. However, this could be very
inefficient when too many packages are loaded (which can happen if there are
many package dependencies) because the time to lookup the would be
linear in the number of packages loaded.

This commit drastically improves symbol loading performance by
introducing a mapping from units to the handles of corresponding loaded
dlls. These handles are returned by dlopen when we load a dll, and can
then be used to look up in a specific dynamic library.

Looking up a given Name is now much more precise because we can get
lookup its unit in the mapping and lookup the symbol solely in the
handles of the dynamic libraries loaded for that unit.

In one measurement, the wait time before the expression was executed
went from +-38 seconds down to +-2s.

This commit also includes Note [Symbols may not be found in pkgs_loaded],
explaining the fallback to the old behaviour in case no dll can be found
in the unit mapping for a given Name.

Fixes #23415

Co-authored-by: Rodrigo Mesquita (@alt-romes)
(cherry picked from commit e008a19a7f9e8f22aada0b4e1049744f49d39aad)

- - - - -
51b83c51 by Ben Gamari at 2024-10-10T14:14:17-04:00
hadrian: Update bootstrap plans

- - - - -


30 changed files:

- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
- compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Runtime/Interpreter.hs
- distrib/configure.ac.in
- hadrian/README.md
- hadrian/bindist/Makefile
- hadrian/bootstrap/generate_bootstrap_plans
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/Haddock.hs
- hadrian/src/Settings/Packages.hs
- libraries/directory
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/ObjLink.hs
- libraries/ghci/GHCi/Run.hs
- linters/lint-whitespace/lint-whitespace.cabal
- linters/linters-common/linters-common.cabal
- rts/CheckUnload.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e14a98d47808b845890966349cc50d8b92a1a5e...51b83c516aac4fad199518305fedda79b74d02e5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e14a98d47808b845890966349cc50d8b92a1a5e...51b83c516aac4fad199518305fedda79b74d02e5
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241010/ec18bd79/attachment-0001.html>


More information about the ghc-commits mailing list