mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
gnu: avr: Use the correct gcc version as native-input.
* gnu/packages/avr.scm (avr-libc): Replace package by function. * gnu/packages/avr.scm (avr-toolchain): Use new avr-libc function. Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
parent
d23ce1ce2b
commit
4d2470b0ef
1 changed files with 20 additions and 17 deletions
|
@ -73,7 +73,7 @@ (define-public avr-gcc-5
|
||||||
(version (package-version gcc-5))
|
(version (package-version gcc-5))
|
||||||
(source (package-source gcc-5))))
|
(source (package-source gcc-5))))
|
||||||
|
|
||||||
(define-public avr-libc
|
(define (avr-libc avr-gcc)
|
||||||
(package
|
(package
|
||||||
(name "avr-libc")
|
(name "avr-libc")
|
||||||
(version "2.0.0")
|
(version "2.0.0")
|
||||||
|
@ -99,7 +99,7 @@ (define-public avr-libc
|
||||||
(unsetenv "C_INCLUDE_PATH")
|
(unsetenv "C_INCLUDE_PATH")
|
||||||
#t)))))
|
#t)))))
|
||||||
(native-inputs `(("avr-binutils" ,avr-binutils)
|
(native-inputs `(("avr-binutils" ,avr-binutils)
|
||||||
("avr-gcc" ,avr-gcc-4.9)))
|
("avr-gcc" ,avr-gcc)))
|
||||||
(home-page "http://www.nongnu.org/avr-libc/")
|
(home-page "http://www.nongnu.org/avr-libc/")
|
||||||
(synopsis "The AVR C Library")
|
(synopsis "The AVR C Library")
|
||||||
(description
|
(description
|
||||||
|
@ -109,6 +109,9 @@ (define-public avr-libc
|
||||||
(license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
|
(license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
|
||||||
|
|
||||||
(define (avr-toolchain avr-gcc)
|
(define (avr-toolchain avr-gcc)
|
||||||
|
;; 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 etc if we didn't use the corret avr-gcc.
|
||||||
|
(let ((avr-libc (avr-libc avr-gcc)))
|
||||||
(package
|
(package
|
||||||
(name "avr-toolchain")
|
(name "avr-toolchain")
|
||||||
(version (package-version avr-gcc))
|
(version (package-version avr-gcc))
|
||||||
|
@ -126,7 +129,7 @@ (define (avr-toolchain avr-gcc)
|
||||||
avrdude for firmware flashing. The supported programming languages are C and
|
avrdude for firmware flashing. The supported programming languages are C and
|
||||||
C++.")
|
C++.")
|
||||||
(home-page (package-home-page avr-libc))
|
(home-page (package-home-page avr-libc))
|
||||||
(license (package-license avr-gcc))))
|
(license (package-license avr-gcc)))))
|
||||||
|
|
||||||
(define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9))
|
(define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9))
|
||||||
(define-public avr-toolchain-5 (avr-toolchain avr-gcc-5))
|
(define-public avr-toolchain-5 (avr-toolchain avr-gcc-5))
|
||||||
|
|
Loading…
Reference in a new issue