From 936433a5deb6ccc8f8476096f2c2b8dc72c33388 Mon Sep 17 00:00:00 2001 From: zorz Date: Thu, 2 Apr 2026 01:11:55 +0300 Subject: chromium musl --- chromium/patches/019-musl-no-execinfo.patch | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 chromium/patches/019-musl-no-execinfo.patch (limited to 'chromium/patches/019-musl-no-execinfo.patch') diff --git a/chromium/patches/019-musl-no-execinfo.patch b/chromium/patches/019-musl-no-execinfo.patch new file mode 100644 index 0000000..7447919 --- /dev/null +++ b/chromium/patches/019-musl-no-execinfo.patch @@ -0,0 +1,68 @@ +musl does not have execinfo.h, and hence no implementation of +. backtrace() +. backtrace_symbols() +for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1 +-- +--- a/v8/src/codegen/external-reference-table.cc ++++ b/v8/src/codegen/external-reference-table.cc +@@ -11,7 +11,9 @@ + + #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) + #define SYMBOLIZE_FUNCTION ++#if defined(__GLIBC__) + #include ++#endif + + #include + +@@ -96,7 +98,7 @@ + } + + const char* ExternalReferenceTable::ResolveSymbol(void* address) { +-#ifdef SYMBOLIZE_FUNCTION ++#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__) + char** names = backtrace_symbols(&address, 1); + const char* name = names[0]; + // The array of names is malloc'ed. However, each name string is static +--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h ++++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h +@@ -58,7 +58,7 @@ + #define HAVE_ERRNO_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_EXECINFO_H 1 ++/* #define HAVE_EXECINFO_H 1 */ + + /* Define to 1 if you have the header file. */ + #define HAVE_FCNTL_H 1 +--- a/base/debug/stack_trace.cc ++++ b/base/debug/stack_trace.cc +@@ -291,7 +291,9 @@ + } + + void StackTrace::OutputToStream(std::ostream* os) const { ++#if defined(__GLIBC__) + OutputToStreamWithPrefix(os, {}); ++#endif + } + + void StackTrace::OutputToStreamWithPrefix(std::ostream* os, +@@ -311,7 +313,7 @@ + + std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const { + std::stringstream stream; +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + OutputToStreamWithPrefix(&stream, prefix_string); + #endif + return stream.str(); +@@ -335,7 +335,7 @@ + } + + std::ostream& operator<<(std::ostream& os, const StackTrace& s) { +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + s.OutputToStream(&os); + #else + os << "StackTrace::OutputToStream not implemented."; + -- cgit v1.2.3