diff mbox series

[bug#64845,v2] gnu: fcode-utils: Fix cross-compilation.

Message ID tencent_F2DA87CDCA54B02CC1BF301DF0728D92DF07@qq.com
State New
Headers show
Series [bug#64845,v2] gnu: fcode-utils: Fix cross-compilation. | expand

Commit Message

Z572 July 26, 2023, 6:03 a.m. UTC
* gnu/packages/firmware.scm (fcode-utils)
[arguments]: add remove-makefile-strip phase.
---
 gnu/packages/firmware.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)


base-commit: 76e041f9eef85bb039c5251d3350c62ee2066883
diff mbox series

Patch

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")