From 81a77d6f5f7c3256f65fa29e47087fcbf05e5f69 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Thu, 27 Jul 2017 14:35:37 +0000 Subject: [PATCH] chromium: update to 61.0.3163.91. Closes #7137 --- .../files/musl-patches/musl-fixes.patch | 179 ++++++++---------- .../files/musl-patches/musl-hacks.patch | 6 +- .../files/musl-patches/musl-libc++.patch | 68 +++++++ .../files/musl-patches/musl-sandbox.patch | 20 ++ .../files/musl-patches/no-mallinfo.patch | 43 +++++ .../files/musl-patches/resolver.patch | 34 ++-- .../chromium/patches/chromium-atk-r1.patch | 11 ++ .../chromium/patches/chromium-gcc-r1.patch | 14 ++ .../patches/chromium-gn-bootstrap-r14.patch | 27 +++ .../chromium/patches/fix-gn_bootstrap.patch | 10 - srcpkgs/chromium/patches/gn_bootstrap.patch | 80 +++----- srcpkgs/chromium/patches/libc_malloc.patch | 26 +++ srcpkgs/chromium/patches/no-execinfo.patch | 87 +++------ srcpkgs/chromium/patches/no-mallinfo.patch | 83 -------- .../chromium/patches/no-secure_getenv.patch | 16 ++ srcpkgs/chromium/patches/set-clash.patch | 29 +++ srcpkgs/chromium/patches/swiftshader.patch | 86 +++++++++ srcpkgs/chromium/patches/xlocale.patch | 11 ++ srcpkgs/chromium/template | 19 +- 19 files changed, 519 insertions(+), 330 deletions(-) create mode 100644 srcpkgs/chromium/files/musl-patches/musl-libc++.patch create mode 100644 srcpkgs/chromium/files/musl-patches/no-mallinfo.patch create mode 100644 srcpkgs/chromium/patches/chromium-atk-r1.patch create mode 100644 srcpkgs/chromium/patches/chromium-gcc-r1.patch create mode 100644 srcpkgs/chromium/patches/chromium-gn-bootstrap-r14.patch delete mode 100644 srcpkgs/chromium/patches/fix-gn_bootstrap.patch create mode 100644 srcpkgs/chromium/patches/libc_malloc.patch delete mode 100644 srcpkgs/chromium/patches/no-mallinfo.patch create mode 100644 srcpkgs/chromium/patches/no-secure_getenv.patch create mode 100644 srcpkgs/chromium/patches/set-clash.patch create mode 100644 srcpkgs/chromium/patches/swiftshader.patch create mode 100644 srcpkgs/chromium/patches/xlocale.patch diff --git a/srcpkgs/chromium/files/musl-patches/musl-fixes.patch b/srcpkgs/chromium/files/musl-patches/musl-fixes.patch index 8f0b116cd14..61d697bf6d0 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-fixes.patch +++ b/srcpkgs/chromium/files/musl-patches/musl-fixes.patch @@ -13,37 +13,19 @@ /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 ---- ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc.orig -+++ ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -49,7 +49,7 @@ - } +--- breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig 2017-09-15 15:21:56.000000000 +0000 ++++ breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2017-09-15 15:28:11.513244531 +0000 +@@ -37,6 +37,10 @@ + #include "common/memory.h" + #include "google_breakpad/common/minidump_format.h" - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; ++#if !defined(__GLIBC__) ++ #define _libc_fpstate _fpstate ++#endif ++ + namespace google_breakpad { - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; ---- ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig -+++ ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -50,7 +50,7 @@ - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext *uc, - const struct fpsimd_context* fpregs); + // Wraps platform-dependent implementations of accessors to ucontext structs. --- ./breakpad/src/client/linux/minidump_writer/minidump_writer.h.orig +++ ./breakpad/src/client/linux/minidump_writer/minidump_writer.h @@ -48,7 +48,7 @@ @@ -105,17 +87,6 @@ #if defined(__mips__) // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the ---- ./net/dns/dns_config_service_posix.cc.orig -+++ ./net/dns/dns_config_service_posix.cc -@@ -116,7 +116,7 @@ - ConfigParsePosixResult ReadDnsConfig(DnsConfig* config) { - ConfigParsePosixResult result; - config->unhandled_options = false; --#if defined(OS_OPENBSD) -+#if defined(OS_OPENBSD) || defined(_GNU_SOURCE) - // Note: res_ninit in glibc always returns 0 and sets RES_INIT. - // res_init behaves the same way. - memset(&_res, 0, sizeof(_res)); --- ./third_party/ffmpeg/libavutil/cpu.c.orig +++ ./third_party/ffmpeg/libavutil/cpu.c @@ -38,7 +38,6 @@ @@ -126,39 +97,21 @@ #endif #if HAVE_UNISTD_H #include ---- ./third_party/WebKit/Source/wtf/StackUtil.cpp.orig -+++ ./third_party/WebKit/Source/wtf/StackUtil.cpp -@@ -28,7 +28,7 @@ - // FIXME: On Mac OSX and Linux, this method cannot estimate stack size - // correctly for the main thread. - --#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) -+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) - // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of webkit_unit_tests). - // If so, a conservative size estimate is returned. -@@ -95,7 +95,7 @@ - } - - void* getStackStart() { --#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) -+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) - pthread_attr_t attr; - int error; - #if OS(FREEBSD) ---- ./chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig -+++ ./chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -40,7 +40,7 @@ - #include "chrome/browser/metrics/tab_usage_recorder.h" - #endif // !defined(OS_ANDROID) +diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc ++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +@@ -39,7 +39,9 @@ + #endif // defined(OS_ANDROID) && defined(__arm__) --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if defined(__GLIBC__) && !defined(OS_CHROMEOS) + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if defined(__GLIBC__) #include ++#endif - #include "base/version.h" -@@ -173,7 +173,7 @@ - } + #include "base/linux_util.h" + #include "base/strings/string_split.h" +@@ -295,7 +297,7 @@ void RecordLinuxDistro() { + #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) void RecordLinuxGlibcVersion() { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) @@ -166,24 +119,6 @@ base::Version version(gnu_get_libc_version()); UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; -@@ -197,7 +197,7 @@ - #endif - } - --#if defined(USE_X11) && !defined(OS_CHROMEOS) -+#if defined(__GLIBC__) && defined(USE_X11) && !defined(OS_CHROMEOS) - UMALinuxWindowManager GetLinuxWindowManager() { - switch (ui::GuessWindowManager()) { - case ui::WM_UNKNOWN: -@@ -330,7 +330,7 @@ - - void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() { - RecordLinuxGlibcVersion(); --#if defined(USE_X11) && !defined(OS_CHROMEOS) -+#if defined(__GLIBC__) && defined(USE_X11) && !defined(OS_CHROMEOS) - UMA_HISTOGRAM_ENUMERATION("Linux.WindowManager", - GetLinuxWindowManager(), - UMA_LINUX_WINDOW_MANAGER_COUNT); --- ./device/serial/serial_io_handler_posix.cc.orig +++ ./device/serial/serial_io_handler_posix.cc @@ -6,6 +6,7 @@ @@ -194,19 +129,7 @@ #include "base/posix/eintr_wrapper.h" ---- ./base/logging.cc.orig -+++ ./base/logging.cc -@@ -494,7 +494,7 @@ - } - - LogMessage::~LogMessage() { --#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) -+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) - if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { - // Include a stack trace on a fatal, unless a debugger is attached. - base::debug::StackTrace trace; diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h -index a80ea16..55a2abf 100644 --- third_party/ots/include/opentype-sanitiser.h +++ third_party/ots/include/opentype-sanitiser.h @@ -20,6 +20,7 @@ typedef unsigned __int64 uint64_t; @@ -217,3 +140,59 @@ index a80ea16..55a2abf 100644 #include #include #endif +--- ./base/logging.cc.orig ++++ ./base/logging.cc +@@ -545,8 +545,7 @@ + + LogMessage::~LogMessage() { + size_t stack_start = stream_.tellp(); +-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \ +- !defined(OS_AIX) ++#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) + if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { + // Include a stack trace on a fatal, unless a debugger is attached. + base::debug::StackTrace trace; +--- ./third_party/WebKit/Source/platform/wtf/StackUtil.cpp.orig ++++ ./third_party/WebKit/Source/platform/wtf/StackUtil.cpp +@@ -28,7 +28,7 @@ + // FIXME: On Mac OSX and Linux, this method cannot estimate stack size + // correctly for the main thread. + +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) + // pthread_getattr_np() can fail if the thread is not invoked by + // pthread_create() (e.g., the main thread of webkit_unit_tests). +@@ -96,7 +96,7 @@ + } + + void* GetStackStart() { +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) + pthread_attr_t attr; + int error; +--- ./net/dns/dns_config_service_posix.cc.orig ++++ ./net/dns/dns_config_service_posix.cc +@@ -122,7 +122,7 @@ + ConfigParsePosixResult result; + config->unhandled_options = false; + // TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia. +-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) ++#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE) + // Note: res_ninit in glibc always returns 0 and sets RES_INIT. + // res_init behaves the same way. + memset(&_res, 0, sizeof(_res)); +--- base/native_library_posix.cc.orig 2016-11-17 01:45:50.032002326 +0100 ++++ base/native_library_posix.cc 2016-11-17 01:46:23.729001549 +0100 +@@ -12,6 +12,10 @@ + #include "base/strings/utf_string_conversions.h" + #include "base/threading/thread_restrictions.h" + ++#ifndef RTLD_DEEPBIND ++#define RTLD_DEEPBIND 0 ++#endif ++ + namespace base { + + std::string NativeLibraryLoadError::ToString() const { diff --git a/srcpkgs/chromium/files/musl-patches/musl-hacks.patch b/srcpkgs/chromium/files/musl-patches/musl-hacks.patch index 91706ef2efb..790d1739933 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-hacks.patch +++ b/srcpkgs/chromium/files/musl-patches/musl-hacks.patch @@ -1,11 +1,11 @@ --- ./base/debug/stack_trace.cc.orig +++ ./base/debug/stack_trace.cc -@@ -33,7 +33,7 @@ +@@ -214,7 +214,7 @@ std::string StackTrace::ToString() const { std::stringstream stream; --#if !defined(__UCLIBC__) -+#if defined(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) OutputToStream(&stream); #endif return stream.str(); diff --git a/srcpkgs/chromium/files/musl-patches/musl-libc++.patch b/srcpkgs/chromium/files/musl-patches/musl-libc++.patch new file mode 100644 index 00000000000..7f179331d0a --- /dev/null +++ b/srcpkgs/chromium/files/musl-patches/musl-libc++.patch @@ -0,0 +1,68 @@ +diff --git a/buildtools/third_party/libc++/trunk/include/locale b/buildtools/third_party/libc++/trunk/include/locale +index d29a2dc..53998bc 100644 +--- buildtools/third_party/libc++/trunk/include/locale ++++ buildtools/third_party/libc++/trunk/include/locale +@@ -11,6 +11,15 @@ + #ifndef _LIBCPP_LOCALE + #define _LIBCPP_LOCALE + ++// musl doesn't define _l (with locale) variants of functions, as it only supports UTF-8. ++// we can simply make macros that will call the non-localated ones if we're using musl, or rather not-using something that has the _l ones. ++// couldn't find anything glibc #defines when it creates strtoull_l (that it doesn't undefine a few lines later), so let's test against glibc and glibc-likes. ++// almost all glibc-likes define __GNU_LIBRARY__ for compatibility ++#ifndef __GNU_LIBRARY__ ++#define strtoull_l(A, B, C, LOC) strtoull(A,B,C) ++#define strtoll_l(A, B, C, LOC) strtoll(A,B,C) ++#endif ++ + /* + locale synopsis + +diff --git a/buildtools/third_party/libc++/trunk/src/locale.cpp b/buildtools/third_party/libc++/trunk/src/locale.cpp +index 4163c2c..3d1902a 100644 +--- a/buildtools/third_party/libc++/trunk/src/locale.cpp ++++ buildtools/third_party/libc++/trunk/src/locale.cpp +@@ -1028,11 +1028,11 @@ ctype::do_narrow(const char_type* low, const char_type* high, char dfault, + return low; + } + +-#if defined(__EMSCRIPTEN__) ++//#if defined(__EMSCRIPTEN__) + extern "C" const unsigned short ** __ctype_b_loc(); + extern "C" const int ** __ctype_tolower_loc(); + extern "C" const int ** __ctype_toupper_loc(); +-#endif ++//#endif + + #ifdef _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE + const ctype::mask* +@@ -1136,12 +1136,10 @@ ctype::classic_table() _NOEXCEPT + #elif defined(_AIX) + return (const unsigned int *)__lc_ctype_ptr->obj->mask; + #else +- // Platform not supported: abort so the person doing the port knows what to +- // fix +-# warning ctype::classic_table() is not implemented +- printf("ctype::classic_table() is not implemented\n"); +- abort(); +- return NULL; ++// not sure any other libc like this exists, but there is no way to differentiate musl as of right now ++// to be fair, with the change above, this should always work ++// also, #warning is a gcc extension ++ return (const unsigned long *)*__ctype_b_loc(); + #endif + } + #endif +diff --git a/buildtools/third_party/libc++/trunk/src/system_error.cpp b/buildtools/third_party/libc++/trunk/src/system_error.cpp +index cbbbb5d..8761e65 100644 +--- buildtools/third_party/libc++/trunk/src/system_error.cpp ++++ buildtools/third_party/libc++/trunk/src/system_error.cpp +@@ -73,7 +73,7 @@ string do_strerror_r(int ev) { + std::snprintf(buffer, strerror_buff_size, "unknown error %d", ev); + return string(buffer); + } +-#elif defined(__linux__) && !defined(_LIBCPP_HAS_MUSL_LIBC) && \ ++#elif defined(__GLIBC__) && !defined(_LIBCPP_HAS_MUSL_LIBC) && \ + (!defined(__ANDROID__) || __ANDROID_API__ >= 23) + // GNU Extended version + string do_strerror_r(int ev) { diff --git a/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch b/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch index 4414670cbaf..5c4674f3c02 100644 --- a/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch +++ b/srcpkgs/chromium/files/musl-patches/musl-sandbox.patch @@ -48,3 +48,23 @@ case __NR_msync: case __NR_munlockall: case __NR_readahead: +diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +index 80f02c0..21fbe21 100644 +--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -373,6 +373,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) + case __NR_waitpid: + #endif ++ case __NR_set_tid_address: + return true; + case __NR_clone: // Should be parameter-restricted. + case __NR_setns: // Privileged. +@@ -385,7 +386,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) + case __NR_set_thread_area: + #endif +- case __NR_set_tid_address: + case __NR_unshare: + #if !defined(__mips__) && !defined(__aarch64__) + case __NR_vfork: diff --git a/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch b/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch new file mode 100644 index 00000000000..e95e94814e7 --- /dev/null +++ b/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch @@ -0,0 +1,43 @@ +--- content/child/content_child_helpers.cc.orig ++++ content/child/content_child_helpers.cc +@@ -24,7 +24,7 @@ namespace content { + // though, this provides only a partial and misleading value. + // Unfortunately some telemetry benchmark rely on it and these need to + // be refactored before getting rid of this. See crbug.com/581365 . +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) && defined(__GLIBC__) || defined(OS_ANDROID) + size_t GetMemoryUsageKB() { + struct mallinfo minfo = mallinfo(); + uint64_t mem_usage = +--- base/trace_event/malloc_dump_provider.cc.orig ++++ base/trace_event/malloc_dump_provider.cc +@@ -243,7 +243,7 @@ + allocated_objects_count = main_heap_info.block_count; + #elif defined(OS_FUCHSIA) + // TODO(fuchsia): Port, see https://crbug.com/706592. +-#else ++#elif defined(__GLIBC__) + struct mallinfo info = mallinfo(); + DCHECK_GE(info.arena + info.hblkhd, info.uordblks); + +diff --git a/base/process/process_metrics_posix.cc b/base/process/process_metrics_posix.cc +index 0eb5c1f..8af7799 100644 +--- base/process/process_metrics_posix.cc ++++ base/process/process_metrics_posix.cc +@@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() { + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if defined(USE_TCMALLOC) + return minfo.uordblks; + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif diff --git a/srcpkgs/chromium/files/musl-patches/resolver.patch b/srcpkgs/chromium/files/musl-patches/resolver.patch index 7e2a0a4723c..bde36ce1a50 100644 --- a/srcpkgs/chromium/files/musl-patches/resolver.patch +++ b/srcpkgs/chromium/files/musl-patches/resolver.patch @@ -1,27 +1,15 @@ --- ./net/dns/host_resolver_impl.cc.orig +++ ./net/dns/host_resolver_impl.cc -@@ -1881,8 +1881,7 @@ - #endif +@@ -2039,8 +2039,7 @@ NetworkChangeNotifier::AddIPAddressObserver(this); + NetworkChangeNotifier::AddConnectionTypeObserver(this); NetworkChangeNotifier::AddDNSObserver(this); -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -- !defined(OS_ANDROID) -+#if defined(__GLIBC__) +- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) ++#if defined(__GLIBC__) EnsureDnsReloaderInit(); #endif ---- ./net/dns/host_resolver_proc.cc.orig -+++ ./net/dns/host_resolver_proc.cc -@@ -193,8 +193,7 @@ - // Restrict result set to only this socket type to avoid duplicates. - hints.ai_socktype = SOCK_STREAM; - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -- !defined(OS_ANDROID) -+#if defined(__GLIBC__) - DnsReloaderMaybeReload(); - #endif - int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); --- ./net/dns/dns_reloader.cc.orig +++ ./net/dns/dns_reloader.cc @@ -4,8 +4,7 @@ @@ -29,8 +17,20 @@ #include "net/dns/dns_reloader.h" -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -- !defined(OS_ANDROID) +- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +#if defined(__GLIBC__) #include +--- ./net/dns/host_resolver_proc.cc.orig ++++ ./net/dns/host_resolver_proc.cc +@@ -190,8 +190,7 @@ + // Restrict result set to only this socket type to avoid duplicates. + hints.ai_socktype = SOCK_STREAM; + +-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) ++#if defined(__GLIBC__) + DnsReloaderMaybeReload(); + #endif + int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); diff --git a/srcpkgs/chromium/patches/chromium-atk-r1.patch b/srcpkgs/chromium/patches/chromium-atk-r1.patch new file mode 100644 index 00000000000..aca4e9a805c --- /dev/null +++ b/srcpkgs/chromium/patches/chromium-atk-r1.patch @@ -0,0 +1,11 @@ +--- content/browser/accessibility/browser_accessibility_auralinux.cc.orig 2017-07-27 06:28:01.090257874 +0000 ++++ content/browser/accessibility/browser_accessibility_auralinux.cc 2017-07-27 06:28:21.174653680 +0000 +@@ -571,7 +571,7 @@ + // it's best to leave this out rather than break people's builds: + #if defined(ATK_CHECK_VERSION) + #if ATK_CHECK_VERSION(2, 16, 0) +- atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY); ++ atk_state_set_add_state(state_set, ATK_STATE_READ_ONLY); + #endif + #endif + break; diff --git a/srcpkgs/chromium/patches/chromium-gcc-r1.patch b/srcpkgs/chromium/patches/chromium-gcc-r1.patch new file mode 100644 index 00000000000..6979b114514 --- /dev/null +++ b/srcpkgs/chromium/patches/chromium-gcc-r1.patch @@ -0,0 +1,14 @@ +diff --git a/base/numerics/safe_math_shared_impl.h b/base/numerics/safe_math_shared_impl.h +index 99f230ce7e9a..de2415d402f5 100644 +--- base/numerics/safe_math_shared_impl.h ++++ base/numerics/safe_math_shared_impl.h +@@ -21,8 +21,7 @@ + #if !defined(__native_client__) && \ + ((defined(__clang__) && \ + ((__clang_major__ > 3) || \ +- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \ +- (defined(__GNUC__) && __GNUC__ >= 5)) ++ (__clang_major__ == 3 && __clang_minor__ >= 4)))) + #include "base/numerics/safe_math_clang_gcc_impl.h" + #define BASE_HAS_OPTIMIZED_SAFE_MATH (1) + #else diff --git a/srcpkgs/chromium/patches/chromium-gn-bootstrap-r14.patch b/srcpkgs/chromium/patches/chromium-gn-bootstrap-r14.patch new file mode 100644 index 00000000000..f50c29f0ff5 --- /dev/null +++ b/srcpkgs/chromium/patches/chromium-gn-bootstrap-r14.patch @@ -0,0 +1,27 @@ +commit 96c271f8ab2be7ea4199078ea65ac50c6ada4685 +Author: Pawel Hajdan, Jr +Date: Wed Jul 26 21:51:54 2017 +0000 + + wip + +diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py +index 1390560f8e37..ff2ae57c46b0 100755 +--- tools/gn/bootstrap/bootstrap.py ++++ tools/gn/bootstrap/bootstrap.py +@@ -449,6 +449,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/metrics/histogram_base.cc', + 'base/metrics/histogram_functions.cc', + 'base/metrics/histogram_samples.cc', ++ 'base/metrics/histogram_snapshot_manager.cc', + 'base/metrics/metrics_hashes.cc', + 'base/metrics/persistent_histogram_allocator.cc', + 'base/metrics/persistent_memory_allocator.cc', +@@ -534,7 +535,7 @@ def write_gn_ninja(path, root_gen_dir, options): + 'base/trace_event/heap_profiler_allocation_context_tracker.cc', + 'base/trace_event/heap_profiler_allocation_register.cc', + 'base/trace_event/heap_profiler_event_filter.cc', +- 'base/trace_event/heap_profiler_event_writer.cc', ++ 'base/trace_event/heap_profiler_heap_dump_writer.cc', + 'base/trace_event/heap_profiler_serialization_state.cc', + 'base/trace_event/heap_profiler_stack_frame_deduplicator.cc', + 'base/trace_event/heap_profiler_type_name_deduplicator.cc', diff --git a/srcpkgs/chromium/patches/fix-gn_bootstrap.patch b/srcpkgs/chromium/patches/fix-gn_bootstrap.patch deleted file mode 100644 index aa697295c8d..00000000000 --- a/srcpkgs/chromium/patches/fix-gn_bootstrap.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- tools/gn/bootstrap/bootstrap.py.orig -+++ tools/gn/bootstrap/bootstrap.py -@@ -383,6 +383,7 @@ - 'base/base_switches.cc', - 'base/build_time.cc', - 'base/callback_internal.cc', -+ 'base/callback_helpers.cc', - 'base/command_line.cc', - 'base/debug/activity_tracker.cc', - 'base/debug/alias.cc', diff --git a/srcpkgs/chromium/patches/gn_bootstrap.patch b/srcpkgs/chromium/patches/gn_bootstrap.patch index 662a67f35ff..ada0e1d9cd8 100644 --- a/srcpkgs/chromium/patches/gn_bootstrap.patch +++ b/srcpkgs/chromium/patches/gn_bootstrap.patch @@ -1,15 +1,15 @@ ---- tools/gn/bootstrap/bootstrap.py.orig 2016-11-17 00:15:29.112867732 +0100 -+++ tools/gn/bootstrap/bootstrap.py 2016-11-17 00:43:54.712718406 +0100 -@@ -159,7 +159,7 @@ +--- tools/gn/bootstrap/bootstrap.py.orig 2017-07-27 13:55:19.732276359 +0000 ++++ tools/gn/bootstrap/bootstrap.py 2017-07-27 13:59:19.903262044 +0000 +@@ -167,7 +167,7 @@ mkdir_p(root_gen_dir) - + write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.h', -- {'USE_EXPERIMENTAL_ALLOCATOR_SHIM': 'true' if is_linux else 'false'}) -+ {'USE_EXPERIMENTAL_ALLOCATOR_SHIM': 'false'}) - +- {'USE_ALLOCATOR_SHIM': 'true' if is_linux else 'false'}) ++ {'USE_ALLOCATOR_SHIM': 'false' }) + write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h', - {'ENABLE_PROFILING': 'false'}) -@@ -366,8 +366,6 @@ + { +@@ -396,8 +396,6 @@ 'base/third_party/superfasthash/superfasthash.c', ]) static_libraries['base']['sources'].extend([ @@ -18,8 +18,8 @@ 'base/at_exit.cc', 'base/base_paths.cc', 'base/base_switches.cc', -@@ -541,29 +539,9 @@ - 'base/time/time_posix.cc', +@@ -607,26 +605,6 @@ + 'base/time/time_now_posix.cc', 'base/trace_event/heap_profiler_allocation_register_posix.cc', ]) - static_libraries['libevent'] = { @@ -42,35 +42,28 @@ - 'include_dirs': [], - 'cflags': cflags + ['-DHAVE_CONFIG_H'], - } - - if is_linux: -- libs.extend(['-lrt', '-latomic']) -+ libs.extend(['-lrt', '-levent']) + + if is_linux or is_aix: ldflags.extend(['-pthread']) - - static_libraries['xdg_user_dirs'] = { -@@ -573,8 +551,6 @@ - 'tool': 'cxx', - } - static_libraries['base']['sources'].extend([ +@@ -654,17 +632,7 @@ + 'base/threading/platform_thread_linux.cc', + ]) + if is_linux: +- static_libraries['base']['sources'].extend([ - 'base/allocator/allocator_shim.cc', - 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', - 'base/memory/shared_memory_posix.cc', - 'base/nix/xdg_util.cc', - 'base/process/internal_linux.cc', -@@ -587,12 +563,6 @@ - 'base/threading/platform_thread_linux.cc', - 'base/trace_event/malloc_dump_provider.cc', - ]) -- static_libraries['libevent']['include_dirs'].extend([ -- os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') -- ]) -- static_libraries['libevent']['sources'].extend([ -- 'base/third_party/libevent/epoll.c', -- ]) - - - if is_mac: +- ]) +- libs.extend(['-lrt', '-latomic']) +- static_libraries['libevent']['include_dirs'].extend([ +- os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') +- ]) +- static_libraries['libevent']['sources'].extend([ +- 'base/third_party/libevent/epoll.c', +- ]) ++ libs.extend(['-lrt', '-levent']) + else: + libs.extend(['-lrt']) + static_libraries['base']['sources'].extend([ --- base/message_loop/message_pump_libevent.cc.orig 2016-11-17 01:07:57.633819544 +0100 +++ base/message_loop/message_pump_libevent.cc 2016-11-17 01:08:38.985851678 +0100 @@ -14,7 +14,7 @@ @@ -82,16 +75,3 @@ #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" ---- base/native_library_posix.cc.orig 2016-11-17 01:45:50.032002326 +0100 -+++ base/native_library_posix.cc 2016-11-17 01:46:23.729001549 +0100 -@@ -12,6 +12,10 @@ - #include "base/strings/utf_string_conversions.h" - #include "base/threading/thread_restrictions.h" - -+#ifndef RTLD_DEEPBIND -+#define RTLD_DEEPBIND 0 -+#endif -+ - namespace base { - - std::string NativeLibraryLoadError::ToString() const { diff --git a/srcpkgs/chromium/patches/libc_malloc.patch b/srcpkgs/chromium/patches/libc_malloc.patch new file mode 100644 index 00000000000..c25c79486f0 --- /dev/null +++ b/srcpkgs/chromium/patches/libc_malloc.patch @@ -0,0 +1,26 @@ +--- base/process/memory_linux.cc.orig 2017-09-15 08:41:43.000000000 +0000 ++++ base/process/memory_linux.cc 2017-09-15 08:44:39.804995469 +0000 +@@ -21,6 +21,12 @@ + #include "third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h" + #endif + ++#if defined(LIBC_GLIBC) ++extern "C" { ++extern void *__libc_malloc(size_t size); ++} ++#endif ++ + namespace base { + + size_t g_oom_size = 0U; +--- base/process/memory_linux.cc.orig 2017-09-15 08:46:55.000000000 +0000 ++++ base/process/memory_linux.cc 2017-09-15 08:51:34.422016858 +0000 +@@ -107,7 +107,7 @@ + (!defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)) + *result = malloc(size); + #elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC) +- *result = __libc_malloc(size); ++ *result = ::__libc_malloc(size); + #elif defined(USE_TCMALLOC) + *result = tc_malloc_skip_new_handler(size); + #endif diff --git a/srcpkgs/chromium/patches/no-execinfo.patch b/srcpkgs/chromium/patches/no-execinfo.patch index e3899052dda..c7d3dfe1963 100644 --- a/srcpkgs/chromium/patches/no-execinfo.patch +++ b/srcpkgs/chromium/patches/no-execinfo.patch @@ -1,11 +1,11 @@ ---- base/debug/stack_trace_posix.cc.orig -+++ base/debug/stack_trace_posix.cc +--- base/debug/stack_trace_posix.cc.orig 2017-07-27 14:05:05.534241443 +0000 ++++ base/debug/stack_trace_posix.cc 2017-07-27 14:07:54.669231362 +0000 @@ -26,7 +26,7 @@ #if !defined(USE_SYMBOLIZE) #include #endif --#if !defined(__UCLIBC__) -+#if defined(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) #include #endif @@ -13,100 +13,71 @@ // Note: code in this function is NOT async-signal safe (std::string uses // malloc internally). --#if !defined(__UCLIBC__) -+#if defined(__GLIBC__) - +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) std::string::size_type search_from = 0; while (search_from < text->size()) { -@@ -116,7 +116,7 @@ + // Look for the start of a mangled symbol, from search_from. +@@ -115,7 +115,7 @@ search_from = mangled_start + 2; } } --#endif // !defined(__UCLIBC__) -+#endif // defined(__GLIBC__) +-#endif // !defined(__UCLIBC__) && !defined(_AIX) ++#endif // defined(__GLIBC__) && !defined(_AIX) } #endif // !defined(USE_SYMBOLIZE) -@@ -128,7 +128,7 @@ +@@ -127,7 +127,7 @@ virtual ~BacktraceOutputHandler() {} }; --#if !defined(__UCLIBC__) -+#if defined(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) 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. -@@ -205,7 +205,7 @@ +@@ -204,7 +204,7 @@ } #endif // defined(USE_SYMBOLIZE) } --#endif // !defined(__UCLIBC__) -+#endif // defined(__GLIBC__) +-#endif // !defined(__UCLIBC__) && !defined(_AIX) ++#endif // defined(__GLIBC__) && !defined(_AIX) void PrintToStderr(const char* output) { // NOTE: This code MUST be async-signal safe (it's used by in-process -@@ -722,7 +722,7 @@ +@@ -721,7 +721,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(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) count = std::min(arraysize(trace_), count); // Though the backtrace API man page does not list any possible negative -@@ -737,13 +737,13 @@ +@@ -736,13 +736,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(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) PrintBacktraceOutputHandler handler; ProcessBacktrace(trace_, count_, &handler); #endif } --#if !defined(__UCLIBC__) -+#if defined(__GLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) void StackTrace::OutputToStream(std::ostream* os) const { StreamBacktraceOutputHandler handler(os); ProcessBacktrace(trace_, count_, &handler); ---- third_party/WebKit/Source/wtf/Assertions.cpp.orig 2016-12-02 00:02:32.000000000 +0100 -+++ third_party/WebKit/Source/wtf/Assertions.cpp 2016-12-06 10:58:11.183147846 +0100 -@@ -60,7 +60,7 @@ +--- third_party/WebKit/Source/platform/wtf/Assertions.cpp.orig 2017-09-11 12:27:06.948854813 +0000 ++++ third_party/WebKit/Source/platform/wtf/Assertions.cpp 2017-09-11 12:29:34.639862433 +0000 +@@ -56,7 +56,7 @@ #include #endif --#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__)) -+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__)) +-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__)) ++#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__)) #include #include #include -@@ -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(__GLIBC__)) - Dl_info info; - if (!dladdr(addr, &info) || !info.dli_sname) - return; ---- third_party/webrtc/base/checks.cc.orig 2016-05-08 08:03:04.398461275 +0200 -+++ third_party/webrtc/base/checks.cc 2016-05-08 08:03:24.254431362 +0200 -@@ -16,7 +16,7 @@ - #include - #include - --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) -+#if defined(__GLIBCXX__) && defined(__GLIBC__) - #include - #include - #endif -@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) - // 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(__GLIBC__) - void* trace[100]; - int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); - char** symbols = backtrace_symbols(trace, size); diff --git a/srcpkgs/chromium/patches/no-mallinfo.patch b/srcpkgs/chromium/patches/no-mallinfo.patch deleted file mode 100644 index 306c64b622a..00000000000 --- a/srcpkgs/chromium/patches/no-mallinfo.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- base/trace_event/malloc_dump_provider.cc.orig -+++ base/trace_event/malloc_dump_provider.cc -@@ -187,7 +187,7 @@ - resident_size = main_heap_info.committed_size; - allocated_objects_size = main_heap_info.allocated_size; - allocated_objects_count = main_heap_info.block_count; --#else -+#elif defined(OS_LINUX) && defined(__GLIBC__) - struct mallinfo info = mallinfo(); - DCHECK_GE(info.arena + info.hblkhd, info.uordblks); - ---- content/child/content_child_helpers.cc.orig -+++ content/child/content_child_helpers.cc -@@ -24,7 +24,7 @@ namespace content { - // though, this provides only a partial and misleading value. - // Unfortunately some telemetry benchmark rely on it and these need to - // be refactored before getting rid of this. See crbug.com/581365 . --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) && defined(__GLIBC__) || defined(OS_ANDROID) - size_t GetMemoryUsageKB() { - struct mallinfo minfo = mallinfo(); - uint64_t mem_usage = ---- content/renderer/render_thread_impl.cc.orig -+++ content/renderer/render_thread_impl.cc -@@ -1712,6 +1712,49 @@ - } - - } // namespace -+#elif defined(OS_LINUX) && !defined(__GLIBC__) -+namespace { -+ -+static size_t GetMallocUsage() { -+ char *line=NULL; -+ size_t n,usage=0; -+ FILE *f = fopen("/proc/self/maps", "r"); -+ char *path, *perm; -+ if (f == NULL) { -+ perror("/proc/self/maps"); -+ return 0; -+ } -+ path = (char *)malloc(PATH_MAX+16); -+ if (path == NULL) -+ goto out; -+ perm = path + PATH_MAX; -+ -+ while (getline(&line, &n, f) >=0) { -+ size_t start,end,offset,inode; -+ int devmaj, devmin, items; -+ -+ items = sscanf(line, "%zx-%zx %s %zx %x:%x %zu %s", -+ &start, &end, perm, &offset, -+ &devmaj, &devmin, &inode, path); -+ -+ if (items < 7) -+ continue; -+ -+ if (items < 8) -+ path[0] = '\0'; -+ -+ if ((strcmp(perm, "rw-p") == 0 && devmaj+devmin == 0) -+ && (path[0] == '\0' || strcmp(path, "[heap]") == 0)) -+ usage += end-start; -+ } -+ free(line); -+ free(path); -+out: -+ fclose(f); -+ return usage; -+} -+ -+} // namespace - #endif - - void RenderThreadImpl::GetRendererMemoryMetrics( -@@ -1722,7 +1765,7 @@ - memory_metrics->partition_alloc_kb = - blink_stats.partitionAllocTotalAllocatedBytes / 1024; - memory_metrics->blink_gc_kb = blink_stats.blinkGCTotalAllocatedBytes / 1024; --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if defined(USE_TCMALLOC) - size_t malloc_usage = minfo.uordblks; diff --git a/srcpkgs/chromium/patches/no-secure_getenv.patch b/srcpkgs/chromium/patches/no-secure_getenv.patch new file mode 100644 index 00000000000..6871deb14bf --- /dev/null +++ b/srcpkgs/chromium/patches/no-secure_getenv.patch @@ -0,0 +1,16 @@ +misdetected on musl... + +--- third_party/vulkan-validation-layers/src/loader/loader.c.orig 2017-07-25 19:06:31.000000000 +0000 ++++ third_party/vulkan-validation-layers/src/loader/loader.c 2017-07-27 16:20:54.721755713 +0000 +@@ -214,9 +214,9 @@ + // the inst pointer to get rid of compiler warnings. + (void)inst; + +-#ifdef HAVE_SECURE_GETENV ++#if defined(HAVE_SECURE_GETENV) && defined(__GLIBC__) + return secure_getenv(name); +-#elif defined(HAVE___SECURE_GETENV) ++#elif defined(HAVE___SECURE_GETENV) && defined(__GLIBC__) + return __secure_getenv(name); + #else + #pragma message("Warning: Falling back to non-secure getenv for environmental lookups! Consider" \ diff --git a/srcpkgs/chromium/patches/set-clash.patch b/srcpkgs/chromium/patches/set-clash.patch new file mode 100644 index 00000000000..8cca5380ad0 --- /dev/null +++ b/srcpkgs/chromium/patches/set-clash.patch @@ -0,0 +1,29 @@ +--- chrome/browser/devtools/devtools_file_system_indexer.cc.orig 2017-09-15 11:30:41.000000000 +0000 ++++ chrome/browser/devtools/devtools_file_system_indexer.cc 2017-09-15 11:31:27.807511773 +0000 +@@ -34,7 +34,7 @@ + using base::TimeTicks; + using content::BrowserThread; + using std::map; +-using std::set; ++//using std::set; + using std::string; + using std::vector; + +@@ -191,7 +191,7 @@ + if (trigram != kUndefinedTrigram) + trigrams.push_back(trigram); + } +- set file_ids; ++ std::set file_ids; + bool first = true; + vector::const_iterator it = trigrams.begin(); + for (; it != trigrams.end(); ++it) { +@@ -203,7 +203,7 @@ + first = false; + continue; + } +- set intersection = base::STLSetIntersection >( ++ std::set intersection = base::STLSetIntersection >( + file_ids, index_[trigram]); + file_ids.swap(intersection); + } diff --git a/srcpkgs/chromium/patches/swiftshader.patch b/srcpkgs/chromium/patches/swiftshader.patch new file mode 100644 index 00000000000..0a129625424 --- /dev/null +++ b/srcpkgs/chromium/patches/swiftshader.patch @@ -0,0 +1,86 @@ +diff --git a/third_party/swiftshader/src/Common/Socket.cpp b/third_party/swiftshader/src/Common/Socket.cpp +index a19f574..3e6655d 100644 +--- third_party/swiftshader/src/Common/Socket.cpp ++++ swiftshader/src/Common/Socket.cpp +@@ -17,6 +17,7 @@ + #if defined(_WIN32) + #include + #else ++ #include + #include + #include + #include +diff --git a/third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h b/third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h +index 509bc26..6522713 100644 +--- third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h ++++ swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h +@@ -125,7 +125,7 @@ + #define HAVE_ERROR_T 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_EXECINFO_H 1 ++/* #undef HAVE_EXECINFO_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_FCNTL_H 1 +@@ -240,10 +240,10 @@ + /* #undef HAVE_MACH_O_DYLD_H */ + + /* Define if mallinfo() is available on this platform. */ +-#define HAVE_MALLINFO 1 ++/* #undef HAVE_MALLINFO */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_MALLOC_H 1 ++/* #undef HAVE_MALLOC_H */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_MALLOC_MALLOC_H */ +diff --git a/third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp b/third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp +index bd68083..f703e13 100644 +--- third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp ++++ swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp +@@ -160,7 +160,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) { + // On linux we have a weird situation. The stderr/out/in symbols are both + // macros and global variables because of standards requirements. So, we + // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first. +-#if defined(__linux__) && !defined(__ANDROID__) ++#if defined(__GLIBC__) + { + EXPLICIT_SYMBOL(stderr); + EXPLICIT_SYMBOL(stdout); +diff --git 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 +index e14edbd..8d7e41e 100644 +--- third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h ++++ swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h +@@ -14,7 +14,7 @@ + #define ENABLE_CRASH_OVERRIDES 1 + + /* Define to 1 if you have the `backtrace' function. */ +-#define HAVE_BACKTRACE 1 ++/* #undef HAVE_BACKTRACE */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_CRASHREPORTERCLIENT_H */ +@@ -55,7 +55,7 @@ + #define HAVE_ERRNO_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_EXECINFO_H 1 ++/* #undef HAVE_EXECINFO_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_FCNTL_H 1 +@@ -130,10 +130,10 @@ + /* #undef HAVE_MALLCTL */ + + /* Define to 1 if you have the `mallinfo' function. */ +-#define HAVE_MALLINFO 1 ++/* #undef HAVE_MALLINFO */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_MALLOC_H 1 ++/* #undef HAVE_MALLOC_H */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_MALLOC_MALLOC_H */ diff --git a/srcpkgs/chromium/patches/xlocale.patch b/srcpkgs/chromium/patches/xlocale.patch new file mode 100644 index 00000000000..4d32a9e525d --- /dev/null +++ b/srcpkgs/chromium/patches/xlocale.patch @@ -0,0 +1,11 @@ +--- buildtools/third_party/libc++/trunk/include/__locale.orig 2017-09-14 19:06:26.000000000 +0000 ++++ buildtools/third_party/libc++/trunk/include/__locale 2017-09-15 08:58:37.520038686 +0000 +@@ -34,7 +34,7 @@ + # include + #elif defined(_NEWLIB_VERSION) + # include +-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ ++#elif (defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) + # include + #elif defined(__Fuchsia__) diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 546c59eaa90..ea39be393ab 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,14 +1,14 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=58.0.3029.110 +version=61.0.3163.91 revision=1 short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Juan RP " homepage="http://www.chromium.org/" license="BSD" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=f24cef3dd2acf9dd5ccdeeca47fea42d1c1ddff32b7375dc9e0cd35a4e8d78ff +checksum=0a2b4423551217d3ada244730fdfe3454f2630c8551b0bb784b727dc8294f2aa only_for_archs="i686 x86_64 x86_64-musl" lib32disabled=yes @@ -23,7 +23,7 @@ hostmakedepends="yasm python pkg-config perl gperf bison ninja nodejs hwids makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel - libXScrnSaver-devel alsa-lib-devel snappy-devel + libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel libxml2-devel libxslt-devel pulseaudio-devel nss-devel libexif-devel libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel @@ -38,7 +38,8 @@ post_extract() { case "${XBPS_TARGET_MACHINE}" in *-musl) for f in ${FILESDIR}/musl-patches/*.patch; do - patch -Np0 -i $f + echo "Applying $f" + patch -Np0 -i "$f" done ;; esac @@ -55,8 +56,7 @@ post_extract() { # use system nodejs mkdir -p third_party/node/linux/node-linux-x64/bin - ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node - + ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/node } do_configure() { local system="" bootstrap_conf="" conf="" @@ -125,7 +125,7 @@ do_configure() { use_gconf=false use_sysroot=false use_allocator="none" - use_experimental_allocator_shim=false' + use_allocator_shim=false' # XXX: gold broken with musl case "${XBPS_TARGET_MACHINE}" in @@ -163,9 +163,10 @@ do_configure() { use_gconf=false use_sysroot=false use_allocator="none" - use_experimental_allocator_shim=false + use_allocator_shim=false enable_widevine=true - enable_hangout_services_extension=true' + enable_hangout_services_extension=true + enable_swiftshader=false' # needs clang? # TODO: is this still broken? [ "$CROSS_BUILD" ] && conf+=' enable_webrtc=false'