diff --git a/Cabal/src/Distribution/Simple/Program/Strip.hs b/Cabal/src/Distribution/Simple/Program/Strip.hs index bb43e5ed47d..af7bbfc9754 100644 --- a/Cabal/src/Distribution/Simple/Program/Strip.hs +++ b/Cabal/src/Distribution/Simple/Program/Strip.hs @@ -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 diff --git a/changelog.d/pr-10616 b/changelog.d/pr-10616 new file mode 100644 index 00000000000..89d6bc1d985 --- /dev/null +++ b/changelog.d/pr-10616 @@ -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.