cctools-port: Pass through wrapped XCToolchain.

At the moment, this includes only dyldinfo, dwarfdump and dsymutil, but
we'll see whether we need more of these utilities later.

Tho reason those are wrapped in cctools-port is because it is the
binutils used to cross-compile for Mac OS X.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-10 22:08:51 +01:00
parent 45cd9994bc
commit 3940b21988
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, cross, fetchurl, autoconf, automake, libtool { stdenv, cross, fetchurl, autoconf, automake, libtool
, libcxx, llvm, clang, openssl, libuuid , libcxx, llvm, clang, openssl, libuuid
, maloader, makeWrapper, xctoolchain
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -13,7 +14,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ buildInputs = [
autoconf automake libtool libcxx llvm clang openssl libuuid autoconf automake libtool libcxx llvm clang openssl libuuid makeWrapper
]; ];
patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ]; patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ];
@ -47,6 +48,14 @@ stdenv.mkDerivation rec {
"--target=${cross.config}" "--target=${cross.config}"
]; ];
postInstall = ''
for tool in dyldinfo dwarfdump dsymutil; do
makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${cross.config}-$tool" \
--add-flags "${xctoolchain}/bin/$tool"
ln -s "$out/bin/${cross.config}-$tool" "$out/bin/$tool"
done
'';
meta = { meta = {
homepage = "http://www.opensource.apple.com/source/cctools/"; homepage = "http://www.opensource.apple.com/source/cctools/";
description = "Mac OS X Compiler Tools (cross-platform port)"; description = "Mac OS X Compiler Tools (cross-platform port)";

View File

@ -6554,6 +6554,8 @@ let
darwin = rec { darwin = rec {
cctools = forceNativeDrv (callPackage ../os-specific/darwin/cctools-port { cctools = forceNativeDrv (callPackage ../os-specific/darwin/cctools-port {
cross = assert crossSystem != null; crossSystem; cross = assert crossSystem != null; crossSystem;
inherit maloader;
xctoolchain = xcode.toolchain;
}); });
maloader = callPackage ../os-specific/darwin/maloader { maloader = callPackage ../os-specific/darwin/maloader {