diff --git a/pkgs/by-name/ni/nix-ld/package.nix b/pkgs/by-name/ni/nix-ld/package.nix index 8f2c147797263..3d47e68637d2a 100644 --- a/pkgs/by-name/ni/nix-ld/package.nix +++ b/pkgs/by-name/ni/nix-ld/package.nix @@ -17,6 +17,8 @@ rustPlatform.buildRustPackage rec { hash = "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw="; }; + patches = [ ./rust-1.83.patch ]; + cargoHash = "sha256-GOngDGRzWVuzGTX5xNb/nv5dJ6is6cH8K6kHTX3OoXE="; hardeningDisable = [ "stackprotector" ]; diff --git a/pkgs/by-name/ni/nix-ld/rust-1.83.patch b/pkgs/by-name/ni/nix-ld/rust-1.83.patch new file mode 100644 index 0000000000000..8ff1fb7d9ce7b --- /dev/null +++ b/pkgs/by-name/ni/nix-ld/rust-1.83.patch @@ -0,0 +1,36 @@ +--- a/src/arch.rs ++++ b/src/arch.rs +@@ -142,7 +142,7 @@ cfg_match! { + + #[naked] + unsafe extern "C" fn entry_trampoline() -> ! { +- core::arch::asm!( ++ core::arch::naked_asm!( + "lea r10, [rip + {context}]", + "mov r11, [r10 + {size} * 1]", // .env_entry + "test r11, r11", +@@ -153,7 +153,6 @@ cfg_match! { + "jmp [rip + {context}]", + context = sym TRAMPOLINE_CONTEXT, + size = const core::mem::size_of::<*const u8>(), +- options(noreturn), + ) + } + } +@@ -162,7 +161,7 @@ cfg_match! { + + #[naked] + unsafe extern "C" fn entry_trampoline() -> ! { +- core::arch::asm!( ++ core::arch::naked_asm!( + "adrp x8, {context}", + "ldr x9, [x8, {env_entry_off}]", // .env_entry + "cbz x9, 2f", +@@ -174,7 +173,6 @@ cfg_match! { + context = sym TRAMPOLINE_CONTEXT, + env_entry_off = const TrampolineContext::ENV_ENTRY_OFFSET, + env_string_off = const TrampolineContext::ENV_STRING_OFFSET, +- options(noreturn), + ) + } + }