Paste number 313284: avr-toolchain

Paste number 313284: avr-toolchain
Pasted by: phant0mas
When:5 years, 7 months ago
Share:Tweet this! | http://paste.lisp.org/+6PQC
Channel:None
Paste contents:
Raw Source | XML | Display As
(define-public avr-binutils
  (package
    (inherit (cross-binutils "avr"))
    (name "avr-binutils")
    (arguments
     '(#:configure-flags '("--target=avr"
                           "--disable-nls")))))

(define-public avr-gcc
  (package
    (inherit (cross-gcc "avr" avr-binutils))
    (name "avr-gcc")
    (arguments
     `(,@(substitute-keyword-arguments (package-arguments (cross-gcc "avr" avr-binutils))
           ((#:phases phases)
            `(modify-phases ,phases
               (add-after 'unpack 'fix-genmultilib
                 (lambda _
                   (substitute* "gcc/genmultilib"
                     (("#!/bin/sh") (string-append "#!" (which "sh"))))
                   #t))))
           ((#:configure-flags flags)
            `(cons* "--target=avr"
                    "--enable-languages=c,c++"
                    "--disable-nls"
                    "--with-dwarf2"
                   (delete "--disable-multilib" ,flags))))))))

(define-public avr-libc
  (package
    (name "avr-libc")
    (version "1.8.1")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "mirror://savannah//avr-libc/avr-libc-"
                    version ".tar.bz2"))
              (sha256
               (base32
                "0sd9qkvhmk9av4g1f8dsjwc309hf1g0731bhvicnjb3b3d42l1n3"))))
    (build-system gnu-build-system)
    (arguments
     `(#:out-of-source? #t
       #:configure-flags '("--host=avr")))

    (native-inputs `(("avr-binutils" ,avr-binutils)
                     ("avr-gcc" ,avr-gcc)
                     ("libc" ,(cross-libc "i686-linux"))))
    (home-page "http://www.nongnu.org/avr-libc/")
    (synopsis "The AVR C Library")
    (description
     "AVR Libc is a project whose goal is to provide a high quality C library
for use with GCC on Atmel AVR microcontrollers.")
    (license (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.