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/packages/cross-base.scm | |
parent | a075ac88544dc2d826fb972d485947201d6bd7d1 (diff) | |
download | guix-9095e10620c775145666f88ff4b0bfdc06645665.tar.gz guix-9095e10620c775145666f88ff4b0bfdc06645665.zip |
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/packages/cross-base.scm')
-rw-r--r-- | gnu/packages/cross-base.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 6de1306279..777b5d8761 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -197,12 +197,19 @@ base compiler and using LIBC (which may be either a libc package or #f.)" #~((string-append "--with-toolexeclibdir=" (assoc-ref %outputs "lib") "/" #$target "/lib")) + #~()) + + #$@(if (target-avr? target) + #~("--enable-multilib") #~())) - #$(if libc - flags - #~(remove (cut string-match "--enable-languages.*" <>) - #$flags)))) + (remove + (lambda (flag) + (or (and #$libc + (string-prefix? "--enable-languages" flag)) + (and #$(target-avr? target) + (string=? flag "--disable-multilib")))) + #$flags))) ((#:make-flags flags) (if libc #~(let ((libc (assoc-ref %build-inputs "libc"))) |