@@ -576,6 +576,45 @@ (define-public gcc-msp430
(variable "CROSS_LIBRARY_PATH")
(files '("msp430-elf/lib"))))))))
+(define-public newlib-msp430
+ (package
+ (name "newlib")
+ (version "2.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:out-of-source? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-references-to-/bin/sh
+ (lambda _
+ (substitute* '("libgloss/msp430/Makefile.in"
+ "libgloss/libnosys/Makefile.in"
+ "libgloss/Makefile.in")
+ (("/bin/sh") (which "sh")))
+ #t)))
+ #:configure-flags '("--target=msp430-elf"
+ "--enable-languages=c,c++"
+ "--disable-nls"
+ "--enable-initfini-array")))
+ (native-inputs
+ `(("xbinutils" ,(cross-binutils "msp430-elf"))
+ ("xgcc" ,gcc-msp430)
+ ("texinfo" ,texinfo)))
+ (home-page "https://www.sourceware.org/newlib/")
+ (synopsis "C library for use on embedded systems")
+ (description "Newlib is a C library intended for use on embedded
+systems. It is a conglomeration of several library parts that are easily
+usable on embedded products.")
+ (license (license:non-copyleft
+ "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
+
(define-public libjaylink
(package
(name "libjaylink")
From: Morgan Smith <Morgan.J.Smith@outlook.com> * gnu/packages/embedded.scm (newlib-msp430): New variable. --- gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)