mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
Merge pull request #140055 from obsidiansystems/newlib-nano
newlib: Add parameter for "nano" variant
This commit is contained in:
commit
927a438a16
@ -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;
|
||||
|
||||
|
@ -16086,6 +16086,7 @@ with pkgs;
|
||||
else if name == "newlib" && stdenv.targetPlatform.isVc4 then targetPackages.vc4-newlib or vc4-newlib
|
||||
else if name == "newlib" && stdenv.targetPlatform.isOr1k then targetPackages.or1k-newlib or or1k-newlib
|
||||
else if name == "newlib" then targetPackages.newlibCross or newlibCross
|
||||
else if name == "newlib-nano" then targetPackages.newlib-nanoCross or newlib-nanoCross
|
||||
else if name == "musl" then targetPackages.muslCross or muslCross
|
||||
else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
|
||||
else if name == "libSystem" then
|
||||
@ -32974,7 +32975,15 @@ with pkgs;
|
||||
newlib = callPackage ../development/misc/newlib { };
|
||||
newlibCross = callPackage ../development/misc/newlib {
|
||||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
};
|
||||
|
||||
newlib-nano = callPackage ../development/misc/newlib {
|
||||
nanoizeNewlib = true;
|
||||
};
|
||||
newlib-nanoCross = callPackage ../development/misc/newlib {
|
||||
nanoizeNewlib = true;
|
||||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
|
||||
omnisharp-roslyn = callPackage ../development/tools/omnisharp-roslyn { dotnet-sdk = dotnet-sdk_5; };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user