[3/3] gnu: Add newlib-nano-arm-none-eabi.
Commit Message
* gnu/packages/embedded.scm (newlib-nano-arm-none-eabi): New variable.
---
gnu/packages/embedded.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
Comments
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’.
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
@@ -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"))))))