Fix 10.5 SDK PowerPC64 libgcc_s.10.5.dylib link errors.#74
Open
AliceLR wants to merge 1 commit intodevernay:masterfrom
Open
Fix 10.5 SDK PowerPC64 libgcc_s.10.5.dylib link errors.#74AliceLR wants to merge 1 commit intodevernay:masterfrom
AliceLR wants to merge 1 commit intodevernay:masterfrom
Conversation
Fixes linking issues for PowerPC64 binaries caused by overwriting the libgcc_s.10.5.dylib in the 10.5 SDK with the equivalent library from the 10.6 SDK--which does not contain a PowerPC64 binary--by copying the PowerPC64 binary from the former into the latter with lipo. Linking a PowerPC64 binary without this patch results in the following: ``` $ powerpc-apple-darwin10-gcc-4.2.1 -m64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 test.c ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libgcc_s.10.5.dylib, missing required architecture ppc64 in file $ otool-classic -L a.out a.out: /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) ``` With this patch, instead: ``` $ powerpc-apple-darwin10-gcc-4.2.1 -m64 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -mmacosx-version-min=10.5 test.c $ otool-classic -L a.out a.out: /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libgcc_s_ppc64.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes linking issues for PowerPC64 binaries caused by overwriting the libgcc_s.10.5.dylib in the 10.5 SDK with the equivalent library from the 10.6 SDK--which does not contain a PowerPC64 binary. This is done by copying the PowerPC64 binary from the former into the latter with lipo.
Linking a PowerPC64 binary without this patch results in the following:
With this patch, instead:
With more complex programs, I have had this cause link failures due to missing symbols. I've only tested this patch in High Sierra, so please review and test carefully before merging.
Fixes #69.