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


Message #196 received at 66263 <at> debbugs.gnu.org (full text, mbox):

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>
Subject: [PATCH v1 12/22] gnu: cross-gcc: Find AVR Libc files.
Date: Tue, 28 Nov 2023 12:34:55 +0100
* gnu/packages/cross-base.scm (cross-gcc-arguments)
  <configure-flags>: Add --with-native-system-header-dir for AVR.
  <make-flags>: Add target prefix to /lib to find AVR library.

Change-Id: Ie9cae338da241fe987f53463aa3774a890e2af9a
---
 gnu/packages/cross-base.scm | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 5f87eec56b..58c37e43c1 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -202,21 +202,35 @@ (define (cross-gcc-arguments target xgcc libc)
 
                          #$@(if (target-avr? target)
                                 #~("--enable-multilib")
+                                #~())
+
+
+                         #$@(if (and libc (target-avr? target))
+                                #~((string-append "--with-native-system-header-dir="
+                                                  #$libc "/" #$target "/include"))
                                 #~()))
 
                    (remove
                      (lambda (flag)
                        (or (and #$libc
                                 (string-prefix? "--enable-languages" flag))
+                           (and #$libc
+                                #$(target-avr? target)
+                                (string-prefix? "--with-native-system-header-dir"
+                                                flag))
                            (and #$(target-avr? target)
                                 (string=? flag "--disable-multilib"))))
                      #$flags)))
         ((#:make-flags flags)
          (if libc
-             #~(let ((libc (assoc-ref %build-inputs "libc")))
+             #~(let ((libc (assoc-ref %build-inputs "libc"))
+                     (lib-prefix (if #$(target-avr? target)
+                                     (string-append "/" #$target)
+                                     "")))
                 ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
                 ;; the -Bxxx for the startfiles.
-                 (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
+                 (cons (string-append "FLAGS_FOR_TARGET=-B"
+                                      libc lib-prefix "/lib")
                        #$flags))
              flags))
         ((#:phases phases)
-- 
2.41.0





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.