diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix index e763d3e1e7d0..f8c474775e48 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, llvm_meta , pkgsBuildBuild , fetch +, fetchpatch , cmake , python3 , libffi @@ -60,6 +61,22 @@ in stdenv.mkDerivation (rec { # Force a test to evaluate the saved benchmark for a CPU for which LLVM has # an execution model. See NixOS/nixpkgs#119673. ../../exegesis-force-bdver2.patch + + # Fix missing includes for GCC 11 + (fetchpatch { + name = "headers-gcc-11.patch"; + url = "https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1.patch"; + sha256 = "0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk"; + stripLen = 1; + }) + + # Fix invalid std::string(nullptr) for GCC 12 + (fetchpatch { + name = "nvptx-gcc-12.patch"; + url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch"; + sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3"; + stripLen = 1; + }) ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; postPatch = optionalString stdenv.isDarwin '' |