chromium: add musl patches; use gold for linking (links in 5 seconds).

This commit is contained in:
Juan RP 2016-04-05 19:20:59 +02:00
parent ac30d3d691
commit 45f868756e
4 changed files with 65 additions and 4 deletions

View File

@ -0,0 +1,22 @@
--- ./third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c.orig
+++ ./third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c
@@ -72,7 +72,7 @@
pthread_setname_np(name);
#endif
#if defined(__Userspace_os_Linux)
- pthread_setname_np(pthread_self(), name);
+ //pthread_setname_np(pthread_self(), name);
#endif
#if defined(__Userspace_os_FreeBSD)
pthread_set_name_np(pthread_self(), name);
--- ./base/debug/stack_trace.cc.orig
+++ ./base/debug/stack_trace.cc
@@ -33,7 +33,7 @@
std::string StackTrace::ToString() const {
std::stringstream stream;
-#if !defined(__UCLIBC__)
+#if defined(__GLIBC__)
OutputToStream(&stream);
#endif
return stream.str();

View File

@ -22,3 +22,15 @@
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 @@
#include "net/dns/dns_reloader.h"
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
- !defined(OS_ANDROID)
+#if defined(__GLIBC__)
#include <resolv.h>

View File

@ -1,6 +1,33 @@
--- ./content/child/content_child_helpers.cc.orig
--- ./base/trace_event/malloc_dump_provider.cc.orig
+++ ./base/trace_event/malloc_dump_provider.cc
@@ -61,7 +61,7 @@
// fixed quantum, so the excess region will not be resident.
// See crrev.com/1531463004 for detailed explanation.
resident_size = stats.max_size_in_use;
-#else
+#elif defined(__GLIBC__)
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
@@ -73,6 +73,7 @@
allocated_objects_size = info.uordblks;
#endif
+#if defined(USE_TCMALLOC) || defined(__GLIBC__) || defined(OS_MACOSX) || defined(OS_IOS)
MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
outer_dump->AddScalar("virtual_size", MemoryAllocatorDump::kUnitsBytes,
total_virtual_size);
@@ -95,6 +96,7 @@
MemoryAllocatorDump::kUnitsBytes,
resident_size - allocated_objects_size);
}
+#endif
return true;
}
--- ./content/child/content_child_helpers.cc
+++ ./content/child/content_child_helpers.cc
@@ -15,7 +15,7 @@
@@ -18,7 +18,7 @@
namespace content {

View File

@ -144,8 +144,8 @@ do_configure() {
# TODO: use the file at run time instead of effectively compiling it in.
conf+=" -Dusb_ids_path=/usr/share/hwdata/usb.ids"
# Never use bundled binutils/gold binary. Disable gold linker flags for now.
conf+=" -Dlinux_use_bundled_binutils=0 -Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0"
# Never use bundled binutils/gold binary.
conf+=" -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 -Dlinux_use_gold_flags=1"
# Always support proprietary codecs.
conf+=" -Dproprietary_codecs=1"