cctools: Add alternative source for sierra hack

Source master rebase of my [PR #34].

Eventually, we might consider doing something for GNU binutils too, in
order that we switch (the normal) ld-wrapper to always use this to
leverage ld to resolve libraries, rather than faking it in bash.

[PR #34]: https://github.com/tpoechtrager/cctools-port/pull/34
This commit is contained in:
John Ericson 2017-09-06 15:05:30 -04:00
parent 01e1722e8f
commit 1001311280
2 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,7 @@
, llvm, libcxx, libcxxabi, clang, libuuid
, libobjc ? null, maloader ? null, xctoolchain ? null
, hostPlatform, targetPlatform
, enableDumpNormalizedLibArgs ? false
}:
let
@ -20,12 +21,18 @@ let
name = "${targetPrefix}cctools-port-${version}";
version = "895";
src = fetchFromGitHub {
src = fetchFromGitHub (if enableDumpNormalizedLibArgs then {
owner = "tpoechtrager";
repo = "cctools-port";
# master with https://github.com/tpoechtrager/cctools-port/pull/34
rev = "8395d4b2c3350356e2fb02f5e04f4f463c7388df";
sha256 = "10vbf1cfzx02q8chc77s84fp2kydjpx2y682mr6mrbb7sq5rwh8f";
} else {
owner = "tpoechtrager";
repo = "cctools-port";
rev = "2e569d765440b8cd6414a695637617521aa2375b"; # From branch 895-ld64-274.2
sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52";
};
});
outputs = [ "out" "dev" ];

View File

@ -5779,8 +5779,13 @@ with pkgs;
clang-sierraHack = clang.override {
name = "clang-wrapper-with-reexport-hack";
bintools = clang.bintools.override {
bintools = darwin.binutils.override {
useMacosReexportHack = true;
bintools = darwin.binutils.bintools.override {
cctools = darwin.cctools.override {
enableDumpNormalizedLibArgs = true;
};
};
};
};