Merge pull request #213108 from trofi/wimboot-fix-idirafter

wimboot: fix build by fixing -idirafter ordering
This commit is contained in:
Janne Heß 2023-01-28 16:08:53 +01:00 committed by GitHub
commit f1651034a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,15 @@ stdenv.mkDerivation rec {
sourceRoot = "source/src";
# Workaround '-idirafter' ordering bug in staging-next:
# https://github.com/NixOS/nixpkgs/pull/210004
# where libc '-idirafter' gets added after user's idirafter and
# breaks.
# TODO(trofi): remove it in staging once fixed in cc-wrapper.
preConfigure = ''
export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags)
'';
buildInputs = [ libbfd zlib libiberty ];
makeFlags = [ "wimboot.x86_64.efi" ];