I made changes to achieve a working cross-built gcc wrapper. Now,
"gcc45.hostDrv" works in the host system, together with libc, binutils, dynamic linker, ... svn path=/nixpkgs/branches/stdenv-updates/; revision=24971
This commit is contained in:
parent
cd9d91306c
commit
1b62c9c061
@ -51,6 +51,22 @@ stdenv.mkDerivation {
|
||||
langVhdl = if nativeTools then false else gcc ? langVhdl && gcc.langVhdl;
|
||||
zlib = if (gcc != null && gcc ? langVhdl) then zlib else null;
|
||||
shell = if shell == "" then stdenv.shell else shell;
|
||||
|
||||
crossAttrs = {
|
||||
shell = shell.hostDrv + "${shell.hostDrv.shellPath}";
|
||||
libc = libc.hostDrv;
|
||||
coreutils = coreutils.hostDrv;
|
||||
binutils = binutils.hostDrv;
|
||||
gcc = gcc.hostDrv;
|
||||
#
|
||||
# This is not the best way to do this. I think the reference should be
|
||||
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
|
||||
# do this sufficient if/else.
|
||||
dynamicLinker =
|
||||
(if stdenv.cross.arch == "arm" then "ld-linux.so.3" else
|
||||
if stdenv.cross.arch == "mips" then "ld.so.1" else
|
||||
abort "don't know the name of the dynamic linker for this platform");
|
||||
};
|
||||
|
||||
meta =
|
||||
let gcc_ = if gcc != null then gcc else {}; in
|
||||
|
@ -15,7 +15,9 @@ let
|
||||
|
||||
needsPortsNative = stdenv.isMips || stdenv.isArm;
|
||||
needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
|
||||
needsPorts = if cross == null then needsPortsNative else needsPortsCross;
|
||||
needsPorts = if (stdenv ? cross) && stdenv.cross != null then true
|
||||
else if cross == null then needsPortsNative
|
||||
else needsPortsCross;
|
||||
|
||||
srcPorts = fetchurl {
|
||||
# A tarball I manually made from a git clone, for the tag "glibc-2.12.1".
|
||||
|
@ -81,4 +81,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/bash";
|
||||
};
|
||||
}
|
||||
|
@ -2052,6 +2052,7 @@ let
|
||||
nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
|
||||
gcc = baseGCC;
|
||||
libc = glibc;
|
||||
shell = bash;
|
||||
inherit stdenv binutils coreutils zlib;
|
||||
};
|
||||
|
||||
@ -2917,13 +2918,13 @@ let
|
||||
installLocales = getPkgConfig "glibc" "locales" false;
|
||||
});
|
||||
|
||||
glibc212 = callPackage ../development/libraries/glibc-2.12 {
|
||||
glibc212 = (callPackage ../development/libraries/glibc-2.12 {
|
||||
kernelHeaders = linuxHeaders;
|
||||
installLocales = getPkgConfig "glibc" "locales" false;
|
||||
machHeaders = null;
|
||||
hurdHeaders = null;
|
||||
gccCross = null;
|
||||
};
|
||||
}) // { hostDrv = glibc212Cross; };
|
||||
|
||||
glibc212Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.12)
|
||||
(let crossGNU = (crossSystem != null && crossSystem.config == "i586-pc-gnu");
|
||||
|
Loading…
Reference in New Issue
Block a user