* [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation.
2023-07-25 7:45 [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation Zheng Junjie via Guix-patches via
@ 2023-07-25 17:11 ` Vagrant Cascadian
2023-07-26 6:03 ` [bug#64845] [PATCH v2] " Zheng Junjie via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vagrant Cascadian @ 2023-07-25 17:11 UTC (permalink / raw)
To: Zheng Junjie, 64845; +Cc: Ludovic Court?s, Efraim Flashner
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
On 2023-07-25, Zheng Junjie wrote:
> * gnu/packages/firmware.scm (fcode-utils)
> [arguments]: add remove-makefile-strip phase.
> ---
> gnu/packages/firmware.scm | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
> index 35d3100ac6..01565ed18a 100644
> --- a/gnu/packages/firmware.scm
> +++ b/gnu/packages/firmware.scm
> @@ -9,6 +9,7 @@
> ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
> ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -387,7 +388,14 @@ (define-public fcode-utils
> (string-append "DESTDIR=" #$output))
> #:phases
> #~(modify-phases %standard-phases
> - (delete 'configure)))) ; No configure script.
> + (delete 'configure) ; No configure script.
> + (add-after 'unpack 'remove-makefile-strip
> + (lambda _
> + (substitute* '("detok/Makefile"
> + "romheaders/Makefile"
> + "toke/Makefile")
> + (("\\$\\(STRIP\\).*")
> + "")))))))
Can you include a brief comment? That is a bit easier than rummaging
around through git history commit messages... :)
> (native-inputs
> (list tcsh))
> (home-page "https://www.openfirmware.info/FCODE_suite")
>
> base-commit: 76e041f9eef85bb039c5251d3350c62ee2066883
> --
> 2.41.0
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#64845] [PATCH v2] gnu: fcode-utils: Fix cross-compilation.
2023-07-25 7:45 [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation Zheng Junjie via Guix-patches via
2023-07-25 17:11 ` Vagrant Cascadian
@ 2023-07-26 6:03 ` Zheng Junjie via Guix-patches via
2023-07-26 12:34 ` [bug#64845] [PATCH] " Maxime Devos
2023-07-28 13:33 ` [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target' Zheng Junjie via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2023-07-26 6:03 UTC (permalink / raw)
To: 64845; +Cc: Efraim Flashner, Ludovic Court?s, Vagrant Cascadian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1559 bytes --]
* gnu/packages/firmware.scm (fcode-utils)
[arguments]: add remove-makefile-strip phase.
---
gnu/packages/firmware.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 35d3100ac6..ba8d462af9 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -387,7 +388,16 @@ (define-public fcode-utils
(string-append "DESTDIR=" #$output))
#:phases
#~(modify-phases %standard-phases
- (delete 'configure)))) ; No configure script.
+ (delete 'configure) ; No configure script.
+ ;; makefile will invoke `strip', it break cross-compile,
+ ;; and we have 'strip phase handled it , so remove it from makefile.
+ (add-after 'unpack 'remove-makefile-strip
+ (lambda _
+ (substitute* '("detok/Makefile"
+ "romheaders/Makefile"
+ "toke/Makefile")
+ (("\\$\\(STRIP\\).*")
+ "")))))))
(native-inputs
(list tcsh))
(home-page "https://www.openfirmware.info/FCODE_suite")
base-commit: 76e041f9eef85bb039c5251d3350c62ee2066883
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation.
2023-07-25 7:45 [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation Zheng Junjie via Guix-patches via
2023-07-25 17:11 ` Vagrant Cascadian
2023-07-26 6:03 ` [bug#64845] [PATCH v2] " Zheng Junjie via Guix-patches via
@ 2023-07-26 12:34 ` Maxime Devos
2023-07-28 13:33 ` [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target' Zheng Junjie via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2023-07-26 12:34 UTC (permalink / raw)
To: 64845, Zhen Junjie
[-- Attachment #1.1.1: Type: text/plain, Size: 490 bytes --]
I happened upon this patch ...
setting STRIP to (strip-for-target) in #:make-flags (like done for CC)
would fix this in a simpler way.
Also, that (string-append "DESTDIR=" #$output)) is bogus; it's a bug (*)
in the Makefiles that it used $(DESTIDIR) instead of $(DESTDIR)$(PREFIX).
install:
mkdir -p $(DESTDIR)/bin
cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM)
(*)
https://people.freebsd.org/~rodrigc/doc/data/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target'.
2023-07-25 7:45 [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation Zheng Junjie via Guix-patches via
` (2 preceding siblings ...)
2023-07-26 12:34 ` [bug#64845] [PATCH] " Maxime Devos
@ 2023-07-28 13:33 ` Zheng Junjie via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2023-07-28 13:33 UTC (permalink / raw)
To: 64845
Cc: Christopher Baines, Josselin Poiret, Ludovic Courtès,
Mathieu Othacehe, Ricardo Wurmus, Simon Tournier,
Tobias Geerinckx-Rice
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1263 bytes --]
* guix/utils.scm (strip-for-target): New procedure.
---
guix/utils.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guix/utils.scm b/guix/utils.scm
index e9af33bdeb..7a42b49df2 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -111,6 +112,7 @@ (define-module (guix utils)
cxx-for-target
ld-for-target
pkg-config-for-target
+ strip-for-target
version-compare
version>?
@@ -784,6 +786,11 @@ (define* (pkg-config-for-target #:optional (target (%current-target-system)))
(string-append target "-pkg-config")
"pkg-config"))
+(define* (strip-for-target #:optional (target (%current-target-system)))
+ (if target
+ (string-append target "-strip")
+ "strip"))
+
(define version-compare
(let ((strverscmp
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
base-commit: 35c8d631d2bd63c64e863b5509f29fdcb7f856e6
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread