qt5: move to community

This commit is contained in:
Dylan Araps 2020-02-14 14:00:57 +02:00
parent 6627681877
commit 5bea65c099
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
58 changed files with 0 additions and 1149 deletions

View File

@ -1,9 +0,0 @@
#!/bin/sh -e
export DESTDIR="$1"
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
cmake --install build

View File

@ -1 +0,0 @@
c44020790f4e095d590929bfbe839648be1f9403aeaf9e3472888ed276b5c769 v5.67.0.tar.gz

View File

@ -1 +0,0 @@
cmake make

View File

@ -1 +0,0 @@
https://github.com/KDE/extra-cmake-modules/archive/v5.67.0.tar.gz

View File

@ -1 +0,0 @@
5.67.0 1

View File

@ -1,46 +0,0 @@
#!/bin/sh -e
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ENABLE_WERROR=0
export USE_64=1
export BUILD_OPT=1
make -j1 -C nss nss_build_all
# TODO: Maybe install the NSS binaries. They're uneeded
# right now as we handle certs differently.
#
# TODO: Maybe install nss-config. Nothing uses it yet
# and this build system is terrible so shhh.
install -Dt "$1/usr/include/nss" -m644 dist/public/nss/*.h
install -Dt "$1/usr/include/nss" -m644 dist/Linux*/include/*.h
install -Dt "$1/usr/lib" dist/Linux*/lib/*.so
install -Dt "$1/usr/lib" -m644 dist/Linux*/lib/*.chk
# Yucky. This is needed by qtwebengine.
install -Dt "$1/usr/include/nss/obsolete" \
-m644 dist/Linux*/include/obsolete/*.h
# Install the NSPR files. This is a joint package as I'd
# rather not juggle which version of NSPR works best with NSS.
install -Dt "$1/usr/include/nspr" -m644 nspr/pr/include/*.h
install -Dt "$1/usr/include/nspr" -m644 nspr/lib/*/*.h
# Disgusting. Disgusting. Disgusting. Disgusting. Disgusting.
find nspr/Linux* -name \*.so \
-exec install -Dt "$1/usr/lib" {} \;
# This is disgusting and I hate this package with a passion.
sed nss/pkg/pkg-config/nss.pc.in \
-e "s,%libdir%,/usr/lib,g" \
-e "s,%prefix%,/usr,g" \
-e "s,%exec_prefix%,/usr/bin,g" \
-e "s,%includedir%,/usr/include/nss,g" \
-e "s,%NSPR_VERSION%,4.20,g" \
-e "s,%NSS_VERSION%,3.49.1,g" |
install -Dm644 /dev/stdin "$1/usr/lib/pkgconfig/nss.pc"
# This is disgusting and I hate this package with a passion.
sed nspr/Linux*/config/nspr.pc \
-e "s,/usr/local,/usr,g" |
install -Dm644 /dev/stdin "$1/usr/lib/pkgconfig/nspr.pc"

View File

@ -1 +0,0 @@
8017e343f62b50836eb3d3930e7cd5dc06dcfe87b7ccf4b0a6bf5c0f089d794c nss-3.50-with-nspr-4.25.tar.gz

View File

@ -1,3 +0,0 @@
perl make
sqlite
zlib

View File

@ -1 +0,0 @@
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_50_RTM/src/nss-3.50-with-nspr-4.25.tar.gz

View File

@ -1 +0,0 @@
3.50 1

View File

@ -1,6 +0,0 @@
#!/bin/sh -e
qmake
make
make install INSTALL_ROOT="$1"

View File

@ -1 +0,0 @@
762fe495d2f97fd70f06dc7d3929506ea3b5e3151ad813e0629209b7bc504c8a qtdeclarative-everywhere-src-5.14.1.tar.xz

View File

@ -1,16 +0,0 @@
bzip2
expat
freetype-harfbuzz
libX11
libXau
libXdamage
libXext
libXfixes
libXxf86vm
libdrm
libpng
libxcb
libxshmfence
mesa
qt5
zlib

View File

@ -1 +0,0 @@
https://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtdeclarative-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
5.14.1 1

View File

@ -1,6 +0,0 @@
#!/bin/sh -e
qmake
make
make INSTALL_ROOT="$1" install

View File

@ -1 +0,0 @@
8540a57312f815f81a45b891b49959d776727fde17579bb6bf1a537996bc9359 qtsvg-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
qt5

