[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#66263] [PATCH 14/23] gnu: cross-gcc-arguments: Handle AVR target.
From: |
Jean-Pierre De Jesus DIAZ |
Subject: |
[bug#66263] [PATCH 14/23] gnu: cross-gcc-arguments: Handle AVR target. |
Date: |
Fri, 29 Sep 2023 11:16:18 +0200 |
* gnu/packages/cross-base.scm (cross-gcc-arguments): Handle AVR target.
---
gnu/packages/cross-base.scm | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index fc21e7c4fd..10d912b755 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -204,23 +204,38 @@ (define (cross-gcc-arguments target xgcc libc)
#~("--enable-multilib")
#~())
+ #$@(if (and libc (target-avr? target))
+ #~("--enable-languages=c,c++"
+ (string-append
"--with-native-system-header-dir="
+ #$libc "/avr/include" ))
#~()))
(remove
(lambda (flag)
(or (and (string-match "--enable-languages.*" flag)
#$libc)
+ (and (string-match
"--with-native-system-header-dir.*"
+ flag)
+ #$libc
+ #$(target-avr? target))
(and (string-match "--disable-multilib" flag)
#$(target-avr? target))))
#$flags)))
((#:make-flags flags)
- (if libc
- #~(let ((libc (assoc-ref %build-inputs "libc")))
+ (cond
+ ((and (target-avr? target) libc)
+ #~(let ((libc (assoc-ref %build-inputs "libc")))
;; 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")
- #$flags))
- flags))
+ (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/avr/lib")
+ #$flags)))
+ (libc
+ #~(let ((libc (assoc-ref %build-inputs "libc")))
+ ;; 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")
+ #$flags)))
+ (else flags)))
((#:phases phases)
#~(cross-gcc-build-phases #$target #$phases))))))
--
2.34.1
- [bug#66263] [PATCH 16/23] gnu: cross-gcc-search-paths: Handle AVR target., (continued)
- [bug#66263] [PATCH 16/23] gnu: cross-gcc-search-paths: Handle AVR target., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 18/23] gnu: Add avr-libc., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 08/23] gnu: avr-libc: Convert to procedure., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 09/23] gnu: Add make-cross-gcc-toolchain., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 10/23] gnu: Add binutils-cross-avr., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 12/23] gnu: Remove various AVR packages., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 07/23] gnu: Add AVR phases to cross-gcc-build-phases., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 15/23] guix: meson-configuration: Fix boolean assigment., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 17/23] gnu: cross-gcc: Handle inputs for AVR., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 03/23] gnu: Add avr platform., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 14/23] gnu: cross-gcc-arguments: Handle AVR target.,
Jean-Pierre De Jesus DIAZ <=
- [bug#66263] [PATCH 22/23] guix: meson-build-system: Disable PIC for AVR., Jean-Pierre De Jesus DIAZ, 2023/09/29
- [bug#66263] [PATCH 00/23] guix: Add avr as a platform., Jean-Pierre De Jesus Diaz, 2023/09/29