pmaports/luna/qt5-qtwebengine/patches-musl/no_execinfo.patch
Oliver Smith ca92b35948 Disable LuneOS UI (see #1459) [skip ci]
Moved from aports/main to aports/luna, so we can disable the entire
folder from building in the binary repository:
* qt5-qtwebengine
* postmarketos-ui-luna
2018-05-02 22:38:19 +02:00

193 lines
No EOL
7.4 KiB
Diff

diff -Naur a/src/3rdparty/chromium/base/debug/leak_tracker.h b/src/3rdparty/chromium/base/debug/leak_tracker.h
--- a/src/3rdparty/chromium/base/debug/leak_tracker.h 2016-12-04 17:37:29.096306764 -0800
+++ b/src/3rdparty/chromium/base/debug/leak_tracker.h 2016-12-04 17:48:46.224517026 -0800
@@ -10,7 +10,7 @@
#include "build/build_config.h"
// Only enable leak tracking in non-uClibc debug builds.
-#if !defined(NDEBUG) && !defined(__UCLIBC__)
+#if !defined(NDEBUG) && defined(HAVE_BACKTRACE)
#define ENABLE_LEAK_TRACKER
#endif
diff -Naur a/src/3rdparty/chromium/base/debug/stack_trace.cc b/src/3rdparty/chromium/base/debug/stack_trace.cc
--- a/src/3rdparty/chromium/base/debug/stack_trace.cc 2016-12-04 17:37:29.096306764 -0800
+++ b/src/3rdparty/chromium/base/debug/stack_trace.cc 2016-12-04 17:49:03.734703480 -0800
@@ -199,7 +199,7 @@
std::string StackTrace::ToString() const {
std::stringstream stream;
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
OutputToStream(&stream);
#endif
return stream.str();
diff -Naur a/src/3rdparty/chromium/base/debug/stack_trace.h b/src/3rdparty/chromium/base/debug/stack_trace.h
--- a/src/3rdparty/chromium/base/debug/stack_trace.h 2016-12-04 17:37:29.094306742 -0800
+++ b/src/3rdparty/chromium/base/debug/stack_trace.h 2016-12-04 17:49:21.906896983 -0800
@@ -76,7 +76,7 @@
// Prints the stack trace to stderr.
void Print() const;
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
// Resolves backtrace to symbols and write to stream.
void OutputToStream(std::ostream* os) const;
#endif
diff -Naur a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2016-12-04 17:37:29.104306849 -0800
+++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2016-12-04 17:51:03.367977370 -0800
@@ -25,7 +25,7 @@
#if defined(__GLIBCXX__)
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
#include <execinfo.h>
#endif
@@ -76,7 +76,7 @@
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
@@ -113,7 +113,7 @@
}
}
-#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#endif // defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -125,7 +125,7 @@
virtual ~BacktraceOutputHandler() {}
};
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
// This should be more than enough to store a 64-bit number in hex:
// 16 hex digits + 1 for null-terminator.
@@ -202,7 +202,7 @@
}
#endif // defined(USE_SYMBOLIZE)
}
-#endif // !defined(__UCLIBC__)
+#endif // defined(HAVE_BACKTRACE)
void PrintToStderr(const char* output) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
@@ -718,7 +718,7 @@
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
@@ -731,13 +731,13 @@
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
PrintBacktraceOutputHandler handler;
ProcessBacktrace(trace_, count_, &handler);
#endif
}
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
void StackTrace::OutputToStream(std::ostream* os) const {
StreamBacktraceOutputHandler handler(os);
ProcessBacktrace(trace_, count_, &handler);
diff -Naur a/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc b/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc
--- a/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc 2016-12-04 17:37:29.098306785 -0800
+++ b/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc 2016-12-04 17:51:31.348275313 -0800
@@ -38,7 +38,7 @@
#else
#define MAYBE_OutputToStream OutputToStream
#endif
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
TEST_F(StackTraceTest, MAYBE_OutputToStream) {
StackTrace trace;
@@ -134,7 +134,7 @@
TEST_F(StackTraceTest, DebugPrintBacktrace) {
StackTrace().Print();
}
-#endif // !defined(__UCLIBC__)
+#endif // defined(HAVE_BACKTRACE)
#if defined(OS_POSIX) && !defined(OS_ANDROID)
#if !defined(OS_IOS)
diff -Naur a/src/3rdparty/chromium/base/logging.cc b/src/3rdparty/chromium/base/logging.cc
--- a/src/3rdparty/chromium/base/logging.cc 2016-12-04 17:37:29.167307520 -0800
+++ b/src/3rdparty/chromium/base/logging.cc 2016-12-04 17:51:58.436563757 -0800
@@ -526,7 +526,7 @@
}
LogMessage::~LogMessage() {
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__)
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(HAVE_BACKTRACE)
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace trace;
diff -Naur a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp
--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp 2016-12-04 17:37:40.112424067 -0800
+++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp 2016-12-04 17:52:44.286051976 -0800
@@ -60,7 +60,7 @@
#include <windows.h>
#endif
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(HAVE_BACKTRACE))
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
@@ -164,7 +164,7 @@
}
void WTFGetBacktrace(void** stack, int* size) {
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(HAVE_BACKTRACE))
*size = backtrace(stack, *size);
#elif OS(WIN)
// The CaptureStackBackTrace function is available in XP, but it is not
@@ -215,7 +215,7 @@
};
FrameToNameScope::FrameToNameScope(void* addr) : m_name(0), m_cxaDemangled(0) {
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(MACOSX) || (OS(LINUX) && defined(HAVE_BACKTRACE))
Dl_info info;
if (!dladdr(addr, &info) || !info.dli_sname)
return;
diff -Naur a/src/3rdparty/chromium/third_party/webrtc/base/checks.cc b/src/3rdparty/chromium/third_party/webrtc/base/checks.cc
--- a/src/3rdparty/chromium/third_party/webrtc/base/checks.cc 2016-12-04 17:38:06.144701266 -0800
+++ b/src/3rdparty/chromium/third_party/webrtc/base/checks.cc 2016-12-04 17:53:19.007413116 -0800
@@ -16,7 +16,7 @@
#include <cstdio>
#include <cstdlib>
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
#include <cxxabi.h>
#include <execinfo.h>
#endif
@@ -60,7 +60,7 @@
// to get usable symbols on Linux. This is copied from V8. Chromium has a more
// advanced stace trace system; also more difficult to copy.
void DumpBacktrace() {
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
void* trace[100];
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
char** symbols = backtrace_symbols(trace, size);