View File

@ -1 +0,0 @@
https://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtsvg-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
5.14.1 1

View File

@ -1,6 +0,0 @@
#!/bin/sh -e
qmake
make
make INSTALL_ROOT="$1" install

View File

@ -1 +0,0 @@
3af5262fde14c7dfe7bcc12d5796a482837bd09f0878851fd8de5db0b1985e6a qtwebchannel-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
qt5-declarative

View File

@ -1 +0,0 @@
https://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtwebchannel-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
5.14.1 1

View File

@ -1,53 +0,0 @@
#!/bin/sh -e
for patch in *.patch; do
patch -p1 < "$patch"
done
# Remove dbus dependency.
{
sed -i 's/dbus//g' \
src/buildtools/config/support.pri
sed -i 's/use_dbus.*/use_dbus=false/' \
src/3rdparty/chromium/build/config/features.gni
}
# Remove udev dependency.
{
sed -i '/use_udev/s/=.*/=false/' \
src/3rdparty/chromium/build/config/features.gni
sed -i 's/\(use_udev=\)true/\1false/' \
src/buildtools/config/linux.pri
}
# Fix nasm hardcoded glibcism
sed -i '/CANONICALIZE_FILE_NAME/d' \
src/3rdparty/chromium/third_party/nasm/config/config-linux.h
# Remove glibc header.
sed -i '/execinfo.h/d' \
src/3rdparty/chromium/base/debug/stack_trace_posix.cc
# The build fails if qtwebengine is already installed.
find . -name '*.pr[fio]' | while read -r file; do
sed -i "s#INCLUDEPATH += #&\$\$QTWEBENGINE_ROOT/include #" "$file"
done
qmake QMAKE_CXXFLAGS=-DQT_NO_ACCESSIBILITY -- \
-feature-webengine-system-ninja \
-feature-webengine-system-zlib \
-feature-webengine-system-harfbuzz \
-feature-webengine-system-png \
-feature-webengine-system-libevent \
-feature-webengine-system-libvpx \
-feature-webengine-system-opus \
-feature-webengine-system-libwebp \
-feature-webengine-system-ffmpeg \
-feature-webengine-proprietary-codecs \
-no-feature-webengine-system-icu \
-no-feature-webengine-system-glib
make
make install INSTALL_ROOT="$1"

View File

@ -1,19 +0,0 @@
4ec77040a876a83aa2a833ebfe7b3e88dcc167ceb317095eb226a0b8d455e887 qtwebengine-everywhere-src-5.14.1.tar.xz
908735d4f7e4fc9307e177ac9da3419e5801a7740094073c03f9f33600b9767e 0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch
1be1f8e2851f6420f0676fb4f1562368125f93da8bff977be741f85bb453a9fe 0004-mkspecs-Allow-builds-with-libc-glibc.patch
9cd813f5a0b39795dd8f8822f30f9fd4fd4952bad4b4037cf0bf0f2918a56541 0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
9d0b16939513f998da00834b1823743807b6aba04df732e83d42f15620359b35 0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
8ecd920e8c6f69d4c9e1dc177710c79209f9494cc67126b2473bd2f8a020cab8 0013-chromium-musl-include-fcntl.h-for-loff_t.patch
d8c4b9d330704b5fe50335a4ad44d6128cfc134de372018906f437df73dc08df 0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch
f02c111dab32ba3fbe79b052fbbced25480e4ab3cfcdcb0e5483f5eed37ac85c 0015-chromium-musl-linux-glibc-make-the-distinction.patch
d58511d9d6b04be447459d9f5eebfc2fa67f3c5ffc4482f5a57d8ab60ef41489 0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch
1e87c3f07b134d8f4ded953a0d916b9d5754fb580e1b72b2752ebf49fed6fd19 0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch
f282d229122574e7573b201280bd3ea7eae171c32f28c57f1fbef66ceb69aa75 0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
d81774d8049d8cae8a78b12b3abf723565ba87b54e0ccb26424d2c6e6a364588 0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch
eb03407950b724c2131b930fb4b1b330ed5ed30f5584b383b6ba345596552495 0020-chromium-musl-Adjust-default-pthread-stack-size.patch
a58627c95fef502a1a9eeaa29f77bd60d17ab39dd51c994dcc7073fe7590232e 0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch
fe8057b83f02f19e169faa9e4e6ebd11a4e3ba33453ea46df6672293edf9dd09 0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch
bd58ef5468799716187e0783c9c0a595eeb17ac619104c35b456c58350cf9b3e 0023-chromium-musl-pread-pwrite.patch
2924bd45f2ca95aa19d303b55368cc72041a2367b233ea6b69c2febf856518f5 0030-chromium-musl-execinfo.patch
6022046c7dd937c2d063fa93632cf9ffd8ce894b422bf14c10815eb7b346b20c 0031-chromium-musl-portable-msghdr.patch
7276899529f28acf8acf60bf9b808238f28a4162f427176ee9d72a8ddbabcd3f 0032-chromium-musl-sandbox.patch

