all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: 48767@debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#48767] [PATCH 4/7] gnu: Add msp430-toolchain.
Date: Mon, 31 May 2021 23:09:49 -0400	[thread overview]
Message-ID: <BYAPR05MB40239DEB0EDC2517F6A1D39FC53E9@BYAPR05MB4023.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20210601030951.10432-1-Morgan.J.Smith@outlook.com>

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/embedded.scm (msp430-toolchain): New variable.
---
 gnu/packages/embedded.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index af8c451573..dc324e54a1 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -615,6 +615,44 @@ (define-public newlib-msp430
     (license (license:non-copyleft
               "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
 
+(define (make-msp430-toolchain xgcc newlib)
+  "Produce a cross-compiler toolchain package with the compiler XGCC and the C
+library variant NEWLIB."
+  (let ((newlib-with-xgcc (package (inherit newlib)
+                                   (native-inputs
+                                    (alist-replace "xgcc" (list xgcc)
+                                                   (package-native-inputs newlib))))))
+    (package
+      (name "msp430-toolchain")
+      (version (package-version xgcc))
+      (source #f)
+      (build-system trivial-build-system)
+      (arguments
+       '(#:modules ((guix build union))
+         #:builder
+         (begin
+           (use-modules (ice-9 match)
+                        (guix build union))
+           (match %build-inputs
+             (((names . directories) ...)
+              (union-build (assoc-ref %outputs "out")
+                           directories)
+              #t)))))
+      (propagated-inputs
+       `(("binutils" ,(cross-binutils "msp430"))
+         ("gcc" ,xgcc)
+         ("gcc-msp430-support-files" ,gcc-msp430-support-files)
+         ("newlib" ,newlib-with-xgcc)))
+      (synopsis "Complete GCC tool chain for MSP430")
+      (description "This package provides a complete GCC tool chain for MSP430.
+This includes the GCC msp430-elf cross compiler and newlib as the C library.
+The supported programming language is C.")
+      (home-page (package-home-page xgcc))
+      (license (package-license xgcc)))))
+
+(define-public msp430-toolchain
+  (make-msp430-toolchain gcc-msp430 newlib-msp430))
+
 (define-public libjaylink
   (package
     (name "libjaylink")
-- 
2.31.1





  parent reply	other threads:[~2021-06-01  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210601030951.10432-1-Morgan.J.Smith@outlook.com>
2021-06-01  3:09 ` [bug#48767] [PATCH 2/7] gnu: Add gcc-msp430 Morgan.J.Smith
2021-06-01  3:09 ` [bug#48767] [PATCH 3/7] gnu: Add newlib-msp430 Morgan.J.Smith
2021-06-01  3:09 ` Morgan.J.Smith [this message]
2021-06-01  3:09 ` [bug#48767] [PATCH 5/7] gnu: Add gdb-msp430 Morgan.J.Smith
2021-06-01  3:09 ` [bug#48767] [PATCH 6/7] gnu: mspdebug: Update to 0.25-0.4c4d94e Morgan.J.Smith
2021-06-01  3:09 ` [bug#48767] [PATCH 7/7] gnu: Add msp430lib Morgan.J.Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR05MB40239DEB0EDC2517F6A1D39FC53E9@BYAPR05MB4023.namprd05.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=48767@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.