summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolis Ragkousis <manolis837@gmail.com>2014-11-21 23:22:51 +0000
committerLudovic Courtès <ludo@gnu.org>2014-11-21 23:30:27 +0100
commita5b60e3c6bfec96092a7854edb0c74fb46eed647 (patch)
treedb6c4c62fe555ed0b6914d023bc2b8859e6cdade
parentf4391bec000fbc218becda950bb2543c659d95be (diff)
gnu: Add AVR-Libc.
* gnu/packages/avr.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add avr.scm. * gnu/packages/cross-base.scm (xgcc-avr): New variable. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for "avr". Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu-system.am1
-rw-r--r--gnu/packages/avr.scm51
-rw-r--r--gnu/packages/bootstrap.scm1
-rw-r--r--gnu/packages/cross-base.scm6
4 files changed, 59 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am
index d36920cba21..d3b822c169a 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -40,6 +40,7 @@ GNU_SYSTEM_MODULES = \
40 gnu/packages/autogen.scm \ 40 gnu/packages/autogen.scm \
41 gnu/packages/autotools.scm \ 41 gnu/packages/autotools.scm \
42 gnu/packages/avahi.scm \ 42 gnu/packages/avahi.scm \
43 gnu/packages/avr.scm \
43 gnu/packages/backup.scm \ 44 gnu/packages/backup.scm \
44 gnu/packages/base.scm \ 45 gnu/packages/base.scm \
45 gnu/packages/bash.scm \ 46 gnu/packages/bash.scm \
diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
new file mode 100644
index 00000000000..3f8e8277078
--- /dev/null
+++ b/gnu/packages/avr.scm
@@ -0,0 +1,51 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages avr)
20 #:use-module (guix licenses)
21 #:use-module (guix download)
22 #:use-module (guix packages)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages cross-base))
26
27(define-public avr-libc
28 (package
29 (name "avr-libc")
30 (version "1.8.1")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append
34 "mirror://savannah//avr-libc/avr-libc-"
35 version ".tar.bz2"))
36 (sha256
37 (base32
38 "0sd9qkvhmk9av4g1f8dsjwc309hf1g0731bhvicnjb3b3d42l1n3"))))
39 (build-system gnu-build-system)
40 (arguments
41 `(#:out-of-source? #t
42 #:configure-flags '("--host=avr")))
43
44 (native-inputs `(("cross-binutils" ,(cross-binutils "avr"))
45 ("cross-gcc" ,xgcc-avr)))
46 (home-page "http://www.nongnu.org/avr-libc/")
47 (synopsis "The AVR C Library")
48 (description
49 "AVR Libc is a project whose goal is to provide a high quality C library
50for use with GCC on Atmel AVR microcontrollers.")
51 (license (bsd-style "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 33b61aa0bee..854d97bcfb4 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -162,6 +162,7 @@ check whether everything is alright."
162 ;; XXX: This one is used bare-bones, without a libc, so add a case 162 ;; XXX: This one is used bare-bones, without a libc, so add a case
163 ;; here just so we can keep going. 163 ;; here just so we can keep going.
164 ((string=? system "xtensa-elf") "no-ld.so") 164 ((string=? system "xtensa-elf") "no-ld.so")
165 ((string=? system "avr") "no-ld.so")
165 166
166 (else (error "dynamic linker name not known for this system" 167 (else (error "dynamic linker name not known for this system"
167 system)))) 168 system))))
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index a68711c91f0..74809d08f99 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -313,6 +313,12 @@ XBINUTILS and the cross tool chain."
313 (cross-binutils triplet) 313 (cross-binutils triplet)
314 (cross-libc triplet)))) 314 (cross-libc triplet))))
315 315
316(define-public xgcc-avr
317 ;; AVR cross-compiler, used to build AVR-Libc.
318 (let ((triplet "avr"))
319 (cross-gcc triplet
320 (cross-binutils triplet))))
321
316(define-public xgcc-xtensa 322(define-public xgcc-xtensa
317 ;; Bare-bones Xtensa cross-compiler, used to build the Atheros firmware. 323 ;; Bare-bones Xtensa cross-compiler, used to build the Atheros firmware.
318 (cross-gcc "xtensa-elf")) 324 (cross-gcc "xtensa-elf"))