View File

@ -1,21 +0,0 @@
bison make
ffmpeg
flex make
fontconfig
freetype-harfbuzz
gperf make
libXcomposite
libXcursor
libXi
libXslt
libXtst
libdrm
libevent
libxml2
nss
python2 make
qt5
qt5-declarative
qt5-webchannel
samurai make
zlib

View File

@ -1,37 +0,0 @@
From 312f6955af1dc6ea61bbd48bece794c1257822fa Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Tue, 12 Dec 2017 16:06:14 +0200
Subject: [PATCH] musl: don't use pvalloc as it's not available on musl
Change-Id: I7145463ac7b9560e7459d3384a3db108bd727403
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
src/core/api/qtbug-61521.cpp | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp
index 002a1af2..8fd2da36 100644
--- a/src/core/api/qtbug-61521.cpp
+++ b/src/core/api/qtbug-61521.cpp
@@ -74,10 +74,6 @@ SHIM_SYMBOL_VERSION(valloc);
void* __valloc(size_t size)
SHIM_ALIAS_SYMBOL(ShimValloc);
-SHIM_SYMBOL_VERSION(pvalloc);
-void* __pvalloc(size_t size)
- SHIM_ALIAS_SYMBOL(ShimPvalloc);
-
SHIM_SYMBOL_VERSION(posix_memalign);
int __posix_memalign(void** r, size_t a, size_t s)
SHIM_ALIAS_SYMBOL(ShimPosixMemalign);
@@ -110,10 +106,6 @@ SHIM_HIDDEN void* ShimValloc(size_t size) {
return valloc(size);
}
-SHIM_HIDDEN void* ShimPvalloc(size_t size) {
- return pvalloc(size);
-}
-
SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {
return posix_memalign(r,a,s);
}

View File

@ -1,26 +0,0 @@
From 71d55292cdd72dcf1ed5eb4ba7299433a35a4bb0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 12 Nov 2019 19:53:59 -0800
Subject: [PATCH] mkspecs: Allow builds with libc != glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/buildtools/config/support.pri | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
index 5bdd808d..19540787 100644
--- a/src/buildtools/config/support.pri
+++ b/src/buildtools/config/support.pri
@@ -89,11 +89,6 @@ defineTest(qtwebengine_checkErrorForLinux) {
return(false)
}
- !qtConfig(webengine-system-glibc) {
- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build QtWebEngine could not be found.")
- return(false)
- }
-
!qtConfig(webengine-system-khr) {
qtwebengine_skipBuild("Khronos development headers required to build QtWebEngine are missing (see mesa/libegl1-mesa-dev)")
return(false)

View File

@ -1,33 +0,0 @@
From d38a63908f5c49705abd85bd9c2aee0ec334221d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:01:12 -0700
Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not
defined
Musl does not define this Macro
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c
index 854819bfbb4..a99d32741d0 100644
--- a/src/3rdparty/chromium/sandbox/linux/suid/sandbox.c
+++ b/src/3rdparty/chromium/sandbox/linux/suid/sandbox.c
@@ -46,6 +46,15 @@ static bool DropRoot();
#define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x)
+#ifndef TEMP_FAILURE_RETRY
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
static void FatalError(const char* msg, ...)
__attribute__((noreturn, format(printf, 1, 2)));

View File

@ -1,52 +0,0 @@
From 4b16ad982ff10945a37a7dd90735a5a1be3d6a8b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:09:06 -0700
Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/process/process_metrics_posix.cc | 4 ++--
chromium/base/trace_event/malloc_dump_provider.cc | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc
index 5763432aa4f..ff00b7307c0 100644
--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc
+++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc
@@ -109,14 +109,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/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc
index 0077d8b0aec..c69f893f4e9 100644
--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default;
// the current process.
bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
ProcessMemoryDump* pmd) {
+#if defined(__GLIBC__)
{
base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_);
if (!emit_metrics_on_memory_dump_)
@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
MemoryAllocatorDump::kUnitsBytes,
resident_size - allocated_objects_size);
}
+#endif // __GLIBC__
return true;
}

