Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipxe: fix build by fixing -idirafter ordering #213106

Merged
merged 1 commit into from
Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkgs/tools/misc/ipxe/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ stdenv.mkDerivation rec {
substituteInPlace src/util/genfsimg --replace " syslinux " " true "
''; # calling syslinux on a FAT image isn't going to work

# 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)
'';

# not possible due to assembler code
hardeningDisable = [ "pic" "stackprotector" ];

Expand Down