From: Maxime Devos <maximedevos@telenet.be>
To: Morgan.J.Smith@outlook.com, 48767@debbugs.gnu.org
Subject: [bug#48767] [PATCH 2/6] gnu: Add gcc-msp430.
Date: Sun, 26 Sep 2021 17:51:44 +0200 [thread overview]
Message-ID: <2e7f75188f8cef65077d2e19efa3b5efdeb71781.camel@telenet.be> (raw)
In-Reply-To: <SN6PR05MB4031E5913CC5D130D8F4B056C5A69@SN6PR05MB4031.namprd05.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]
Morgan.J.Smith@outlook.com schreef op zo 26-09-2021 om 10:51 [-0400]:
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/embedded.scm (gcc-msp430): New variable.
> ---
> gnu/packages/bootstrap.scm | 1 +
> gnu/packages/embedded.scm | 33 +++++++++++++++++++++++++++++++++
> 2 files changed, 34 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 @@ or false to signal an error."
> ((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 f1f17e83a7..7073168b57 100644
> --- a/gnu/packages/embedded.scm
> +++ b/gnu/packages/embedded.scm
> @@ -530,6 +530,39 @@ languages are C and C++.")
> `(("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")
> + (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")))))))))
> + (native-search-paths
Shouldn't these be 'search-paths' instead of 'native-search-paths',
as "gcc-msp430" is a cross-compiler? (I know other GCC cross-compiler
packages in (gnu packages embedded) are using native-search-paths as well,
but I don't understand why.)
> + (list (search-path-specification
> + (variable "CROSS_C_INCLUDE_PATH")
> + (files '("msp430-elf/include")))
> + (search-path-specification
> + (variable "CROSS_LIBRARY_PATH")
> + (files '("msp430-elf/lib"))))))))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-09-26 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210926145155.966-1-Morgan.J.Smith@outlook.com>
2021-09-26 14:51 ` [bug#48767] [PATCH 2/6] gnu: Add gcc-msp430 Morgan.J.Smith
2021-09-26 15:51 ` Maxime Devos [this message]
2021-09-26 14:51 ` [bug#48767] [PATCH 3/6] gnu: Add newlib-msp430 Morgan.J.Smith
2021-09-26 16:04 ` Maxime Devos
2021-09-26 14:51 ` [bug#48767] [PATCH 4/6] gnu: Add msp430-toolchain Morgan.J.Smith
2021-09-26 16:08 ` Maxime Devos
2021-09-26 14:51 ` [bug#48767] [PATCH 5/6] gnu: Add gdb-msp430 Morgan.J.Smith
2021-09-26 16:16 ` Maxime Devos
2021-09-26 14:51 ` [bug#48767] [PATCH 6/6] gnu: Add msp430lib Morgan.J.Smith
2021-09-26 16:31 ` Maxime Devos
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=2e7f75188f8cef65077d2e19efa3b5efdeb71781.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=48767@debbugs.gnu.org \
--cc=Morgan.J.Smith@outlook.com \
/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.