Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 675295 Details for
Bug 693444
sys-devel/binutils-apple-8.2.1-r1: Gentoo Prefix bootstrap failure in stage 2 on macos Mojave 10.14.6
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
updated ld64 No LTO patch
ld64-530-nolto.patch (text/plain), 8.49 KB, created by
Jacob Floyd
on 2020-11-27 14:35:06 UTC
(
hide
)
Description:
updated ld64 No LTO patch
Filename:
MIME Type:
Creator:
Jacob Floyd
Created:
2020-11-27 14:35:06 UTC
Size:
8.49 KB
patch
obsolete
>--- ld64-530/src/ld/InputFiles.cpp 2020-11-23 12:35:01.000000000 -0600 >+++ ld64-530/src/ld/InputFiles.cpp.nolto 2020-11-23 12:34:38.000000000 -0600 >@@ -60,7 +60,9 @@ > #include "macho_dylib_file.h" > #include "textstub_dylib_file.hpp" > #include "archive_file.h" >+#ifdef LTO > #include "lto_file.h" >+#endif > #include "opaque_section_file.h" > #include "MachOFileAbstraction.hpp" > #include "Snapshot.h" >@@ -205,9 +207,11 @@ > return result; > } > >+#ifdef LTO > result = lto::archName(p, len); > if ( result != NULL ) > return result; >+#endif > > const char* archiveArchName; > if ( ::archive::isArchiveFile(p, len, &platform, &archiveArchName) ) >@@ -355,6 +359,7 @@ > return objResult; > } > >+#ifdef LTO > // see if it is an llvm object file > objResult = lto::parse(p, len, info.path, info.modTime, info.ordinal, _options.architecture(), _options.subArchitecture(), _options.logAllFiles(), _options.verboseOptimizationHints()); > if ( objResult != NULL ) { >@@ -362,6 +367,7 @@ > OSAtomicIncrement32(&_totalObjectLoaded); > return objResult; > } >+#endif > > // see if it is a dynamic library (or text-based dynamic library) > ld::dylib::File* dylibResult; >@@ -413,6 +419,7 @@ > return archiveResult; > } > >+#ifdef LTO > // does not seem to be any valid linker input file, check LTO misconfiguration problems > if ( lto::archName((uint8_t*)p, len) != NULL ) { > if ( lto::libLTOisLoaded() ) { >@@ -442,6 +449,7 @@ > throwf("could not process llvm bitcode object file, because %s could not be loaded", libLTO); > } > } >+#endif > > if ( dylibsNotAllowed ) { > cpu_type_t dummy1; >--- ld64-530/src/ld/ld.cpp 2019-09-22 19:04:19.000000000 -0500 >+++ ld64-530/src/ld/ld.cpp.nolto 2020-11-23 12:38:45.000000000 -0600 >@@ -81,13 +81,17 @@ > #include "passes/branch_shim.h" > #include "passes/objc.h" > #include "passes/dylibs.h" >+#ifdef LTO > #include "passes/bitcode_bundle.h" >+#endif > #include "passes/code_dedup.h" > > #include "parsers/archive_file.h" > #include "parsers/macho_relocatable_file.h" > #include "parsers/macho_dylib_file.h" >+#ifdef LTO > #include "parsers/lto_file.h" >+#endif > #include "parsers/opaque_section_file.h" > > >@@ -1341,9 +1341,11 @@ > Options options(argc, argv); > InternalState state(options); > >+#ifdef LTO > // allow libLTO to be overridden by command line -lto_library > if (const char *dylib = options.overridePathlibLTO()) > lto::set_library(dylib); >+#endif > > // gather vm stats > if ( options.printStatistics() ) >@@ -1381,7 +1385,9 @@ > ld::passes::branch_island::doPass(options, state); // must be after stubs and order pass > ld::passes::dtrace::doPass(options, state); > ld::passes::compact_unwind::doPass(options, state); // must be after order pass >+#ifdef LTO > ld::passes::bitcode_bundle::doPass(options, state); // must be after dylib >+#endif > > // Sort again so that we get the segments in order. > state.sortSections(); >--- ld64-530/src/ld/Options.cpp 2020-04-08 15:46:11.000000000 -0500 >+++ ld64-530/src/ld/Options.cpp.nolto 2020-11-23 12:41:50.000000000 -0600 >@@ -53,12 +53,14 @@ > #define VAL(x) #x > #define STRINGIFY(x) VAL(x) > >+#ifdef LTO > // upward dependency on lto::version() > namespace lto { > extern const char* version(); > extern unsigned static_api_version(); > extern unsigned runtime_api_version(); > } >+#endif > > // magic to place command line in crash reports > const int crashreporterBufferSize = 2000; >@@ -4127,10 +4129,12 @@ > fprintf(stderr, "configured to support archs: %s\n", ALL_SUPPORTED_ARCHS); > // if only -v specified, exit cleanly > if ( argc == 2 ) { >+#ifdef LTO > const char* ltoVers = lto::version(); > if ( ltoVers != NULL ) > fprintf(stderr, "LTO support using: %s (static support for %d, runtime is %d)\n", > ltoVers, lto::static_api_version(), lto::runtime_api_version()); >+#endif > fprintf(stderr, "TAPI support using: %s\n", tapi::Version::getFullVersionAsString().c_str()); > exit(0); > } >@@ -4153,6 +4157,7 @@ > } > fprintf(stdout, "\n\t],\n"); > >+#ifdef LTO > const char* ltoVers = lto::version(); > if ( ltoVers != NULL ) { > fprintf(stdout, "\t\"lto\": {\n"); >@@ -4161,6 +4166,7 @@ > fprintf(stdout, "\t\t\"version_string\": \"%s\"\n", ltoVers); > fprintf(stdout, "\t},\n"); > } >+#endif > > fprintf(stdout, "\t\"tapi\": {\n"); > fprintf(stdout, "\t\t\"version\": \"%s\",\n", tapi::Version::getAsString().c_str()); >--- ld64-530/src/ld/parsers/archive_file.cpp 2020-04-08 15:46:10.000000000 -0500 >+++ ld64-530/src/ld/parsers/archive_file.cpp.nolto 2020-11-23 12:48:10.000000000 -0600 >@@ -92,8 +92,10 @@ > > static bool validMachOFile(const uint8_t* fileContent, uint64_t fileLength, > const mach_o::relocatable::ParserOptions& opts); >+#ifdef LTO > static bool validLTOFile(const uint8_t* fileContent, uint64_t fileLength, > const mach_o::relocatable::ParserOptions& opts); >+#endif > static cpu_type_t architecture(); > > class Entry : ar_hdr >@@ -237,6 +239,7 @@ > return mach_o::relocatable::isObjectFile(fileContent, fileLength, opts); > } > >+#ifdef LTO > template <typename A> > bool File<A>::validLTOFile(const uint8_t* fileContent, uint64_t fileLength, const mach_o::relocatable::ParserOptions& opts) > { >@@ -247,6 +250,7 @@ > return false; > return lto::isObjectFile(fileContent, fileLength, opts.architecture, opts.subType); > } >+#endif > > > >@@ -271,7 +275,11 @@ > continue; > #endif > // archive is valid if first .o file is valid >- return (validMachOFile(p->content(), p->contentSize(), opts) || validLTOFile(p->content(), p->contentSize(), opts)); >+ return (validMachOFile(p->content(), p->contentSize(), opts) >+#ifdef LTO >+ || validLTOFile(p->content(), p->contentSize(), opts) >+#endif >+ ); > } > // empty archive > return true; >@@ -407,6 +415,7 @@ > _instantiatedEntries[member] = state; > return _instantiatedEntries[member]; > } >+#ifdef LTO > // see if member is llvm bitcode file > result = lto::parse(member->content(), member->contentSize(), > mPath, member->modificationTime(), ordinal, >@@ -416,8 +425,13 @@ > _instantiatedEntries[member] = state; > return _instantiatedEntries[member]; > } >+#endif > >- throwf("archive member '%s' with length %d is not mach-o or llvm bitcode", memberName, member->contentSize()); >+ throwf("archive member '%s' with length %d is not mach-o" >+#ifdef LTO >+ " or llvm bitcode" >+#endif >+ , memberName, member->contentSize()); > } > catch (const char* msg) { > throwf("in %s, %s", memberPath, msg); >@@ -490,6 +504,7 @@ > if ( (member==start) && ((strcmp(mname, SYMDEF_64_SORTED) == 0) || (strcmp(mname, SYMDEF_64) == 0)) ) > continue; > #endif >+#ifdef LTO > if ( validMachOFile(member->content(), member->contentSize(), _objOpts) ) { > MemberState& state = this->makeObjectFileForMember(member); > // only look at files not already loaded >@@ -513,6 +528,7 @@ > } > } > } >+#endif > } > } > return didSome; >--- ld64-530/src/ld/passes/bitcode_bundle.cpp 2018-02-09 15:44:05.000000000 -0600 >+++ ld64-530/src/ld/passes/bitcode_bundle.cpp.nolto 2020-11-23 12:50:58.000000000 -0600 >@@ -22,6 +22,7 @@ > * @APPLE_LICENSE_HEADER_END@ > */ > >+#ifdef LTO > #include <stdio.h> > #include <stdlib.h> > #include <fcntl.h> >@@ -1084,3 +1085,4 @@ > } // namespace bitcode_bundle > } // namespace passes > } // namespace ld >+#endif >\ No newline at end of file >--- ld64-530/src/ld/Resolver.cpp 2019-07-16 19:36:00.000000000 -0500 >+++ ld64-530/src/ld/Resolver.cpp.nolto 2020-11-23 12:52:49.000000000 -0600 >@@ -56,7 +56,9 @@ > #include "InputFiles.h" > #include "SymbolTable.h" > #include "Resolver.h" >+#ifdef LTO > #include "parsers/lto_file.h" >+#endif > > #include "configure.h" > >@@ -1749,6 +1751,7 @@ > > void Resolver::linkTimeOptimize() > { >+#ifdef LTO > // only do work here if some llvm obj files where loaded > if ( ! _haveLLVMObjs ) > return; >@@ -1887,6 +1890,9 @@ > } > _symbolTable.removeDeadUndefs(_atoms, mustPreserve); > } >+#else >+ return; >+#endif > } > > >--- ld64-530/src/other/ObjectDump.cpp 2020-04-08 15:46:11.000000000 -0500 >+++ ld64-530/src/other/ObjectDump.cpp.nolto 2020-11-23 12:55:05.000000000 -0600 >@@ -33,7 +33,9 @@ > > #include "MachOFileAbstraction.hpp" > #include "parsers/macho_relocatable_file.h" >+#ifdef LTO > #include "parsers/lto_file.h" >+#endif > > const ld::VersionSet ld::File::_platforms; > >@@ -1279,10 +1281,12 @@ > if ( objResult != NULL ) > return objResult; > >+#ifdef LTO > // see if it is an llvm object file > objResult = lto::parse(p, fileLen, path, stat_buf.st_mtime, ld::File::Ordinal::NullOrdinal(), sPreferredArch, sPreferredSubArch, false, true); > if ( objResult != NULL ) > return objResult; >+#endif > > throwf("not a mach-o object file: %s", path); > #else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 693444
:
589012
|
589014
|
589078
|
674602
|
674605
|
674608
|
674611
|
674614
|
674617
|
675244
|
675247
|
675292
| 675295 |
675376
|
675382
|
675385