From dbc3c34ea0f992a00c7856d4ce39aa1585b759cf Mon Sep 17 00:00:00 2001 From: Theodoros Foradis Date: Mon, 19 Sep 2016 23:23:38 +0300 Subject: gnu: Add arm-none-eabi-gcc-6. * gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable. * gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch: New file. * gnu/packages/patches/gcc-6-cross-environment-variables.patch: New file. * gnu/local.mk (dist_patch_DATA): Add the patches. --- gnu/packages/embedded.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gnu/packages/embedded.scm') diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 24eeef9fa7..96d63d57af 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2016 Theodoros Foradis ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ (define-module (gnu packages embedded) #:use-module (gnu packages) #:use-module (gnu packages cross-base) #:use-module (gnu packages flex) + #:use-module (gnu packages gcc) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo)) @@ -97,6 +99,17 @@ (define-public gcc-arm-none-eabi-4.9 (variable "CROSS_LIBRARY_PATH") (files '("arm-none-eabi/lib")))))))) +(define-public gcc-arm-none-eabi-6 + (package + (inherit gcc-arm-none-eabi-4.9) + (version (package-version gcc-6)) + (source (origin (inherit (package-source gcc-6)) + (patches + (append + (origin-patches (package-source gcc-6)) + (search-patches "gcc-6-cross-environment-variables.patch" + "gcc-6-arm-none-eabi-multilib.patch"))))))) + (define-public newlib-arm-none-eabi (package (name "newlib") -- cgit v1.2.3 From 569f60164920a36e6597fe25e9373f97f89e8860 Mon Sep 17 00:00:00 2001 From: Theodoros Foradis Date: Sun, 16 Oct 2016 11:27:21 +0200 Subject: gnu: Add arm-none-eabi-toolchain variants. * gnu/packages/embedded.scm (arm-none-eabi-toolchain): New procedure. (arm-none-eabi-toolchain-4.9, arm-none-eabi-nano-toolchain-4.9, arm-none-eabi-toolchain-6, arm-none-eabi-nano-toolchain-6): New variables. Co-authored-by: Ricardo Wurmus --- gnu/packages/embedded.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gnu/packages/embedded.scm') diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 96d63d57af..a7af69f609 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -25,6 +25,8 @@ (define-module (gnu packages embedded) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (guix build utils) #:use-module (gnu packages) #:use-module (gnu packages cross-base) #:use-module (gnu packages flex) @@ -176,3 +178,48 @@ (define-public newlib-nano-arm-none-eabi "--enable-newlib-nano-formatted-io" "--disable-nls")))) (synopsis "Newlib variant for small systems with limited memory"))) + +(define (arm-none-eabi-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 (string-append "arm-none-eabi" + (if (string=? (package-name newlib-with-xgcc) + "newlib-nano") + "-nano" "") + "-toolchain")) + (version (package-version xgcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (mkdir %output))) + (propagated-inputs + `(("binutils" ,(cross-binutils "arm-none-eabi")) + ("gcc" ,xgcc) + ("newlib" ,newlib-with-xgcc))) + (synopsis "Complete GCC tool chain for ARM bare metal development") + (description "This package provides a complete GCC tool chain for ARM +bare metal development. This includes the GCC arm-none-eabi cross compiler +and newlib (or newlib-nano) as the C library. The supported programming +languages are C and C++.") + (home-page (package-home-page xgcc)) + (license (package-license xgcc))))) + +(define-public arm-none-eabi-toolchain-4.9 + (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 + newlib-arm-none-eabi)) + +(define-public arm-none-eabi-nano-toolchain-4.9 + (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 + newlib-nano-arm-none-eabi)) + +(define-public arm-none-eabi-toolchain-6 + (arm-none-eabi-toolchain gcc-arm-none-eabi-6 + newlib-arm-none-eabi)) + +(define-public arm-none-eabi-nano-toolchain-6 + (arm-none-eabi-toolchain gcc-arm-none-eabi-6 + newlib-nano-arm-none-eabi)) -- cgit v1.2.3