Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta-chromium/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ BBFILE_PATTERN_chromium-browser-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_chromium-browser-layer = "7"

LAYERVERSION_chromium-browser-layer = "1"
LAYERSERIES_COMPAT_chromium-browser-layer = "whinlatter"
LAYERSERIES_COMPAT_chromium-browser-layer = "whinlatter wrynose"

LAYERDEPENDS_chromium-browser-layer = "core openembedded-layer"
51 changes: 14 additions & 37 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ SRC_URI += "\
file://0013-Reduce-minimum-browser-window-width-to-480px.patch \
file://0001-Fix-building-gpu_host_impl.cc-on-Linux.patch \
${@ '' if rust_is_newer_than_190(d) else 'file://chromium-142-crabbyavif-rust18x.patch'} \
file://fix-SYS_SECCOMP-redefinition.patch \
"

# ARM/AArch64-specific patches.
Expand All @@ -46,14 +47,12 @@ SRC_URI:append:libc-musl = "\
file://musl/0005-__libc_malloc-is-internal-to-glibc.patch \
file://musl/0006-debug-Fix-build-with-musl.patch \
file://musl/0007-mallopt-is-glibc-specific-API.patch \
file://musl/0008-Use-monotonic-clock-for-pthread_cond_timedwait-with-.patch \
file://musl/0009-Fix-tab-crashes-on-musl.patch \
file://musl/0010-pthread_getname_np.patch \
file://musl/0011-sys-stat.patch \
file://musl/0012-credentials-header.patch \
file://musl/0013-fstatat64.patch \
file://musl/0014-no-res-ninit-nclose.patch \
file://musl/0015-fix-libc-version-include.patch \
"

ANY_OF_DISTRO_FEATURES = "opengl vulkan"
Expand Down Expand Up @@ -197,39 +196,17 @@ GN_ARGS += "use_lld=true use_gold=false"
# file and other utilities are unable to read a 32-bit binary this size, which
# causes it not to be stripped.
# The solution is two-fold:
# 1. Make sure -g is not passed on 32-bit architectures via DEBUG_FLAGS. -g is
# the same as -g2. -g1 generates an 800MB binary, which is a lot more
# manageable.
# 1. Set DEBUG_LEVELFLAG as needed, which is used in both FULL_OPTIMIZATION
# and DEBUG_OPTIMIZATION.
# 2. Explicitly pass symbol_level=0 to GN. This causes -g0 to be passed
# instead, so that if DEBUG_BUILD is not set GN will not create a huge debug
# binary anyway. Since our compiler flags are passed after GN's, -g0 does
# not cause any issues if DEBUG_BUILD is set, as -g1 will be passed later.
DEBUG_FLAGS:remove:arm = "-g"
DEBUG_FLAGS:append:arm = "-g1"
DEBUG_FLAGS:remove:x86 = "-g"
DEBUG_FLAGS:append:x86 = "-g1"
GN_ARGS += "symbol_level=0"

DEBUG_LEVELFLAG = "-g1"
# For ARM builds, completely remove debug flags that cause binary size issues
# This prevents the "output file too large" linker error on ARM32
CFLAGS:remove:arm = "-g"
CXXFLAGS:remove:arm = "-g"
TARGET_CFLAGS:remove:arm = "-g"
TARGET_CXXFLAGS:remove:arm = "-g"

# As of Chromium 62.0.3202.94 and Yocto Rocko (GCC 7, binutils 2.29), passing
# -g to the compiler results in many linker errors on aarch64, such as:
# obj/third_party/WebKit/Source/modules/payments/libpayments.a(PaymentEventDataConversion.o)(.debug_loc+0x4e25): error: relocation overflow in R_AARCH64_ABS32
DEBUG_FLAGS:remove:aarch64 = "-g"
DEBUG_FLAGS:append:aarch64 = "-g1"

