build-system: linux-module: Fix cross compilation.
authorMathieu Othacehe <m.othacehe@gmail.com>
Fri, 20 Mar 2020 15:13:20 +0000 (16:13 +0100)
committerDanny Milosavljevic <dannym@scratchpost.org>
Sun, 22 Mar 2020 12:20:07 +0000 (13:20 +0100)
commitc086c5af1c48f5caf749ff33498d051d5378d361
tree77f22ebbe9182e37a61d44ae3cbfb56ca80f04bd
parent5c79f238634c5adb6657f1b4b1bb4ddb8bb73ef1
build-system: linux-module: Fix cross compilation.

* guix/build-system/linux-module.scm (default-kmod, default-gcc): Delete
procedures.
(system->arch): New procedure.
(make-linux-module-builder)[native-inputs]: Move linux...
[inputs]: ...to here.
(linux-module-build-cross): New procedure.
(linux-module-build): Add TARGET.  Pass TARGET and ARCH to build side.
(lower): Allow cross-compilation.  Move "linux" and "linux-module-builder"
to host-inputs.  Add target-inputs.  Call linux-module-build-cross if
TARGET is set, linux-module-build otherwise.
* guix/build/linux-module-build-system.scm (configure): Add ARCH argument.
(linux-module-build): Adjust comment.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
guix/build-system/linux-module.scm
guix/build/linux-module-build-system.scm