mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
20f8a924df
One behavior of cctools' libtool when invoked as ranlib is rotating archives of universal object files (such as those created by `clang -arch i386 -arch x86_64 -c ...`) into universal files containing per-architecture archives each containing single-architecture objects. From Xcode 7 until Xcode 7.3, whose cctools/ld64 are not yet open source, there was a bug where this would fail if any of the individual objects were LLVM bitcode objects rather than natively compiled ones, and incorrectly succeed with nonsensical results if such an archive contained members that were not recognizable object files at all. The fix is straightforward and this commit adds a patch to apply it while we wait for newer cctools sources to be released.
12 lines
407 B
Diff
12 lines
407 B
Diff
--- misc/libtool.c
|
|
+++ misc/libtool.c
|
|
@@ -1526,7 +1526,7 @@ void)
|
|
for(k = 0; k < archs[j].nmembers; k++){
|
|
if(archs[j].members[k].mh == NULL &&
|
|
#ifdef LTO_SUPPORT
|
|
- archs[j].members[k].lto_contents == TRUE &&
|
|
+ archs[j].members[k].lto_contents == FALSE &&
|
|
#endif /* LTO_SUPPORT */
|
|
archs[j].members[k].mh64 == NULL){
|
|
error("library member: %s(%.*s) is not an "
|