Skip to content

Commit

Permalink
Merge NixOS#212919: ubootTools: fix build by fixing -idirafter ordering
Browse files Browse the repository at this point in the history
...into staging-next
  • Loading branch information
vcunat committed Jan 28, 2023
2 parents 710d53b + 8b3a31f commit 277d34f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/misc/uboot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ let

passAsFile = [ "extraConfig" ];

# 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 ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags)
export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags)
'';

configurePhase = ''
runHook preConfigure
Expand Down

0 comments on commit 277d34f

Please sign in to comment.