diff options
author | Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> | 2023-11-28 12:34:50 +0100 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-12-11 13:24:09 +0200 |
commit | 9095e10620c775145666f88ff4b0bfdc06645665 (patch) | |
tree | 45174b37cb20fd8aeafb32d123623f5bbdc2558a /gnu/build | |
parent | a075ac88544dc2d826fb972d485947201d6bd7d1 (diff) |
gnu: cross-gcc: Enable multilib for AVR.
* gnu/build/cross-toolchain.scm (patch-multilib-shebang): New procedure.
* gnu/packages/avr.scm (make-avr-gcc): Remove uneeded phases and flags
for multilib.
* gnu/packages/cross-base (cross-gcc-arguments) <#:configure-flags>
[target-avr?]: Remove --disable-multilib and add --enable-multilib.
Change-Id: Id68d803057ac898f0a670f10487b08bf0891ab0b
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/cross-toolchain.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm index 9746be3e50..1933b3e49a 100644 --- a/gnu/build/cross-toolchain.scm +++ b/gnu/build/cross-toolchain.scm @@ -48,6 +48,12 @@ ;; Search path for target headers when cross-compiling. (map (cut string-append "CROSS_" <>) %gcc-include-paths)) +(define* (patch-genmultilib-shebang #:key inputs native-inputs #:allow-other-keys) + "Patch-shebang in the gcc/genmultilib file doesn't work as it contains several +scripts inside, each with a #!/bin/sh that needs patching." + (substitute* "gcc/genmultilib" + (("#!/bin/sh") (string-append "#!" (which "sh"))))) + (define* (make-cross-binutils-visible #:key outputs inputs target #:allow-other-keys) "Create symlinks for 'as', 'nm', and 'ld' in the \"out\" output, under @@ -173,6 +179,8 @@ C_*INCLUDE_PATH." "Modify PHASES to include everything needed to build a cross-GCC for TARGET, a target triplet." (modify-phases phases + (add-after 'unpack 'patch-genmultilib-shebang + patch-genmultilib-shebang) (add-before 'configure 'set-cross-path ;; This mingw32 target checking logic should match that of target-mingw? ;; in (guix utils), but (guix utils) is too large too copy over to the |