mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
ld64: fix zippered binaries (#480889)
This commit is contained in:
@@ -73,6 +73,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./patches/0016-Add-dyldinfo-to-the-ld64-build.patch
|
||||
./patches/0017-Fix-dyldinfo-build.patch
|
||||
./patches/0018-Use-STL-containers-instead-of-LLVM-containers.patch
|
||||
|
||||
# Fix zippered versions on macOS 26+. Part of upstream ld64-956.6. Remove on next version bump.
|
||||
# https://github.com/apple-oss-distributions/ld64/commit/1a4389663d65d6630e4b3e31ace2a86b6183b452
|
||||
./patches/0019-Fix-zippered-versions-macos-26.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/ld/Options.cpp b/src/ld/Options.cpp
|
||||
--- a/src/ld/Options.cpp
|
||||
+++ b/src/ld/Options.cpp
|
||||
@@ -4882,7 +4885,8 @@ void Options::reconfigureDefaults()
|
||||
uint32_t iOSMacOSMajorVersion = (iOSMacVersion >> 16) & 0xFFFF;
|
||||
|
||||
// macOS 11 -> iOSMac 14, and so on
|
||||
- uint32_t newMajorVersion = macOSMajorVersion + 3;
|
||||
+ uint32_t newMajorVersion = macOSMajorVersion < 26 ? macOSMajorVersion + 3 : macOSMajorVersion;
|
||||
+ // rdar://154107557 (ld64 fix handling of zippered versions for macOS 26+)
|
||||
if ( newMajorVersion > iOSMacOSMajorVersion ) {
|
||||
uint32_t newVersion = newMajorVersion << 16;
|
||||
std::string oldVersionString = getVersionString32(iOSMacVersion);
|
||||
Reference in New Issue
Block a user