GNU bug report logs - #66263
[PATCH 00/23] guix: Add avr as a platform.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>

Date: Fri, 29 Sep 2023 09:15:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
To: 66263 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>, efraim <at> flashner.co.il, vagrant <at> debian.org, maxim.cournoyer <at> gmail.com
Subject: [bug#66263] [PATCH 05/23] gnu: cross-gcc: Enable multilib for avr.
Date: Fri, 29 Sep 2023 11:16:09 +0200
* gnu/packages/cross-base.scm (cross-gcc-arguments)
  [target-avr?]: Remove --disable-mutlilib and add --enable-multilib.
---
 gnu/packages/avr.scm        |  4 +---
 gnu/packages/cross-base.scm | 17 +++++++++++++----
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index b9bee5e624..e976203b89 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -75,9 +75,7 @@ (define avr-gcc
                   ;; several scripts inside this script, each with a #!/bin/sh
                   ;; that needs patching.
                   (substitute* "gcc/genmultilib"
-                    (("#!/bin/sh") (string-append "#!" (which "sh"))))))))
-         ((#:configure-flags flags)
-          #~(delete "--disable-multilib" #$flags))))
+                    (("#!/bin/sh") (string-append "#!" (which "sh"))))))))))
       (native-search-paths
        (list (search-path-specification
               (variable "CROSS_C_INCLUDE_PATH")
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f55765f1b0..ec7ca2186d 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -197,12 +197,21 @@ (define (cross-gcc-arguments target xgcc libc)
                                 #~((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 (string-match "--enable-languages.*" flag)
+                                #$libc)
+                           (and (string-match "--disable-multilib" flag)
+                                #$(target-avr? target))))
+                     #$flags)))
         ((#:make-flags flags)
          (if libc
              #~(let ((libc (assoc-ref %build-inputs "libc")))
-- 
2.34.1





This bug report was last modified 1 year and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.