newlib: init at 3.0.0
Fixes #47533 newlib seems to think it’s a compiler when it’s not. Anyway had to make host refer to build platform for things to work.
This commit is contained in:
parent
2650a1f91e
commit
8db71d9d77
34
pkgs/development/misc/newlib/default.nix
Normal file
34
pkgs/development/misc/newlib/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ stdenv, fetchurl, buildPackages }:
|
||||||
|
|
||||||
|
let version = "3.0.0";
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "newlib-${version}";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "ftp://sourceware.org/pub/newlib/newlib-${version}.tar.gz";
|
||||||
|
sha256 = "0chka3szh50krcz2dcxcsr1v1i000jylwnsrp2pgrrblxqsn6mn8";
|
||||||
|
};
|
||||||
|
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
dontDisableStatic = true;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
incdir = "/${stdenv.hostPlatform.config}/include";
|
||||||
|
libdir = "/${stdenv.hostPlatform.config}/lib";
|
||||||
|
};
|
||||||
|
}
|
@ -9743,7 +9743,8 @@ with pkgs;
|
|||||||
/**/ if name == "glibc" then targetPackages.glibcCross or glibcCross
|
/**/ if name == "glibc" then targetPackages.glibcCross or glibcCross
|
||||||
else if name == "bionic" then targetPackages.bionic
|
else if name == "bionic" then targetPackages.bionic
|
||||||
else if name == "uclibc" then targetPackages.uclibcCross
|
else if name == "uclibc" then targetPackages.uclibcCross
|
||||||
else if name == "avrlibc" then targetPackages.avrlibcCross
|
else if name == "avrlibc" then targetPackages.avrlibcCross or avrlibcCross
|
||||||
|
else if name == "newlib" then targetPackages.newlibCross or newlibCross
|
||||||
else if name == "musl" then targetPackages.muslCross or muslCross
|
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 == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
|
||||||
else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries
|
else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries
|
||||||
@ -22836,4 +22837,9 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
tsung = callPackage ../applications/networking/tsung {};
|
tsung = callPackage ../applications/networking/tsung {};
|
||||||
|
|
||||||
|
newlib = callPackage ../development/misc/newlib { };
|
||||||
|
newlibCross = callPackage ../development/misc/newlib {
|
||||||
|
stdenv = crossLibcStdenv;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user