Skip to content

Commit 94cf05a

Browse files
committed
profile: ignore WayDyn in profileBuildTag for unified interface files
With -dynamic-too deprecated and all .hi/.o files unified, WayDyn no longer affects the ABI of interface or object files. The profile build tag (used for interface file compatibility checks in Iface/Binary.hs) must not include the "dyn" component, otherwise we get: mismatched interface file profile tag (wanted "dyn", got "") This occurs when Cabal builds packages with --enable-shared (-dynamic) using a stage2 compiler whose libraries were compiled without -dynamic. The .hi files have tag "" but the reader expects "dyn". By filtering WayDyn from the ways before computing waysBuildTag, both the writing and reading sides produce consistent tags regardless of whether -dynamic is passed. This follows the same pattern as the Finder and Linker fixes (commits 59cc152, 8a64142).
1 parent 1e3823a commit 94cf05a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

compiler/GHC/Platform/Profile.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@ profileBuildTag profile
5050
| otherwise = wayTag
5151
where
5252
platform = profilePlatform profile
53-
wayTag = waysBuildTag (profileWays profile)
53+
-- Ignore WayDyn: since -dynamic-too is deprecated, all .hi and .o files
54+
-- are unified (no separate .dyn_hi / .dyn_o). WayDyn no longer affects
55+
-- the ABI of interface or object files, so it must not contribute to the
56+
-- build tag used for interface file compatibility checks.
57+
wayTag = waysBuildTag (removeWay WayDyn (profileWays profile))

0 commit comments

Comments
 (0)