mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
gnu: cross-libc: Add AVR Libc support.
* gnu/packages/avr.scm (make-avr-libc/implementation)[arguments]: Add avr target parameter and disable implicit cross inputs. [native-inputs]: Rename avr-gcc and avr-binutils to cross-gcc and cross-binutils to keep consistency with gnu-build-system. * gnu/packages/cross-base.scm (cross-libc): Add case for avr. Change-Id: I6b087946d1287a82fac61c48c513e7f2d2184794 Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
f49ccd9cef
commit
dfc1701724
2 changed files with 18 additions and 7 deletions
|
@ -33,7 +33,8 @@ (define-module (gnu packages avr)
|
||||||
#:use-module (gnu packages cross-base)
|
#:use-module (gnu packages cross-base)
|
||||||
#:use-module (gnu packages flashing-tools)
|
#:use-module (gnu packages flashing-tools)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
#:export (make-avr-toolchain))
|
#:export (make-avr-libc
|
||||||
|
make-avr-toolchain))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -101,7 +102,10 @@ (define* (make-avr-gcc/implementation #:key (xgcc gcc))
|
||||||
(define make-avr-gcc
|
(define make-avr-gcc
|
||||||
(memoize make-avr-gcc/implementation))
|
(memoize make-avr-gcc/implementation))
|
||||||
|
|
||||||
(define* (make-avr-libc/implementation #:key (xgcc gcc))
|
(define* (make-avr-libc/implementation #:key
|
||||||
|
(xbinutils (cross-binutils "avr"))
|
||||||
|
(xgcc (cross-gcc "avr"
|
||||||
|
#:xbinutils xbinutils)))
|
||||||
(package
|
(package
|
||||||
(name "avr-libc")
|
(name "avr-libc")
|
||||||
(version "2.0.0")
|
(version "2.0.0")
|
||||||
|
@ -114,10 +118,13 @@ (define* (make-avr-libc/implementation #:key (xgcc gcc))
|
||||||
"15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj"))))
|
"15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:out-of-source? #t
|
'(#:target "avr"
|
||||||
#:configure-flags '("--host=avr")))
|
#:out-of-source? #t
|
||||||
(native-inputs `(("avr-binutils" ,(make-avr-binutils))
|
;; Avoid including itself as this package is a target input and cannot
|
||||||
("avr-gcc" ,(make-avr-gcc #:xgcc xgcc))))
|
;; use the normal cross compilation inputs.
|
||||||
|
#:implicit-cross-inputs? #f))
|
||||||
|
(native-inputs `(("cross-binutils" ,xbinutils)
|
||||||
|
("cross-gcc" ,xgcc)))
|
||||||
(home-page "https://www.nongnu.org/avr-libc/")
|
(home-page "https://www.nongnu.org/avr-libc/")
|
||||||
(synopsis "AVR C Library")
|
(synopsis "AVR C Library")
|
||||||
(description
|
(description
|
||||||
|
@ -131,7 +138,7 @@ (define make-avr-libc
|
||||||
|
|
||||||
(define* (make-avr-toolchain/implementation #:key (xgcc gcc))
|
(define* (make-avr-toolchain/implementation #:key (xgcc gcc))
|
||||||
(let ((avr-binutils (make-avr-binutils))
|
(let ((avr-binutils (make-avr-binutils))
|
||||||
(avr-libc (make-avr-libc #:xgcc xgcc))
|
(avr-libc (make-avr-libc #:xgcc (cross-gcc "avr" #:xgcc xgcc)))
|
||||||
(avr-gcc (make-avr-gcc #:xgcc xgcc)))
|
(avr-gcc (make-avr-gcc #:xgcc xgcc)))
|
||||||
;; avr-libc checks the compiler version and passes "--enable-device-lib"
|
;; avr-libc checks the compiler version and passes "--enable-device-lib"
|
||||||
;; for avr-gcc > 5.1.0. It wouldn't install the library for atmega32u4
|
;; for avr-gcc > 5.1.0. It wouldn't install the library for atmega32u4
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
(define-module (gnu packages cross-base)
|
(define-module (gnu packages cross-base)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages avr)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
|
@ -699,6 +700,9 @@ (define* (cross-libc* target
|
||||||
'())
|
'())
|
||||||
,@(package-inputs libc) ;FIXME: static-bash
|
,@(package-inputs libc) ;FIXME: static-bash
|
||||||
,@(package-native-inputs libc)))))
|
,@(package-native-inputs libc)))))
|
||||||
|
((? target-avr?)
|
||||||
|
(make-avr-libc #:xbinutils xbinutils
|
||||||
|
#:xgcc xgcc))
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue