diff mbox

[3/3] gnu: Add newlib-nano-arm-none-eabi.

Message ID 20160918063513.11027-4-rekado@elephly.net
State New
Headers show

Commit Message

Ricardo Wurmus Sept. 18, 2016, 6:35 a.m. UTC
* gnu/packages/embedded.scm (newlib-nano-arm-none-eabi): New variable.
---
 gnu/packages/embedded.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Ludovic Courtès Sept. 21, 2016, 8:40 a.m. UTC | #1
Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (newlib-nano-arm-none-eabi): New variable.

[...]

> +(define-public newlib-nano-arm-none-eabi
> +  (package (inherit newlib-arm-none-eabi)
> +    (name "newlib-nano")

I think it should be “newlib-minimal”, no?  Or does “nano” have a
special meaning?

Also, make sure to add a synopsis that mentions its minimalness, and
maybe a comment stating what the intended use case is, or how the
feature set was chosen.

Otherwise LGTM, thanks!

Ludo’.
Ricardo Wurmus Oct. 2, 2016, 6:47 p.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * gnu/packages/embedded.scm (newlib-nano-arm-none-eabi): New variable.
>
> [...]
>
>> +(define-public newlib-nano-arm-none-eabi
>> +  (package (inherit newlib-arm-none-eabi)
>> +    (name "newlib-nano")
>
> I think it should be “newlib-minimal”, no?  Or does “nano” have a
> special meaning?

The variant of newlib that targets small systems with limited memory and
other size constraints is commonly called “newlib-nano” on the mailing
lists and in other distributions.  The configure flags also mention
“nano”, as does the documentation, but there’s no separate project for
“newlib nano”.  It’s just newlib with the nano flags.

> Also, make sure to add a synopsis that mentions its minimalness, and
> maybe a comment stating what the intended use case is, or how the
> feature set was chosen.

Okay, I’ll override the synopsis.

~~ Ricardo
diff mbox

Patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8f484e5..43f6068 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -163,3 +163,23 @@  systems.  It is a conglomeration of several library parts that are easily
 usable on embedded products.")
     (license (license:non-copyleft
               "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
+
+(define-public newlib-nano-arm-none-eabi
+  (package (inherit newlib-arm-none-eabi)
+    (name "newlib-nano")
+    (arguments
+     (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
+       ((#:configure-flags flags)
+        ``("--target=arm-none-eabi"
+           "--enable-multilib"
+           "--disable-newlib-supplied-syscalls"
+           "--enable-newlib-reent-small"
+           "--disable-newlib-fvwrite-in-streamio"
+           "--disable-newlib-fseek-optimization"
+           "--disable-newlib-wide-orient"
+           "--enable-newlib-nano-malloc"
+           "--disable-newlib-unbuf-stream-opt"
+           "--enable-lite-exit"
+           "--enable-newlib-global-atexit"
+           "--enable-newlib-nano-formatted-io"
+           "--disable-nls"))))))