Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBSD --strip-unneeded strips too much #10616

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading