From 3e6180e98430359ded36ebc4a0341e1bd6608ef8 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 25 Jul 2024 10:55:01 -0700 Subject: [PATCH] boost: fix building with llvm --- .../libraries/boost/fix-clang-target.patch | 14 ++++++++++++++ pkgs/development/libraries/boost/generic.nix | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/boost/fix-clang-target.patch diff --git a/pkgs/development/libraries/boost/fix-clang-target.patch b/pkgs/development/libraries/boost/fix-clang-target.patch new file mode 100644 index 000000000000..93bc4d099644 --- /dev/null +++ b/pkgs/development/libraries/boost/fix-clang-target.patch @@ -0,0 +1,14 @@ +--- a/tools/build/src/tools/clang.jam 2024-07-25 10:38:16.278401900 -0700 ++++ b/tools/build/src/tools/clang.jam 2024-07-25 10:38:52.659750666 -0700 +@@ -90,11 +90,6 @@ + case x86-64 : arch = x86_64 ; + case x86-32 : arch = i386 ; + } +- +- toolset.flags $(toolset) +- OPTIONS $(condition)/$(target-os)/$(_architecture_)/$(_address-model_) +- : "--target=$(arch)-$(vendor-sys)" +- : unchecked ; + } + } + } diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 6a8b204e430d..47b0a7a7bc55 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -150,7 +150,8 @@ stdenv.mkDerivation { stripLen = 1; extraPrefix = "libs/python/"; }) - ]; + ] + ++ lib.optional (lib.versionAtLeast version "1.81" && stdenv.cc.isClang) ./fix-clang-target.patch; meta = with lib; { homepage = "http://boost.org/";