diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-04-27 15:11:12 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-04-27 15:24:24 +0300 |
commit | f44add691155639fdfd5570043799b0218587fb6 (patch) | |
tree | 58dc797764c44a8746bf1bf038c3a5575bb1eb8c /pkgs/tools/bootloaders | |
parent | 2a8b3c724bef228a36b9d4738d7c576c5e665c10 (diff) |
refind: Fix build on i686
Use the correct linker script filename on i686 to fix this build error:
/.../ld: cannot open linker script file /nix/store/...-gnu-efi_3.0u/lib/elf_x86_64_efi.lds: No such file or directory
Only compile tested.
Diffstat (limited to 'pkgs/tools/bootloaders')
-rw-r--r-- | pkgs/tools/bootloaders/refind/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/bootloaders/refind/default.nix b/pkgs/tools/bootloaders/refind/default.nix index 85a544ccd4c8..aa44c1924bf6 100644 --- a/pkgs/tools/bootloaders/refind/default.nix +++ b/pkgs/tools/bootloaders/refind/default.nix @@ -26,9 +26,13 @@ stdenv.mkDerivation rec { sed -e 's|-m64|-maccumulate-outgoing-args -m64|g' -i filesystems/Make.gnuefi ''; - buildPhase = '' - make prefix= EFIINC=${gnu-efi}/include/efi EFILIB=${gnu-efi}/lib GNUEFILIB=${gnu-efi}/lib EFICRT0=${gnu-efi}/lib LDSCRIPT=${gnu-efi}/lib/elf_x86_64_efi.lds gnuefi fs_gnuefi - ''; + buildPhase = + let ldScript = + if stdenv.system == "x86_64-linux" then "elf_x86_64_efi.lds" + else if stdenv.system == "i686-linux" then "elf_ia32_efi.lds" else "null"; + in '' + make prefix= EFIINC=${gnu-efi}/include/efi EFILIB=${gnu-efi}/lib GNUEFILIB=${gnu-efi}/lib EFICRT0=${gnu-efi}/lib LDSCRIPT=${gnu-efi}/lib/${ldScript} gnuefi fs_gnuefi + ''; installPhase = '' install -d $out/bin/ |