[Git][ghc/ghc][wip/mangoiv/aarch64-longjump] driver: enable -finter-module-far-jumps by default
Magnus pushed to branch wip/mangoiv/aarch64-longjump at Glasgow Haskell Compiler / GHC Commits: 7ce931f5 by mangoiv at 2026-05-11T14:38:03+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 - - - - - 3 changed files: - + changelog.d/inter-module-far-jumps-aarch64-default - compiler/GHC/Driver/DynFlags.hs - docs/users_guide/using-optimisation.rst Changes: ===================================== changelog.d/inter-module-far-jumps-aarch64-default ===================================== @@ -0,0 +1,5 @@ +section: driver +synopsis: enable -finter-module-far-jumps by default on aarch64-linux +issues: #26994 +mrs: !16016 +description: Some binutils and gcc versions lead to jump offset erros on aarch64-linux 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,13 @@ 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 + - https://gitlab.haskell.org/ghc/ghc/-/issues/26994 -} + ++ [ Opt_InterModuleFarJumps | platformArch platform == ArchAArch64 + , platformOS platform == OSLinux ] ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns] -- The default -O0 options ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -732,7 +732,7 @@ as such you shouldn't need to set any of them explicitly. A flag :reverse: -fno-inter-module-far-jumps :category: - :default: Off + :default: on if the target is AArch64-Linux, off on all others This flag forces GHC to use far jumps instead of near jumps for all jumps which cross module boundries. This removes the need for jump islands/linker View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7ce931f5b0d7dfcb441ae4a096c5e1ec... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7ce931f5b0d7dfcb441ae4a096c5e1ec... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Magnus (@MangoIV)