GNU bug report logs - #74669
[PATCH] gnu: elfutils: Fix cross-compilation.

Previous Next

Package: guix-patches;

Reported by: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Date: Tue, 3 Dec 2024 12:20:02 UTC

Severity: normal

Tags: patch

Done: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
Cc: 74669 <at> debbugs.gnu.org
Subject: [bug#74669] [PATCH v2] gnu: elfutils: Fix cross-compilation.
Date: Thu, 12 Dec 2024 23:03:13 +0100
Hi,

Zheng Junjie <zhengjunjie <at> iscas.ac.cn> skribis:

> * gnu/packages/elf.scm (elfutils): Fix cross-compilation
> [arguments]: When cross-compilation, apply patch.
> [native-inputs]: When cross-compilation, add patch.
> * gnu/packages/patches/elfutils-libdwfl-Rewrite-reading-of-ar_size-in-elf_begin_rand.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
>
> Change-Id: Ia1ab9c09124a140608bda34bf62f0ae80eb44f9b

[...]

> +  %D%/packages/patches/elfutils-libdwfl-Rewrite-reading-of-ar_size-in-elf_begin_rand.patch \

Please pick a shorter file name, as noted by ‘guix lint’.

(Like ‘elfutils-libdwfl-string-overflow.patch’.)

> +            '((add-after 'unpack 'patch
> +                (lambda* (#:key native-inputs #:allow-other-keys)
> +                  (invoke "patch" "-Np1" "-i"
> +                          (assoc-ref native-inputs
> +                                     "elfutils-libdwfl-Rewrite-reading-of-ar\
> +_size-in-elf_begin_rand.patch")))))

Could you use a gexp instead?  And ‘--force’ is better suited than ‘-N’
I think.

  #~(add-after …
      …
      (invoke "patch" "-p1" "--force" "-i" #$(local-file (search-patch …))))

Thanks,
Ludo’.




This bug report was last modified 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.