mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
or1k-newlib: Add newlib for OpenRISC 1000
This commit is contained in:
parent
6d8327ea96
commit
46db711cda
2 changed files with 39 additions and 0 deletions
36
pkgs/development/misc/or1k/newlib.nix
Normal file
36
pkgs/development/misc/or1k/newlib.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:
|
||||
|
||||
crossLibcStdenv.mkDerivation {
|
||||
name = "newlib";
|
||||
src = fetchFromGitHub {
|
||||
owner = "openrisc";
|
||||
repo = "newlib";
|
||||
rev = "8ac94ca7bbe4ceddafe6583ee4766d3c15b18ac8";
|
||||
sha256 = "0hzhijmry5slpp6x12pgng8v7jil3mn18ahrhnw431lqrs1cma0s";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
# newlib expects CC to build for build platform, not host platform
|
||||
preConfigure = ''
|
||||
export CC=cc
|
||||
'';
|
||||
|
||||
configurePlatforms = [ "build" "target" ];
|
||||
configureFlags = [
|
||||
"--host=${stdenv.buildPlatform.config}"
|
||||
|
||||
"--disable-newlib-supplied-syscalls"
|
||||
"--disable-nls"
|
||||
"--enable-newlib-io-long-long"
|
||||
"--enable-newlib-register-fini"
|
||||
"--enable-newlib-retargetable-locking"
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
passthru = {
|
||||
incdir = "/${stdenv.targetPlatform.config}/include";
|
||||
libdir = "/${stdenv.targetPlatform.config}/lib";
|
||||
};
|
||||
}
|
|
@ -10664,6 +10664,8 @@ in
|
|||
vc4-newlib = callPackage ../development/misc/vc4/newlib.nix {};
|
||||
resim = callPackage ../misc/emulators/resim {};
|
||||
|
||||
or1k-newlib = callPackage ../development/misc/or1k/newlib.nix {};
|
||||
|
||||
rappel = callPackage ../development/misc/rappel/default.nix { };
|
||||
|
||||
pharo-vms = callPackage ../development/pharo/vm { };
|
||||
|
@ -12841,6 +12843,7 @@ in
|
|||
else if name == "avrlibc" then targetPackages.avrlibcCross or avrlibcCross
|
||||
else if name == "newlib" && stdenv.targetPlatform.isMsp430 then targetPackages.msp430NewlibCross or msp430NewlibCross
|
||||
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 == "musl" then targetPackages.muslCross or muslCross
|
||||
else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
|
||||
|
|
Loading…
Reference in a new issue