From d6e3307291bc93dcccd99d476efefe4ed59ffe2b Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Wed, 30 Dec 2020 19:10:54 -0800 Subject: [PATCH] llvmPackages_8.llvm: fix build with gcc 10 --- pkgs/development/compilers/llvm/8/llvm.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index 0f6179c2d310..fb928b67ad54 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -1,5 +1,6 @@ { stdenv , fetch +, fetchpatch , cmake , python3 , libffi @@ -55,6 +56,14 @@ in stdenv.mkDerivation ({ propagatedBuildInputs = [ ncurses zlib ]; + patches = [ + # Fix missing includes for GCC 10 + (fetchpatch { + url = "https://bugs.gentoo.org/attachment.cgi?id=612792"; + sha256 = "0rwx6jpqq4xnf4mvfm8v2d4r34y1yi05am0mx5k2d5bha9j64lqg"; + }) + ]; + postPatch = optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake \ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \