edk2: pull upstream brotli fix for gcc-11 (#144137)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Sergei Trofimovich 2021-11-22 15:40:06 +00:00 committed by GitHub
parent dae20ac9ef
commit cda036f189
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,14 @@
{
stdenv,
clangStdenv,
fetchgit,
fetchpatch,
libuuid,
python3,
bc,
clang_9,
llvmPackages_9,
overrideCC,
lib,
{ stdenv
, clangStdenv
, fetchFromGitHub
, fetchpatch
, libuuid
, python3
, bc
, clang_9
, llvmPackages_9
, overrideCC
, lib
}:
let
@ -39,12 +38,26 @@ edk2 = buildStdenv.mkDerivation {
version = "202108";
# submodules
src = fetchgit {
url = "https://github.com/tianocore/edk2";
src = fetchFromGitHub {
owner = "tianocore";
repo = "edk2";
rev = "edk2-stable${edk2.version}";
fetchSubmodules = true;
sha256 = "1ps244f7y43afxxw6z95xscy24f9mpp8g0mfn90rd4229f193ba2";
};
patches = [
# Pull upstream fix for gcc-11 build.
(fetchpatch {
name = "gcc-11-vla.patch";
url = "https://github.com/google/brotli/commit/0a3944c8c99b8d10cc4325f721b7c273d2b41f7b.patch";
sha256 = "10c6ibnxh4f8lrh9i498nywgva32jxy2c1zzvr9mcqgblf9d19pj";
# Apply submodule patch to subdirectory: "a/" -> "BaseTools/Source/C/BrotliCompress/brotli/"
stripLen = 1;
extraPrefix = "BaseTools/Source/C/BrotliCompress/brotli/";
})
];
buildInputs = [ libuuid pythonEnv ];
makeFlags = [ "-C BaseTools" ]