diff mbox series

[bug#58491] gnu: lzip: Fix cross-compilation.

Message ID 20221013123746.23004-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#58491] gnu: lzip: Fix cross-compilation. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Christopher Baines Oct. 13, 2022, 12:37 p.m. UTC
Previously the package would build, but the binaries would be build for the
host system, rather than the target.

* gnu/packages/compression.scm (lzip)[arguments]: Set CXX when cross
compiling.
---
 gnu/packages/compression.scm | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Christopher Baines Oct. 16, 2022, 6:31 p.m. UTC | #1
Christopher Baines <mail@cbaines.net> writes:

> Previously the package would build, but the binaries would be build for the
> host system, rather than the target.
>
> * gnu/packages/compression.scm (lzip)[arguments]: Set CXX when cross
> compiling.
> ---
>  gnu/packages/compression.scm | 6 ++++++
>  1 file changed, 6 insertions(+)

Pushed to master as 69bbb720db7a77b4a8cd2973fb8e9a794b3213d3.
diff mbox series

Patch

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 684979018c..dd0caa10ab 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -632,6 +632,12 @@  (define-public lzip
               (base32
                "0j59hx72258334rmkwn57ahr6s69nlrx0a5ip1jw2fbiwr12sd63"))))
     (build-system gnu-build-system)
+    (arguments
+     ;; The configure script doesn't recognise the --build or --host
+     ;; arguments, so set CXX here
+     `(,@(if (%current-target-system)
+             `(#:make-flags (list ,(string-append "CXX=" (cxx-for-target))))
+             '())))
     (home-page "https://www.nongnu.org/lzip/lzip.html")
     (synopsis "Lossless data compressor based on the LZMA algorithm")
     (description