diff --git a/pkgs/by-name/ef/efitools/objcopy-output-target.patch b/pkgs/by-name/ef/efitools/objcopy-output-target.patch new file mode 100644 index 000000000000..66b36d64ef15 --- /dev/null +++ b/pkgs/by-name/ef/efitools/objcopy-output-target.patch @@ -0,0 +1,15 @@ +Use --output-target instead of --target in objcopy invocation. +Newer binutils dropped support for --target as an output format specifier. + +Bug-Debian: https://bugs.debian.org/1122408 +--- a/Make.rules ++++ b/Make.rules +@@ -26,7 +26,7 @@ + LDSCRIPT = elf_$(ARCH)_efi.lds + LDFLAGS += -shared -Bsymbolic $(CRTOBJS) -L $(CRTPATH) -L /usr/lib -L /usr/lib64 -T $(LDSCRIPT) + LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) +-FORMAT = --target=efi-app-$(ARCH) ++FORMAT = --output-target=efi-app-$(ARCH) + OBJCOPY = objcopy + MYGUID = 11111111-2222-3333-4444-123456789abc + INSTALL = install diff --git a/pkgs/by-name/ef/efitools/package.nix b/pkgs/by-name/ef/efitools/package.nix index 89c451277b8e..89787fdb0bee 100644 --- a/pkgs/by-name/ef/efitools/package.nix +++ b/pkgs/by-name/ef/efitools/package.nix @@ -36,6 +36,9 @@ stdenv.mkDerivation (finalAttrs: { # Fix build with gcc15 ./remove-redundant-bool.patch + + # https://bugs.debian.org/1122408 + ./objcopy-output-target.patch ]; postPatch = ''