View File

@ -1,22 +0,0 @@
From e087d26af9bdd2f045f8a81fdd2688c50b77e938 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:37:49 -0700
Subject: [PATCH] chromium: musl: include fcntl.h for loff_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
index ca5936d6e63..5484dbadfbd 100644
--- a/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
+++ b/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
@@ -154,6 +154,7 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
#include <string.h>
+#include <fcntl.h>
#include <sys/ptrace.h>
#include <sys/resource.h>
#include <sys/time.h>

View File

@ -1,62 +0,0 @@
From 5cde4d2fb5affc6e739dba412453b4bf076f19e9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:38:37 -0700
Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t
- only do the glibc 32-bit ABI check for mmap/mmap64 on gnu libc. musl
does not support the 32-bit ABI.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
index 17415aaf538..59c1b6fb5f6 100644
--- a/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
+++ b/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
@@ -60,7 +60,7 @@
static inline void* do_mmap64(void *start, size_t length,
int prot, int flags,
- int fd, __off64_t offset) __THROW {
+ int fd, off64_t offset) __THROW {
// The original gperftools uses sys_mmap() here. But, it is not allowed by
// Chromium's sandbox.
return (void*)syscall(SYS_mmap, start, length, prot, flags, fd, offset);
@@ -73,7 +73,7 @@ static inline void* do_mmap64(void *start, size_t length,
static inline void* do_mmap64(void *start, size_t length,
int prot, int flags,
- int fd, __off64_t offset) __THROW {
+ int fd, off64_t offset) __THROW {
void *result;
// Try mmap2() unless it's not supported
@@ -144,7 +144,7 @@ static inline void* do_mmap64(void *start, size_t length,
extern "C" {
void* mmap64(void *start, size_t length, int prot, int flags,
- int fd, __off64_t offset ) __THROW
+ int fd, off64_t offset ) __THROW
ATTRIBUTE_SECTION(malloc_hook);
void* mmap(void *start, size_t length,int prot, int flags,
int fd, off_t offset) __THROW
@@ -159,7 +159,7 @@ extern "C" {
}
extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
- int fd, __off64_t offset) __THROW {
+ int fd, off64_t offset) __THROW {
MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset);
void *result;
if (!MallocHook::InvokeMmapReplacement(
@@ -170,7 +170,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
return result;
}
-# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)
+# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH))
extern "C" void* mmap(void *start, size_t length, int prot, int flags,
int fd, off_t offset) __THROW {

View File

@ -1,23 +0,0 @@
From 04a11fa6f38987091b6b65244950d3d83579c9a8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:54:38 -0700
Subject: [PATCH] chromium: musl: linux != glibc, make the distinction
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/allocator/allocator_check.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc
index 5fb86467dde..9864858eb67 100644
--- a/src/3rdparty/chromium/base/allocator/allocator_check.cc
+++ b/src/3rdparty/chromium/base/allocator/allocator_check.cc
@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() {
// Set by allocator_shim_override_ucrt_symbols_win.h when the
// shimmed _set_new_mode() is called.
return g_is_win_shim_layer_initialized;
-#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \
+#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
// From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h.
// TODO(primiano): replace with an include once base can depend on allocator.

View File

@ -1,24 +0,0 @@
From 59ab7f11b90bd2114ff8cc16d6502e0ad6bb6538 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:09:02 -0700
Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols
for musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/allocator/allocator_shim.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc
index e6838ebda84..7296cc9ed81 100644
--- a/src/3rdparty/chromium/base/allocator/allocator_shim.cc
+++ b/src/3rdparty/chromium/base/allocator/allocator_shim.cc
@@ -351,7 +351,7 @@ ALWAYS_INLINE void ShimAlignedFree(void* address, void* context) {
// In the case of tcmalloc we also want to plumb into the glibc hooks
// to avoid that allocations made in glibc itself (e.g., strdup()) get
// accidentally performed on the glibc heap instead of the tcmalloc one.
-#if defined(USE_TCMALLOC)
+#if defined(USE_TCMALLOC) && defined(__GLIBC__)
#include "base/allocator/allocator_shim_override_glibc_weak_symbols.h"
#endif

View File

@ -1,24 +0,0 @@
From b8735496287b7c2a15224f7d837dc74a09434bdb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:12:39 -0700
Subject: [PATCH] chromium: musl: Use correct member name __si_fields from
LinuxSigInfo
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/sandbox/linux/seccomp-bpf/trap.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/sandbox/linux/seccomp-bpf/trap.cc b/chromium/sandbox/linux/seccomp-bpf/trap.cc
index 003708d2c89..0fef3148f9d 100644
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
@@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) {
// most versions of glibc don't include this information in siginfo_t. So,
// we need to explicitly copy it into a arch_sigsys structure.
struct arch_sigsys sigsys;
- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
#if defined(__mips__)
// When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the

View File

@ -1,79 +0,0 @@
From 09c0c63a65770465ef2ec0a3b028e22a9a0164f6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:27:50 -0700
Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc
platforms
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/net/dns/dns_config_service_posix.cc | 4 +++
chromium/net/dns/dns_reloader.cc | 4 +++
chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 100644 chromium/net/dns/resolv_compat.h
diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc
index ee2d5721425..bcb83b07f6e 100644
--- a/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
+++ b/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
@@ -29,6 +29,10 @@
#include "net/dns/public/dns_protocol.h"
#include "net/dns/serial_worker.h"
+#if defined(OS_LINUX) && !defined(__GLIBC__)
+#include "net/dns/resolv_compat.h"
+#endif
+
#if defined(OS_MACOSX) && !defined(OS_IOS)
#include "net/dns/dns_config_watcher_mac.h"
#endif
diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc
index 03e248c9878..9ccda82c7e9 100644
--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc
+++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc
@@ -9,6 +9,10 @@
#include <resolv.h>
+#if defined(OS_LINUX) && !defined(__GLIBC__)
+#include "net/dns/resolv_compat.h"
+#endif
+
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h
new file mode 100644
index 00000000000..4f0e852a19d
--- /dev/null
+++ b/src/3rdparty/chromium/net/dns/resolv_compat.h
@@ -0,0 +1,29 @@
+#if !defined(__GLIBC__)
+/***************************************************************************
+ * resolv_compat.h
+ *
+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
+ * Note: res_init() is actually deprecated according to
+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
+ **************************************************************************/
+#include <string.h>
+
+static inline int res_ninit(res_state statp)
+{
+ int rc = res_init();
+ if (statp != &_res) {
+ memcpy(statp, &_res, sizeof(*statp));
+ }
+ return rc;
+}
+
+static inline int res_nclose(res_state statp)
+{
+ if (!statp)
+ return -1;
+ if (statp != &_res) {
+ memset(statp, 0, sizeof(*statp));
+ }
+ return 0;
+}
+#endif

View File

@ -1,26 +0,0 @@
From 57ebdf59c45c70ab13b724a2293fdd78241a8a37 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:39:57 -0700
Subject: [PATCH] chromium: musl: Do not define __sbrk on musl
musl libc does not have sbrk. on musl libc will only work when called with 0 as
argument, so we just let it out for now
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
index 59c1b6fb5f6..10f0786d829 100644
--- a/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
+++ b/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
@@ -213,7 +213,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size,
return result;
}
-#ifndef __UCLIBC__
+#if !defined(__UCLIBC__) && defined(__GLIBC__)
// libc's version:
extern "C" void* __sbrk(intptr_t increment);

View File

@ -1,47 +0,0 @@
From 50d5b6fa29696c873830af7632b51cb4836c2210 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 16:41:23 -0700
Subject: [PATCH] chromium: musl: Adjust default pthread stack size
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/threading/platform_thread_linux.cc | 3 ++-
.../third_party/blink/renderer/platform/wtf/stack_util.cc | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/chromium/base/threading/platform_thread_linux.cc b/chromium/base/threading/platform_thread_linux.cc
index 095c49b8dc0..d1479b54d48 100644
--- a/src/3rdparty/chromium/base/threading/platform_thread_linux.cc
+++ b/src/3rdparty/chromium/base/threading/platform_thread_linux.cc
@@ -186,7 +186,8 @@ void TerminateOnThread() {}
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
#if !defined(THREAD_SANITIZER)
- return 0;
+ // use 8mb like glibc to avoid running out of space
+ return (1 << 23);
#else
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
// default stack size isn't enough for some browser tests.
diff --git a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
index b2421649ff3..a31b96e90e6 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
@@ -29,7 +29,7 @@ size_t GetUnderestimatedStackSize() {
// 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 blink_unittests).
@@ -97,7 +97,7 @@ return Threading::ThreadStackSize();
}
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;

View File

@ -1,63 +0,0 @@
From 1f839bf6ac48d81a8acbf3def4f57a555a05fa18 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 25 Sep 2018 12:35:07 -0700
Subject: [PATCH] chromium: musl: Use _fpstate instead of _libc_fpstate on
linux
glibc defines both. musl libc only the former.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++--
.../src/client/linux/dump_writer_common/ucontext_reader.h | 2 +-
.../src/client/linux/minidump_writer/minidump_writer.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
index 6ee6cc1e4cd..a8f9ccc72ac 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fp) {
+ const struct _fpstate* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_X86_FULL |
@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *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;
diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
index f830618f240..f3dde1f4dff 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -50,7 +50,7 @@ struct UContextReader {
// info: the collection of register structures.
#if defined(__i386__) || defined(__x86_64)
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fp);
+ const struct _fpstate* fp);
#elif defined(__aarch64__)
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct fpsimd_context* fpregs);
diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
index d1dc331215a..d1cc5624cd4 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -48,7 +48,7 @@ class ExceptionHandler;
#if defined(__aarch64__)
typedef struct fpsimd_context fpstate_t;
#elif !defined(__ARM_EABI__) && !defined(__mips__)
-typedef struct _libc_fpstate fpstate_t;
+typedef struct _fpstate fpstate_t;
#endif
// These entries store a list of memory regions that the client wants included

View File

@ -1,56 +0,0 @@
From 8f16cec0583c9de1ceb2c34a3bea527096f34075 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 25 Sep 2018 12:59:05 -0700
Subject: [PATCH] chromium: musl: elf_reader.cc: include <sys/reg.h> to get
__WORDSIZE on musl libc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
chromium/third_party/breakpad/breakpad/configure.ac | 2 +-
.../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 3 ++-
.../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/configure.ac b/src/3rdparty/chromium/third_party/breakpad/breakpad/configure.ac
index 492d09038f9..a6403ed8c3c 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/configure.ac
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/configure.ac
@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
AC_HEADER_STDC
AC_SYS_LARGEFILE
AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h sys/random.h])
+AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h])
AC_CHECK_FUNCS([arc4random getrandom])
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
index 4135a51a980..be92b792d3c 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
@@ -29,10 +29,11 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE // needed for pread()
#endif
-
+#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
+#include <sys/reg.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
index d03c7a88d38..28b55ab6300 100644
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
@@ -33,6 +33,7 @@
#ifndef COMMON_LINUX_ELF_CORE_DUMP_H_
#define COMMON_LINUX_ELF_CORE_DUMP_H_
+#include <sys/reg.h>
#include <elf.h>
#include <link.h>
#include <stddef.h>

