GNU bug report logs -
#48767
[PATCH 0/7] Add msp430 toolchain
Previous Next
Full log
View this message in rfc822 format
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
* gnu/packages/embedded.scm (gcc-msp430): New variable.
---
gnu/packages/bootstrap.scm | 1 +
gnu/packages/embedded.scm | 46 ++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c598cedc0a..54a028e977 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -311,6 +311,7 @@ (define* (glibc-dynamic-linker
((string=? system "arm-eabi") "no-ld.so")
((string=? system "xtensa-elf") "no-ld.so")
((string=? system "avr") "no-ld.so")
+ ((string=? system "msp430-elf") "no-ld.so")
((string=? system "propeller-elf") "no-ld.so")
((string=? system "i686-mingw") "no-ld.so")
((string=? system "x86_64-mingw") "no-ld.so")
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 3e66382eed..cf48c61a93 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -530,6 +530,52 @@ (define-public gcc-msp430-support-files
`(("unzip" ,unzip)))
(license license:bsd-3)))
+(define-public gcc-msp430
+ (let ((xgcc (cross-gcc "msp430-elf"
+ #:xgcc gcc-9
+ #:xbinutils (cross-binutils "msp430-elf"))))
+ (package
+ (inherit xgcc)
+ (name "gcc-msp430")
+ (native-inputs
+ `(("gcc" ,gcc-9)
+ ,@(package-native-inputs xgcc)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments xgcc)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gcc (assoc-ref inputs "gcc")))
+ ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
+ ;; prevent header conflict with the GCC from native-inputs.
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-join
+ (delete (string-append gcc "/include/c++")
+ (string-split (getenv "CPLUS_INCLUDE_PATH")
+ #\:))
+ ":"))
+ (format #t
+ "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+ (getenv "CPLUS_INCLUDE_PATH"))
+ #t)))))
+ ((#:configure-flags flags)
+ `(append (list
+ "--target=msp430-elf"
+ "--enable-languages=c,c++"
+ "--disable-nls"
+ "--enable-initfini-array"
+ "--enable-target-optspace"
+ "--enable-newlib-nano-formatted-io")
+ ,flags))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "CROSS_C_INCLUDE_PATH")
+ (files '("msp430-elf/include")))
+ (search-path-specification
+ (variable "CROSS_LIBRARY_PATH")
+ (files '("msp430-elf/lib"))))))))
+
(define-public libjaylink
(package
(name "libjaylink")
--
2.31.1
This bug report was last modified 2 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.