From c32b769b8cde4402cda7be5de11020f54a014946 Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Tue, 22 Oct 2024 17:04:02 -0400 Subject: [PATCH] Add a constraint reflecting #665 to the package description (#698) Some combinations of Apple toolchains and GHC versions will provide headers that anger -Werror=undef. See discussion at that #665. --- bytestring.cabal | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bytestring.cabal b/bytestring.cabal index 20cc13ea..c337c1ac 100644 --- a/bytestring.cabal +++ b/bytestring.cabal @@ -185,6 +185,13 @@ library if os(windows) && impl(ghc < 9.3) extra-libraries: gcc + if arch(aarch64) + -- The libffi in Apple's darwin toolchain doesn't + -- play nice with -Wundef. Recent GHCs work around this. + -- See also https://github.com/haskell/bytestring/issues/665 + -- and https://gitlab.haskell.org/ghc/ghc/-/issues/23568 + build-depends: base (>= 4.17.2 && < 4.18) || >= 4.18.1 + include-dirs: include install-includes: fpstring.h bytestring-cpp-macros.h