View File

@ -1,31 +0,0 @@
From 725941687b118b90904fbc7e6b25a288b9d3c52b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 23 Dec 2018 16:58:04 -0800
Subject: [PATCH] chromium: musl: pread pwrite
Redefine pread/pwrite in terms of 64bit variants on musl
since 32bit variants don't exist and aliases are not defined in
libc either
Upstream-Status: Submitted [https://codereview.chromium.org/1743093002/]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/third_party/lss/linux_syscall_support.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h
index 622cc1fbf7e..cd561b80c05 100644
--- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
@@ -1239,6 +1239,11 @@ struct kernel_statfs {
#ifndef __NR_fallocate
#define __NR_fallocate 285
#endif
+#undef __NR_pread
+#define __NR_pread __NR_pread64
+#undef __NR_pwrite
+#define __NR_pwrite __NR_pwrite64
+
/* End of x86-64 definitions */
#elif defined(__mips__)
#if _MIPS_SIM == _MIPS_SIM_ABI32

View File

@ -1,108 +0,0 @@
diff --git a/src/3rdparty/chromium/base/debug/stack_trace.cc b/src/3rdparty/chromium/base/debug/stack_trace.cc
index d8ca822d9..f6f3d9c69 100644
--- a/src/3rdparty/chromium/base/debug/stack_trace.cc
+++ b/src/3rdparty/chromium/base/debug/stack_trace.cc
@@ -233,14 +233,14 @@ std::string StackTrace::ToString() const {
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
}
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.";
diff --git a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
index f4ddf9c1e..aef993613 100644
--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
+++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
@@ -27,7 +27,7 @@
#if !defined(USE_SYMBOLIZE)
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
#include <execinfo.h>
#endif
@@ -88,7 +88,7 @@ void DemangleSymbols(std::string* text) {
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
// Look for the start of a mangled symbol, from search_from.
@@ -123,7 +123,7 @@ void DemangleSymbols(std::string* text) {
search_from = mangled_start + 2;
}
}
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
+#endif // defined(__GLIBC__) && !defined(_AIX)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -135,7 +135,7 @@ class BacktraceOutputHandler {
virtual ~BacktraceOutputHandler() = default;
};
-#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.
@@ -218,7 +218,7 @@ void ProcessBacktrace(void* const* trace,
}
#endif // defined(USE_SYMBOLIZE)
}
-#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
@@ -834,7 +834,7 @@ size_t CollectStackTrace(void** trace, size_t count) {
// 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__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
return base::saturated_cast<size_t>(backtrace(trace, count));
@@ -847,13 +847,13 @@ void StackTrace::PrintWithPrefix(const char* prefix_string) const {
// 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__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
PrintBacktraceOutputHandler handler;
ProcessBacktrace(trace_, count_, prefix_string, &handler);
#endif
}
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
const char* prefix_string) const {
StreamBacktraceOutputHandler handler(os);
diff --git a/src/3rdparty/chromium/base/logging.cc b/src/3rdparty/chromium/base/logging.cc
index 4c4bfa6af..0ca5c2159 100644
--- a/src/3rdparty/chromium/base/logging.cc
+++ b/src/3rdparty/chromium/base/logging.cc
@@ -618,7 +618,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
LogMessage::~LogMessage() {
size_t stack_start = stream_.tellp();
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
!defined(OS_AIX)
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.

View File

@ -1,35 +0,0 @@
initialize msghdr in a compatible manner
msghdr stuct from socket.h is not same between musl and glibc
where musl claims to be more posix compliant where as glibc seems
to fill whats needed for linux sizewise and chooses long enough types
which maybe questionable, therefore constructing a structure with explicit
constructor is not going to work correctly for musl and glibc at same time
see
https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64
This fix initialized the struct to 0 first and then sets the struct elements
by name, so we dont have to hard code the positions of elements when initializing
structure
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
+++ b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
@@ -1193,8 +1193,12 @@ SendResult UDPSocketPosixSender::Interna
for (auto& buffer : buffers)
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
msgvec->reserve(buffers.size());
- for (size_t j = 0; j < buffers.size(); j++)
- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
+ for (size_t j = 0; j < buffers.size(); j++) {
+ struct msghdr m = {0};
+ m.msg_iov = &msg_iov[j];
+ m.msg_iovlen = 1;
+ msgvec->push_back({m, 0});
+ }
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
SendResult send_result(0, 0, std::move(buffers));
if (result < 0) {

View File

@ -1,112 +0,0 @@
diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
index 348ab6e8c..4550f9e8d 100644
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -139,21 +139,11 @@ namespace sandbox {
// present (as in newer versions of posix_spawn).
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
const Arg<unsigned long> flags(0);
-
- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
- CLONE_SIGHAND | CLONE_THREAD |
- CLONE_SYSVSEM;
- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
-
- const uint64_t kGlibcPthreadFlags =
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
-
- const BoolExpr android_test =
- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
- flags == kGlibcPthreadFlags);
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
// The following two flags are the two important flags in any vfork-emulating
// clone call. EPERM any clone call that contains both of them.
@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
(flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
- return If(IsAndroid() ? android_test : glibc_test, Allow())
+ return If(thread_clone_ok, Allow())
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
.Else(CrashSIGSYSClone());
}
diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index 7dbcc8752..782be7840 100644
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -391,6 +391,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.
@@ -403,7 +404,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:
@@ -513,6 +513,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
case __NR_mlock:
case __NR_munlock:
case __NR_munmap:
+ case __NR_mremap:
+ case __NR_membarrier:
return true;
case __NR_madvise:
case __NR_mincore:
@@ -530,7 +532,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
case __NR_modify_ldt:
#endif
case __NR_mprotect:
- case __NR_mremap:
case __NR_msync:
case __NR_munlockall:
case __NR_readahead:
diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
index 349504aee..ea3c7c91d 100644
--- a/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
@@ -1290,5 +1290,9 @@
#define __NR_memfd_create 319
#endif
+#if !defined(__NR_membarrier)
+#define __NR_membarrier 324
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
diff --git a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc b/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
index 017f13cf7..5cfdb7a09 100644
--- a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
+++ b/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
@@ -88,10 +88,16 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const {
case __NR_sysinfo:
case __NR_times:
case __NR_uname:
+#if !defined(__GLIBC__)
+ case __NR_sched_getparam:
+ case __NR_sched_getscheduler:
+#endif
return Allow();
case __NR_sched_getaffinity:
+#if defined(__GLIBC__)
case __NR_sched_getparam:
case __NR_sched_getscheduler:
+#endif
case __NR_sched_setscheduler:
return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
case __NR_prlimit64:

View File

@ -1,19 +0,0 @@
http://download.qt-project.org/official_releases/qt/5.14/5.14.1/submodules/qtwebengine-everywhere-src-5.14.1.tar.xz
patches/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch
patches/0004-mkspecs-Allow-builds-with-libc-glibc.patch
patches/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
patches/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
patches/0013-chromium-musl-include-fcntl.h-for-loff_t.patch
patches/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch
patches/0015-chromium-musl-linux-glibc-make-the-distinction.patch
patches/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch
patches/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch
patches/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
patches/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch
patches/0020-chromium-musl-Adjust-default-pthread-stack-size.patch
patches/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch
patches/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch
patches/0023-chromium-musl-pread-pwrite.patch
patches/0030-chromium-musl-execinfo.patch
patches/0031-chromium-musl-portable-msghdr.patch
patches/0032-chromium-musl-sandbox.patch

View File

@ -1 +0,0 @@
5.14.1 1

View File

@ -1,6 +0,0 @@
#!/bin/sh -e
qmake
make
make INSTALL_ROOT="$1" install

View File

@ -1 +0,0 @@
b268907deb06570671c1f584feb1508e7fded129209a268183decc122bfac181 qtx11extras-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
qt5

View File

@ -1 +0,0 @@
https://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtx11extras-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
5.14.1 1

View File

@ -1,36 +0,0 @@
#!/bin/sh -e
# Don't link against execinfo.h.
sed -i 's/define QLOG/define N/g' \
./src/corelib/global/qlogging.cpp
./configure \
-confirm-license \
-opensource \
-prefix /usr \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-archdatadir /usr/lib/qt \
-datadir /usr/share/qt \
-sysconfdir /etc/xdg \
-examplesdir /usr/share/doc/qt/examples \
-nomake examples \
-nomake tests \
-optimized-qmake \
-no-openssl \
-no-libudev \
-no-separate-debug-info \
-no-pch \
-no-dbus \
-no-accessibility \
-no-gtk \
-no-glib \
-system-libjpeg \
-system-libpng \
-system-sqlite \
-system-zlib \
-system-freetype \
-system-harfbuzz
make
make INSTALL_ROOT="$1" install

View File

@ -1 +0,0 @@
d9d423a6e7bcf1055c0372fc029f14a6fe67dd62c67b83095cde68b60b762cf7 qtbase-everywhere-src-5.14.1.tar.xz

View File

@ -1,17 +0,0 @@
bison make
flex make
freetype-harfbuzz
gperf make
libxkbcommon
libICE
libSM
libX11
libXext
libinput
libjpeg-turbo
libpng
mesa
mtdev
perl make
sqlite
zlib

View File

@ -1 +0,0 @@
http://download.qt-project.org/official_releases/qt/5.14/5.14.1/submodules/qtbase-everywhere-src-5.14.1.tar.xz

View File

@ -1 +0,0 @@
5.14.1 1