# As of Chromium 60.0.3112.101 and Yocto Pyro (GCC 6, binutils 2.28), passing
# -g to the compiler results in many linker errors on x86_64, such as:
# obj/third_party/WebKit/Source/core/loader/libloader.a(ModuleTreeLinker.o)(.debug_loc+0x1e9a5): error: relocation overflow: reference to local symbol 82 in obj/third_party/WebKit/Source/core/loader/libloader.a(ModuleTreeLinker.o)
# obj/third_party/WebKit/Source/core/libcore_generated.a(ScriptModule.o)(.debug_loc+0x253c): error: relocation overflow: reference to local symbol 31 in obj/third_party/WebKit/Source/core/libcore_generated.a(ScriptModule.o)
# so we have to use the same hack described above.
DEBUG_FLAGS:remove:x86-64 = "-g"
DEBUG_FLAGS:append:x86-64 = "-g1"
DEBUG_LEVELFLAG:arm = ""
GN_ARGS += "symbol_level=0"

# Disable Chrome Remote Desktop (aka Chromoting) support. Building host support
# (so that the machine running this recipe can be controlled remotely from
Expand Down Expand Up @@ -491,21 +468,21 @@ do_copy_clang_library () {

lib_file=$(find $(find . -maxdepth 1 \! \( -name latest -o -name '.' \)) \( -name "libclang_rt.builtins-*" -o -name "liborc_rt-*" \))
echo "lib_file = $lib_file"
export ARCH="${TARGET_ARCH}"
export CHROMIUM_TARGET_TRIPLET="$(echo ${RUST_TARGET_SYS} | sed 's:-oe-:-unknown-:')"

mkdir -p "latest/lib/${ARCH}-unknown-linux-gnu"
echo "Executing cp $lib_file latest/lib/${ARCH}-unknown-linux-gnu/"
cp $lib_file "latest/lib/${ARCH}-unknown-linux-gnu/"
cd "latest/lib/${ARCH}-unknown-linux-gnu/" || return
mkdir -p "latest/lib/${CHROMIUM_TARGET_TRIPLET}"
echo "Executing cp $lib_file latest/lib/${CHROMIUM_TARGET_TRIPLET}/"
cp $lib_file "latest/lib/${CHROMIUM_TARGET_TRIPLET}/"
cd "latest/lib/${CHROMIUM_TARGET_TRIPLET}/" || return

for file in *-"${ARCH}".a *-"${ARCH}hf".a; do
for file in *-"${TARGET_ARCH}".a *-"${TARGET_ARCH}hf".a; do
if [ -f "$file" ]; then
new_name=$(echo "$file" | sed -e "s/-${ARCH}hf//" -e "s/-${ARCH}//")
new_name=$(echo "$file" | sed -e "s/-${TARGET_ARCH}hf//" -e "s/-${TARGET_ARCH}//")
mv "$file" "$new_name"
fi
done

native_arch_path="${STAGING_LIBDIR_NATIVE}/clang/latest/lib/${ARCH}-unknown-linux-gnu/"
native_arch_path="${STAGING_LIBDIR_NATIVE}/clang/latest/lib/${CHROMIUM_TARGET_TRIPLET}/"
mkdir -p "$native_arch_path"
echo "Executing cp -r $(ls -d *) $native_arch_path"
cp -r * "$native_arch_path"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Taken from:
https://aur.archlinux.org/cgit/aur.git/tree/0007-qt5-webengine-glibc-2.43-SYS_SECCOMP-as-enum@chromium.patch?h=qt5-webengine

Upstream-Status: Inappropriate [glibc 2.43 fix]
diff --git a/sandbox/linux/system_headers/linux_seccomp.h b/sandbox/linux/system_headers/linux_seccomp.h
index 8690a96eb01b1..8988836508c7b 100644
--- a/sandbox/linux/system_headers/linux_seccomp.h
+++ b/sandbox/linux/system_headers/linux_seccomp.h
@@ -6,6 +6,7 @@
#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_

#include <stdint.h>
+#include <signal.h>
#include <sys/ioctl.h>

#include "build/build_config.h"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ diff --git a/base/process/process_metrics_posix.cc b/base/process/process_metric
index 873a328aa2..5d7d8c11ad 100644
--- a/base/process/process_metrics_posix.cc
+++ b/base/process/process_metrics_posix.cc
@@ -107,7 +107,7 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) {
@@ -108,7 +108,7 @@ void IncreaseFdLimitTo(unsigned int max_

#endif // !BUILDFLAG(IS_FUCHSIA)

Expand All @@ -28,7 +28,7 @@ index 873a328aa2..5d7d8c11ad 100644
namespace {

size_t GetMallocUsageMallinfo() {
@@ -125,7 +125,7 @@ size_t GetMallocUsageMallinfo() {
@@ -126,7 +126,7 @@ size_t GetMallocUsageMallinfo() {
}

} // namespace
Expand All @@ -37,7 +37,7 @@ index 873a328aa2..5d7d8c11ad 100644
// BUILDFLAG(IS_ANDROID)

size_t ProcessMetrics::GetMallocUsage() {
@@ -133,9 +133,9 @@ size_t ProcessMetrics::GetMallocUsage() {
@@ -134,9 +134,9 @@ size_t ProcessMetrics::GetMallocUsage()
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
Expand All @@ -53,25 +53,26 @@ diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_
index f056277d4b..515d779cce 100644
--- a/base/trace_event/malloc_dump_provider.cc
+++ b/base/trace_event/malloc_dump_provider.cc
@@ -186,6 +186,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size,
@@ -180,6 +180,7 @@ void ReportAppleAllocStats(size_t* total

#if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
(!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \
#if (PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
(!PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \
+ defined(__GLIBC__) && \
!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA))
void ReportMallinfoStats(ProcessMemoryDump* pmd,
size_t* total_virtual_size,
@@ -358,8 +359,10 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
@@ -384,9 +385,11 @@ bool MallocDumpProvider::OnMemoryDump(co
#elif BUILDFLAG(IS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.
#else
+#ifdef __GLIBC__
ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
&allocated_objects_size, &allocated_objects_count);
+#endif
#endif
+#endif

MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
outer_dump->AddScalar("virtual_size", MemoryAllocatorDump::kUnitsBytes,
diff --git a/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
index 7392898797..0bf7c4ad99 100644
--- a/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
Expand Down Expand Up @@ -108,7 +109,7 @@ diff --git a/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc b/t
index 4f1d517869..0afd270817 100644
--- a/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
+++ b/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
@@ -38,7 +38,7 @@ bool MemoryUsage::IsSupported() {
@@ -42,7 +42,7 @@ bool MemoryUsage::IsSupported() {

MemoryUsage GetMemoryUsage() {
MemoryUsage result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
third_party/fontconfig/include/config.h | 2 +-
third_party/fontconfig/include/meson-config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/third_party/fontconfig/include/config.h b/third_party/fontconfig/include/config.h
diff --git a/third_party/fontconfig/include/meson-config.h b/third_party/fontconfig/include/meson-config.h
index 9087ca0c15..3e4c56a519 100644
--- a/third_party/fontconfig/include/config.h
+++ b/third_party/fontconfig/include/config.h
@@ -157,7 +157,7 @@
--- a/third_party/fontconfig/include/meson-config.h
+++ b/third_party/fontconfig/include/meson-config.h
@@ -98,7 +98,7 @@

#define HAVE_RANDOM 1

/* Define to 1 if you have the `random_r' function. */
-#define HAVE_RANDOM_R 1
+/* #undef HAVE_RANDOM_R */

/* Define to 1 if you have the `rand_r' function. */
#define HAVE_RAND_R 1

Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
index 3debc8bd07..0cc88aa79f 100644
--- a/base/debug/stack_trace.cc
+++ b/base/debug/stack_trace.cc
@@ -281,14 +281,14 @@ std::string StackTrace::ToString() const {
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
@@ -366,7 +366,7 @@

std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
@@ -390,7 +390,7 @@
}

std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ diff --git a/base/allocator/allocator_check.cc b/base/allocator/allocator_check.
index 0ac9fa1975..b6338c8285 100644
--- a/base/allocator/allocator_check.cc
+++ b/base/allocator/allocator_check.cc
@@ -11,7 +11,7 @@
#include "base/allocator/partition_allocator/shim/winheap_stubs_win.h"
@@ -16,7 +16,7 @@
#include "partition_alloc/shim/winheap_stubs_win.h"
#endif

-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
Expand Down

This file was deleted.

Loading