mirror of
https://github.com/darlinghq/cctools-port.git
synced 2025-02-16 23:28:02 +00:00
Precise OSXCross check a little more to avoid false positives
This commit is contained in:
parent
6c40ead59d
commit
49b8b65f3d
@ -5144,7 +5144,13 @@ void OutputFile::addDyldInfo(ld::Internal& state, ld::Internal::FinalSection* s
|
||||
// Have direct reference to weak-global. This should be an indrect reference
|
||||
const char* demangledName = strdup(_options.demangleSymbol(atom->name()));
|
||||
// ld64-port: [OSXCROSS] Silence 'operator new[]' warning when linking GCC libsdtc++ statically
|
||||
if (!getenv("OSXCROSS") || strncmp(atom->name(), "__Zna", 5)) {
|
||||
const char* fileName = strrchr(target->safeFilePath(), '/');
|
||||
if ( !fileName )
|
||||
fileName = target->safeFilePath();
|
||||
else
|
||||
fileName++; // '/'
|
||||
if ( !getenv("OSXCROSS_GCC_LIBSTDCXX") || strncmp(atom->name(), "__Zna", 5) || strcmp(fileName, "libstdc++.a(new_opvnt.o)") ) {
|
||||
// ld64-port end
|
||||
warning("direct access in function '%s' from file '%s' to global weak symbol '%s' from file '%s' means the weak symbol cannot be overridden at runtime. "
|
||||
"This was likely caused by different translation units being compiled with different visibility settings.",
|
||||
demangledName, atom->safeFilePath(), _options.demangleSymbol(target->name()), target->safeFilePath());
|
||||
|
Loading…
x
Reference in New Issue
Block a user