nixpkgs/pkgs/development/compilers/gcc
aszlig 9a0a85827c
gcc-4.8: Hook in cross-darwin libc and binutils.
Let's finally hook everything into the existing cross-building
infrastructure. We're using --with-sysroot instead of --with-headers
here, because the XCode SDK contains references to /usr/lib.

I've tried to patch those references, but unfortunately (at least with
install_name_tool) it isn't possible to change those refernces in stub
dylibs.

So after bugging @tpoechtrager with annoying questions (thanks again), I
think my initial approach (patching the SDK itself and/or regenerating
the dylib stubs) was way to complicated so I ended up with this
implementation.

Also, I've added a condition to binutilsCross to use cctools if the libc
is set to libSystem. This might need some cleanups someday, mainly to
figure out how to properly bridge cctools and binutils.

So, as an example on how to cross-compile GNU Hello to Darwin, you can
use something like this:

(import <nixpkgs> {
  crossSystem = {
    config = "x86_64-apple-darwin13";
    arch = "x86_64";
    libc = "libSystem";
    platform = {};
  };
}).hello.crossDrv

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:44 +01:00
..
3.3
3.4
4.2 gcc42: fix build via a patch from arch 2013-04-10 14:46:50 +02:00
4.2-apple64
4.3 Merge branch 'origin/master' into stdenv. 2013-08-17 10:00:16 +02:00
4.4 Merge glibc-2.18 branch into stdenv-updates 2013-12-28 18:51:23 +01:00
4.5 gcc: Fix building 4.5 and 4.6 2014-01-13 20:53:06 +01:00
4.6 gcc-4.6: unmaintain 2014-02-03 18:14:52 -05:00
4.8 gcc-4.8: Hook in cross-darwin libc and binutils. 2014-03-12 10:00:44 +01:00