diff --git a/pkgs/os-specific/darwin/cctools/apfs.patch b/pkgs/os-specific/darwin/cctools/apfs.patch deleted file mode 100644 index 8c6b3c0d273..00000000000 --- a/pkgs/os-specific/darwin/cctools/apfs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cctools/ld64/src/ld/OutputFile.cpp b/cctools/ld64/src/ld/OutputFile.cpp -index 8859882..158c7d2 100644 ---- a/cctools/ld64/src/ld/OutputFile.cpp -+++ b/cctools/ld64/src/ld/OutputFile.cpp -@@ -2786,7 +2786,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) - #ifdef __APPLE__ // ld64-port - struct statfs fsInfo; - if ( statfs(_options.outputFilePath(), &fsInfo) != -1 ) { -- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) { -+ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { - (void)unlink(_options.outputFilePath()); - outputIsMappableFile = true; - } -@@ -2814,7 +2814,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) - #ifdef __APPLE__ // ld64-port - struct statfs fsInfo; - if ( statfs(dirPath, &fsInfo) != -1 ) { -- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) { -+ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { - outputIsMappableFile = true; - } - } diff --git a/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch b/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch deleted file mode 100644 index 265d0d30477..00000000000 --- a/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp -index 9250016..91d54ec 100644 ---- a/cctools/ld64/src/ld/Options.cpp -+++ b/cctools/ld64/src/ld/Options.cpp -@@ -4175,23 +4175,9 @@ void Options::checkIllegalOptionCombinations() - throw "-r and -dead_strip cannot be used together"; - - // can't use -rpath unless targeting 10.5 or later -- if ( fRPaths.size() > 0 ) { -- if ( !minOS(ld::mac10_5, ld::iOS_2_0) ) -- throw "-rpath can only be used when targeting Mac OS X 10.5 or later"; -- switch ( fOutputKind ) { -- case Options::kDynamicExecutable: -- case Options::kDynamicLibrary: -- case Options::kDynamicBundle: -- break; -- case Options::kStaticExecutable: -- case Options::kObjectFile: -- case Options::kDyld: -- case Options::kPreload: -- case Options::kKextBundle: -- throw "-rpath can only be used when creating a dynamic final linked image"; -- } -- } -- -+ if ( fRPaths.size() > 0 && !minOS(ld::mac10_5, ld::iOS_2_0) ) -+ throw "-rpath can only be used when targeting Mac OS X 10.5 or later"; -+ - if ( fPositionIndependentExecutable ) { - switch ( fOutputKind ) { - case Options::kDynamicExecutable: diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index cb49bd023ce..6b8f26c8e66 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -18,24 +18,29 @@ assert (!stdenv.hostPlatform.isDarwin) -> maloader != null; let baseParams = rec { - pname = "${targetPrefix}cctools-port"; - version = "895"; + name = "${targetPrefix}cctools-port"; + version = "927.0.2"; src = fetchFromGitHub { owner = "tpoechtrager"; repo = "cctools-port"; - rev = "07619027f8311fa61b4a549c75994b88739a82d8"; - sha256 = "12g94hhz5v5bmy2w0zb6fb4bjlmn992gygc60h9nai15kshj2spi"; + rev = "8239a5211bcf07d6b9d359782e1a889ec1d7cce5"; + sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; + nativeBuildInputs = [ autoconf automake ] + + # TODO: remove on next hash change, libtool is unnecessary with autoreconfHook + ++ stdenv.lib.optional (stdenv.targetPlatform == stdenv.hostPlatform) libtool + + ++ [ autoreconfHook ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; - patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ./apfs.patch ]; + patches = [ ./ld-ignore-rpath-link.patch ]; __propagatedImpureHostDeps = [ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix index e68e77f55af..cac2d97482a 100644 --- a/pkgs/os-specific/darwin/libtapi/default.nix +++ b/pkgs/os-specific/darwin/libtapi/default.nix @@ -1,18 +1,19 @@ -{ lib, stdenv, fetchFromGitHub, cmake, python }: +{ lib, stdenv, fetchFromGitHub, cmake, python, clang_6 }: stdenv.mkDerivation { - name = "libtapi"; + name = "libtapi-1000.10.8"; src = fetchFromGitHub { owner = "tpoechtrager"; repo = "apple-libtapi"; - rev = "e56673694db395e25b31808b4fbb9a7005e6875f"; - sha256 = "1lnl1af9sszp9wxfk0wljrpdmwcx83j0w5c0y4qw4pqrdkdgwks7"; + rev = "cd9885b97fdff92cc41e886bba4a404c42fdf71b"; + sha256 = "1a19h39a48agvnmal99n9j1fjadiqwib7hfzmn342wmgh9z3vk0g"; }; nativeBuildInputs = [ cmake python ]; + buildInputs = [ clang_6.cc ]; preConfigure = '' - cd src/apple-llvm/src + cd src/llvm ''; cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];