Magnus pushed to branch wip/mangoiv/aarch64-longjump at Glasgow Haskell Compiler / GHC Commits: 49b7019d by mangoiv at 2026-05-11T14:20:33+02:00 driver: enable -finter-module-far-jumps by default this fixes a compatibility bug with certain binutils/gcc versions where we were seeing jump offset overflow errors. This commit can probably reverted if we stop supporting the problematic binutils/gcc verions (2.44 and 14.2, respectively) Reolves #26994 - - - - - 2 changed files: - + changelog.d/inter-module-far-jumps-aarch64-default - compiler/GHC/Driver/DynFlags.hs Changes: ===================================== changelog.d/inter-module-far-jumps-aarch64-default ===================================== @@ -0,0 +1,4 @@ +section: driver +synopsis: enable -finter-module-far-jumps by default on aarch64 +issues: #26994 +description: Some binutils and gcc versions lead to jump offset erros on aarch64 profiled/dynamic ways. To mitigate this bug, we enable inter-module-far-jumps by default on this platform. ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -1233,6 +1233,11 @@ defaultFlags settings Opt_SpecialiseIncoherents, Opt_WriteSelfRecompInfo ] + {- note(mangoiv): + - on aarch64 profiled-dynamic, we are seeing jump offset overflow + - errors on certain binutils versions. This can probably be deactivated + - if we stop supporting binutils 2.44 / GCC 14.2 -} + ++ [ Opt_InterModuleFarJumps | platformArch platform == ArchAArch64 ] ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns] -- The default -O0 options @@ -1245,6 +1250,7 @@ defaultFlags settings ++ validHoleFitDefaults where platform = sTargetPlatform settings + defaultWays = ways $ defaultDynFlags settings -- | These are the default settings for the display and sorting of valid hole -- fits in typed-hole error messages. See Note [Valid hole fits include ...] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/49b7019d2e3170bf1472dab2e953ef8e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/49b7019d2e3170bf1472dab2e953ef8e... You're receiving this email because of your account on gitlab.haskell.org.