diff mbox series

[bug#36477,v3,42/48] gexp: Pass target to compiled-modules in lower-gexp.

Message ID 20190902153333.11190-43-m.othacehe@gmail.com
State Accepted
Headers show
Series Add --target support to guix system | expand

Commit Message

Mathieu Othacehe Sept. 2, 2019, 3:33 p.m. UTC
* guix/gexp.scm (lower-gexp): Pass target argument to compiled-modules.
---
 guix/gexp.scm | 1 +
 1 file changed, 1 insertion(+)

Comments

Ludovic Courtès Sept. 4, 2019, 12:31 p.m. UTC | #1
Hi,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * guix/gexp.scm (lower-gexp): Pass target argument to compiled-modules.

This seems obvious at first sight, but actually, I’m not sure it’s
correct because Guile code always runs “natively”.  That is, when you
write:

  (computed-file "foo" (with-imported-modules … #~(begin …)))

the gexp here necessarily runs “natively” on the current system.  Thus,
the modules have to be compiled natively.

The cross-compilation target should only affect things that the regex
refers to with ‘ungexp’ or ‘ungexp-splicing’.

WDYT?

Ludo’.
Mathieu Othacehe Oct. 2, 2019, 9:23 a.m. UTC | #2
Hey Ludo,

> The cross-compilation target should only affect things that the regex
> refers to with ‘ungexp’ or ‘ungexp-splicing’.

Well you're right, this is wrong and not needed. However the other patch
on (guix gexp), titled "Use cross extensions when cross-compiling" seems
needed.

WDYT?

Mathieu
Ludovic Courtès Oct. 11, 2019, 10:22 a.m. UTC | #3
Howdy!

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> The cross-compilation target should only affect things that the regex
>> refers to with ‘ungexp’ or ‘ungexp-splicing’.
>
> Well you're right, this is wrong and not needed. However the other patch
> on (guix gexp), titled "Use cross extensions when cross-compiling" seems
> needed.

Indeed, I’ve just replied.

Thanks, and once again, apologies for the delay!

Ludo’.
diff mbox series

Patch

diff --git a/guix/gexp.scm b/guix/gexp.scm
index 514422cb08..afa28779c8 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -727,6 +727,7 @@  derivations--e.g., code evaluated for its side effects."
                        (compiled (if (pair? %modules)
                                      (compiled-modules %modules
                                                        #:system system
+                                                       #:target target
                                                        #:module-path module-path
                                                        #:extensions extensions
                                                        #:guile guile