diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-05-31 17:02:38 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-06-29 23:32:02 -0400 |
commit | cec7b5e87ce04a19e9b26366cf9cd6f5139a6870 (patch) | |
tree | 281780c266bbe12b14b2307bdff9544a40407827 /pkgs/development/libraries/boost | |
parent | e3323ac20c3f0744f3f6128a5464652121eb8d4f (diff) | |
download | nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar.gz nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar.bz2 nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar.lz nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar.xz nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.tar.zst nixpkgs-cec7b5e87ce04a19e9b26366cf9cd6f5139a6870.zip |
boost{175,176,177,178,179,180}: fix build with clang 16
Clang 16 began diagnosing ill-formed constant expressions for values outside the range of enums without a fixed underlying type. While the error can be suppressed, it will become a hard error in clang 17.
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 09160bdcc8d..b5df2a7e4c6 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -110,6 +110,13 @@ stdenv.mkDerivation { relative = "include"; sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; }) + # This fixes another issue regarding ill-formed constant expressions, which is a default error + # in clang 16 and will be a hard error in clang 17. + ++ lib.optional (lib.versionOlder version "1.80") (fetchpatch { + url = "https://github.com/boostorg/log/commit/77f1e20bd69c2e7a9e25e6a9818ae6105f7d070c.patch"; + relative = "include"; + hash = "sha256-6qOiGJASm33XzwoxVZfKJd7sTlQ5yd+MMFQzegXm5RI="; + }) ++ lib.optionals (lib.versionOlder version "1.81") [ # libc++ 15 dropped support for `std::unary_function` and `std::binary_function` in C++17+. # C++17 is the default for clang 16, but clang 15 is also affected in that language mode. @@ -118,6 +125,12 @@ stdenv.mkDerivation { url = "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch"; hash = "sha256-ULFMzKphv70unvPZ3o4vSP/01/xbSM9a2TlIV67eXDQ="; }) + # This fixes another ill-formed contant expressions issue flagged by clang 16. + (fetchpatch { + url = "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch"; + relative = "include"; + hash = "sha256-dq4SVgxkPJSC7Fvr59VGnXkM4Lb09kYDaBksCHo9C0s="; + }) ]; meta = with lib; { |