diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2016-09-17 19:12:24 +0200 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2016-10-09 15:45:59 +0200 |
| commit | 6c39886a808e5d35bbb8c8311de374222acb2d8b (patch) | |
| tree | bed3b79923b8d9f2567d68023e85d489de1d7552 /gnu | |
| parent | 35a37efbfd77faefa1e46e5745737949f055adbe (diff) | |
gnu: Add newlib-arm-none-eabi.
* gnu/packages/embedded.scm (newlib-arm-none-eabi): New variable.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/embedded.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 863fc4cec7e..cb4ccdf25a2 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm | |||
| @@ -96,3 +96,46 @@ | |||
| 96 | (search-path-specification | 96 | (search-path-specification |
| 97 | (variable "CROSS_LIBRARY_PATH") | 97 | (variable "CROSS_LIBRARY_PATH") |
| 98 | (files '("arm-none-eabi/lib")))))))) | 98 | (files '("arm-none-eabi/lib")))))))) |
| 99 | |||
| 100 | (define-public newlib-arm-none-eabi | ||
| 101 | (package | ||
| 102 | (name "newlib") | ||
| 103 | (version "2.4.0") | ||
| 104 | (source (origin | ||
| 105 | (method url-fetch) | ||
| 106 | (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-" | ||
| 107 | version ".tar.gz")) | ||
| 108 | (sha256 | ||
| 109 | (base32 | ||
| 110 | "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl")))) | ||
| 111 | (build-system gnu-build-system) | ||
| 112 | (arguments | ||
| 113 | `(#:out-of-source? #t | ||
| 114 | ;; The configure flags are identical to the flags used by the "GCC ARM | ||
| 115 | ;; embedded" project. | ||
| 116 | #:configure-flags '("--target=arm-none-eabi" | ||
| 117 | "--enable-newlib-io-long-long" | ||
| 118 | "--enable-newlib-register-fini" | ||
| 119 | "--disable-newlib-supplied-syscalls" | ||
| 120 | "--disable-nls") | ||
| 121 | #:phases | ||
| 122 | (modify-phases %standard-phases | ||
| 123 | (add-after 'unpack 'fix-references-to-/bin/sh | ||
| 124 | (lambda _ | ||
| 125 | (substitute* '("libgloss/arm/cpu-init/Makefile.in" | ||
| 126 | "libgloss/arm/Makefile.in" | ||
| 127 | "libgloss/libnosys/Makefile.in" | ||
| 128 | "libgloss/Makefile.in") | ||
| 129 | (("/bin/sh") (which "sh"))) | ||
| 130 | #t))))) | ||
| 131 | (native-inputs | ||
| 132 | `(("xbinutils" ,(cross-binutils "arm-none-eabi")) | ||
| 133 | ("xgcc" ,gcc-arm-none-eabi-4.9) | ||
| 134 | ("texinfo" ,texinfo))) | ||
| 135 | (home-page "http://www.sourceware.org/newlib/") | ||
| 136 | (synopsis "C library for use on embedded systems") | ||
| 137 | (description "Newlib is a C library intended for use on embedded | ||
| 138 | systems. It is a conglomeration of several library parts that are easily | ||
| 139 | usable on embedded products.") | ||
| 140 | (license (license:non-copyleft | ||
| 141 | "https://www.sourceware.org/newlib/COPYING.NEWLIB")))) | ||
