Skip to content

Commit

Permalink
OpenBSD --strip-unneeded strips too much
Browse files Browse the repository at this point in the history
  • Loading branch information
geekosaur authored and Mikolaj committed Dec 8, 2024
1 parent e6a20a3 commit cd4bd1f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cabal/src/Distribution/Simple/Program/Strip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ stripLib verbosity (Platform arch os) progdb path = do
IOS -> return ()
AIX -> return ()
Solaris -> return ()
OpenBSD ->
-- '--strip-unneeded' sometimes strips too much on OpenBSD.
-- -- See https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/lang/ghc/patches/patch-libraries_Cabal_Cabal_Distribution_Simple_Program_Strip_hs
return ()
Windows ->
-- Stripping triggers a bug in 'strip.exe' for
-- libraries with lots identically named modules. See
Expand Down
11 changes: 11 additions & 0 deletions changelog.d/pr-10616
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
synopsis: "OpenBSD `--strip-unneeded` sometimes strips too much"
packages: [Cabal]
prs: 10616
---

OpenBSD's `--strip-unneeded` thinks some symbols are unneeded that are in fact
needed when C bits are involved, so suppress its use.

Taken from the OpenBSD ports repo (https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/lang/ghc/patches/patch-libraries_Cabal_Cabal_Distribution_Simple_Program_Strip_hs);
brought to our attention by maerwald.

0 comments on commit cd4bd1f

Please sign in to comment.