edk2: Fix cross-compile (#497458)

This commit is contained in:
Adam C. Stephens 2026-03-07 18:05:06 +00:00 committed by GitHub
commit 1195c40ada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -182,8 +182,6 @@ stdenv.mkDerivation (finalAttrs: {
++ attrs.nativeBuildInputs or [ ];
strictDeps = true;
env.${"GCC5_${targetArch}_PREFIX"} = stdenv.cc.targetPrefix;
prePatch = ''
rm -rf BaseTools
ln -sv ${buildPackages.edk2}/BaseTools BaseTools
@ -211,7 +209,14 @@ stdenv.mkDerivation (finalAttrs: {
// removeAttrs attrs [
"nativeBuildInputs"
"depsBuildBuild"
"env"
]
// {
env = {
${"GCC5_${targetArch}_PREFIX"} = stdenv.cc.targetPrefix;
}
// (attrs.env or { });
}
);
};
})