Merge pull request #1928 from 'cross-win-osx'.
This includes a lot of fixes for cross-building to Windows and Mac OS X and could possibly fix things even for non-cross-builds, like for example OpenSSL on Windows. The main reason for merging this in 14.04 already is that we already have runInWindowsVM in master and it doesn't work until we actually cross-build Cygwin's setup binary as the upstream version is a fast moving target which gets _overwritten_ on every new release. Conflicts: pkgs/top-level/all-packages.nix
This commit is contained in:
@@ -26,7 +26,13 @@ stdenv.mkDerivation rec {
|
||||
patches =
|
||||
# Don't search in non-Nix locations such as /usr, but do search in
|
||||
# Nixpkgs' Glibc.
|
||||
optional (stdenv ? glibc) ./search-path.patch;
|
||||
optional (stdenv ? glibc) ./search-path.patch ++
|
||||
optional (stdenv ? cross) (fetchurl {
|
||||
name = "fix-darwin-cross-compile.patch";
|
||||
url = "http://public.kitware.com/Bug/file_download.php?"
|
||||
+ "file_id=4981&type=bug";
|
||||
sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv";
|
||||
});
|
||||
|
||||
buildInputs = [ curl expat zlib bzip2 libarchive ]
|
||||
++ optional useNcurses ncurses
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
if test $cross = "arm-linux" ; then
|
||||
configureFlags="--target=arm-linux"
|
||||
elif test $cross = "mips-linux" ; then
|
||||
configureFlags="--target=mips-linux"
|
||||
elif test $cross = "mipsel-linux" ; then
|
||||
configureFlags="--target=mipsel-linux"
|
||||
elif test $cross = "sparc-linux" ; then
|
||||
configureFlags="--target=sparc-linux"
|
||||
elif test $cross = "powerpc-linux" ; then
|
||||
configureFlags="--target=powerpc-linux"
|
||||
elif test $cross = "ppc-linux" ; then
|
||||
configureFlags="--target=powerpc-linux"
|
||||
fi
|
||||
|
||||
patchConfigure() {
|
||||
# Clear the default library search path.
|
||||
if test "$noSysDirs" = "1"; then
|
||||
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
|
||||
fi
|
||||
}
|
||||
|
||||
preConfigure=patchConfigure
|
||||
|
||||
genericBuild
|
||||
@@ -1,13 +0,0 @@
|
||||
{stdenv, fetchurl, noSysDirs, cross}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "binutils-2.16.1";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://ftp.nluug.nl/gnu/binutils/binutils-2.16.1.tar.bz2;
|
||||
md5 = "6a9d529efb285071dad10e1f3d2b2967";
|
||||
};
|
||||
inherit noSysDirs;
|
||||
#configureFlags = if cross=="arm-linux" then "--target=arm-linux" else if cross=="mips-linux" then "--target=mips-linux" else if cross=="sparc-linux" then "--target=sparc-linux";
|
||||
inherit cross;
|
||||
}
|
||||
Reference in New Issue
Block a user