···11diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp
22-index 9250016..91d54ec 100644
22+index e4b37ec..4189ebc 100644
33--- a/cctools/ld64/src/ld/Options.cpp
44+++ b/cctools/ld64/src/ld/Options.cpp
55-@@ -4175,23 +4175,9 @@ void Options::checkIllegalOptionCombinations()
55+@@ -5800,24 +5800,6 @@ void Options::checkIllegalOptionCombinations()
66+ if ( fDeadStrip && (fOutputKind == Options::kObjectFile) )
67 throw "-r and -dead_strip cannot be used together";
7888- // can't use -rpath unless targeting 10.5 or later
99+- // can't use -rpath unless targeting 10.5 or later
910- if ( fRPaths.size() > 0 ) {
1010-- if ( !minOS(ld::mac10_5, ld::iOS_2_0) )
1111+- if ( !platforms().minOS(ld::version2008) )
1112- throw "-rpath can only be used when targeting Mac OS X 10.5 or later";
1213- switch ( fOutputKind ) {
1314- case Options::kDynamicExecutable:
···2324- }
2425- }
2526-
2626-+ if ( fRPaths.size() > 0 && !minOS(ld::mac10_5, ld::iOS_2_0) )
2727-+ throw "-rpath can only be used when targeting Mac OS X 10.5 or later";
2828-+
2927 if ( fPositionIndependentExecutable ) {
3028 switch ( fOutputKind ) {
3129 case Options::kDynamicExecutable:
+5-11
pkgs/os-specific/darwin/cctools/port.nix
···18181919let
2020 baseParams = rec {
2121- name = "${targetPrefix}cctools-port-${version}";
2222- version = "895";
2121+ name = "${targetPrefix}cctools-port";
2222+ version = "927.0.2";
23232424 src = fetchFromGitHub {
2525 owner = "tpoechtrager";
2626 repo = "cctools-port";
2727- rev = "07619027f8311fa61b4a549c75994b88739a82d8";
2828- sha256 = "12g94hhz5v5bmy2w0zb6fb4bjlmn992gygc60h9nai15kshj2spi";
2727+ rev = "8239a5211bcf07d6b9d359782e1a889ec1d7cce5";
2828+ sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac";
2929 };
30303131 outputs = [ "out" "dev" ];
···3535 ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
3636 ++ stdenv.lib.optional enableTapiSupport libtapi;
37373838- patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ./apfs.patch ];
3838+ patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
39394040 __propagatedImpureHostDeps = [
4141 # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
···8282 EOF
83838484 cd cctools
8585- '';
8686-8787- # TODO: this builds an ld without support for LLVM's LTO. We need to teach it, but that's rather
8888- # hairy to handle during bootstrap. Perhaps it could be optional?
8989- preConfigure = ''
9090- sh autogen.sh
9185 '';
92869387 preInstall = ''