edk2: building of antlr and dlg should be built with native architecture.

They should be built with native architecture

(cherry picked from commit 560957bae1)
This commit is contained in:
Alexander V. Nikolaev 2023-11-22 18:23:59 +02:00 committed by github-actions[bot]
parent 3a90e87c0b
commit b22f573197

View File

@ -82,6 +82,13 @@ edk2 = stdenv.mkDerivation rec {
hardeningDisable = [ "format" "fortify" ]; hardeningDisable = [ "format" "fortify" ];
# Fix cross-compilation issue, use build cc/c++ for building antlr and dlg
postPatch = ''
substituteInPlace BaseTools/Source/C/VfrCompile/GNUmakefile \
--replace '$(MAKE) -C Pccts/antlr' '$(MAKE) -C Pccts/antlr CC=cc CXX=c++' \
--replace '$(MAKE) -C Pccts/dlg' '$(MAKE) -C Pccts/dlg CC=cc CXX=c++'
'';
installPhase = '' installPhase = ''
mkdir -vp $out mkdir -vp $out
mv -v BaseTools $out mv -v BaseTools $out