[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/23: gnu: cross-gcc: Find AVR Libc files.
From: |
guix-commits |
Subject: |
12/23: gnu: cross-gcc: Find AVR Libc files. |
Date: |
Mon, 11 Dec 2023 06:57:41 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit d149073eaf27f7dc3ac6201b2fcf4a454c5dd549
Author: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
AuthorDate: Tue Nov 28 12:34:55 2023 +0100
gnu: cross-gcc: Find AVR Libc files.
* 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
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
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 7f67aaed89..e89208b8b6 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -202,21 +202,35 @@ base compiler and using LIBC (which may be either a libc
package or #f.)"
#$@(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)
- branch master updated (8e61e63515 -> 911c3deb40), guix-commits, 2023/12/11
- 01/23: gnu: cross-libc: Return #f if no libc available., guix-commits, 2023/12/11
- 02/23: guix: gnu-build-system: Handle missing libc., guix-commits, 2023/12/11
- 06/23: gnu: make-avr-libc: Fix synopsis., guix-commits, 2023/12/11
- 10/23: gnu: cross-gcc: Handle AVR inputs., guix-commits, 2023/12/11
- 09/23: gnu: cross-libc: Add AVR Libc support., guix-commits, 2023/12/11
- 12/23: gnu: cross-gcc: Find AVR Libc files.,
guix-commits <=
- 11/23: gnu: cross-toolchain: Add set-cross-path for AVR., guix-commits, 2023/12/11
- 13/23: gnu: cross-gcc: Only C and C++ for AVR., guix-commits, 2023/12/11
- 17/23: gnu: Add gcc-cross-avr-toolchain., guix-commits, 2023/12/11
- 20/23: gnu: lufa: Use AVR target., guix-commits, 2023/12/11
- 04/23: guix: Add target-avr?., guix-commits, 2023/12/11
- 07/23: gnu: cross-gcc: Enable multilib for AVR., guix-commits, 2023/12/11
- 03/23: guix: Add avr platform., guix-commits, 2023/12/11
- 08/23: gnu: cross-gcc: Handle target include paths., guix-commits, 2023/12/11
- 15/23: guix: meson-build-system: Disable PIC for AVR., guix-commits, 2023/12/11
- 22/23: gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain., guix-commits, 2023/12/11