diff options
author | John Ericson <git@JohnEricson.me> | 2021-10-04 11:11:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 11:11:12 -0400 |
commit | 927a438a16c30774aaeff1c39418bce1f71b5ffc (patch) | |
tree | 060e8c1ba7114683bc804ad20a18a03c4f2fdb94 /pkgs/development/misc | |
parent | 381107eb6c0c91bc50c26ec5ea0d64b0f6617c86 (diff) | |
parent | e3ff6189f6aa641e108876de32ad83a542259b60 (diff) | |
download | nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar.gz nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar.bz2 nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar.lz nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar.xz nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.tar.zst nixlib-927a438a16c30774aaeff1c39418bce1f71b5ffc.zip |
Merge pull request #140055 from obsidiansystems/newlib-nano
newlib: Add parameter for "nano" variant
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r-- | pkgs/development/misc/newlib/default.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/development/misc/newlib/default.nix b/pkgs/development/misc/newlib/default.nix index 870aa068afe8..60ad50a8e4f7 100644 --- a/pkgs/development/misc/newlib/default.nix +++ b/pkgs/development/misc/newlib/default.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, buildPackages }: +{ stdenv, fetchurl, buildPackages +, # "newlib-nano" is what the official ARM embedded toolchain calls this build + # configuration that prioritizes low space usage. We include it as a preset + # for embedded projects striving for a similar configuration. + nanoizeNewlib ? false +}: stdenv.mkDerivation rec { pname = "newlib"; @@ -22,10 +27,21 @@ stdenv.mkDerivation rec { "--disable-newlib-supplied-syscalls" "--disable-nls" + "--enable-newlib-retargetable-locking" + ] ++ (if !nanoizeNewlib then [ "--enable-newlib-io-long-long" "--enable-newlib-register-fini" - "--enable-newlib-retargetable-locking" - ]; + ] else [ + "--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" + ]); dontDisableStatic = true; |