mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
community/chromium: upgrade to 61.0.3163.79
to fix tab crashes, use patch from https://github.com/lluixhi/musl-extras/issues/10#issuecomment-328272349 use various patches from fedora
This commit is contained in:
parent
0d4667363c
commit
d183e852a7
@ -1,7 +1,7 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
||||
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
|
||||
pkgname=chromium
|
||||
pkgver=59.0.3071.115
|
||||
pkgver=61.0.3163.79
|
||||
pkgrel=0
|
||||
pkgdesc="chromium web browser"
|
||||
url="http://www.chromium.org/"
|
||||
@ -37,14 +37,12 @@ makedepends="$depends_dev
|
||||
libbsd-dev
|
||||
libcap-dev
|
||||
libelf-dev
|
||||
libevent-dev
|
||||
libexif-dev
|
||||
libgcrypt-dev
|
||||
libgnome-keyring-dev
|
||||
libjpeg-turbo-dev
|
||||
libpng-dev
|
||||
libre2-dev
|
||||
libvpx-dev
|
||||
libusb-dev
|
||||
libwebp-dev
|
||||
libxcomposite-dev
|
||||
libxcursor-dev
|
||||
@ -73,6 +71,8 @@ makedepends="$depends_dev
|
||||
zlib-dev
|
||||
"
|
||||
install=""
|
||||
# explicit depends for --headless
|
||||
depends="eudev-libs ttf-opensans"
|
||||
options=suid
|
||||
subpackages="$pkgname-doc $pkgname-chromedriver"
|
||||
source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
|
||||
@ -84,12 +84,12 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
|
||||
|
||||
chromium-widevine.patch
|
||||
default-pthread-stacksize.patch
|
||||
fix-gn_bootstrap.patch
|
||||
gcc6.patch
|
||||
gn_bootstrap.patch
|
||||
last-commit-position.patch
|
||||
musl-fixes.patch
|
||||
musl-hacks.patch
|
||||
musl-libc++.patch
|
||||
musl-sandbox.patch
|
||||
no-execinfo.patch
|
||||
no-getcontext.patch
|
||||
@ -97,6 +97,16 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
|
||||
resolver.patch
|
||||
unset-madv_free.patch
|
||||
swiftshader.patch
|
||||
secure_getenv.patch
|
||||
gcc-fixes.patch
|
||||
fix-atk.patch
|
||||
chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
|
||||
chromium-60.0.3112.78-gn-system.patch
|
||||
chromium-60.0.3112.78-jpeg-nomangle.patch
|
||||
chromium-60.0.3112.78-no-libpng-prefix.patch
|
||||
chromium-60.0.3112.78-no-zlib-mangle.patch
|
||||
chromium-61.0.3163.79-gcc5-r1.patch
|
||||
chromium-61.0.3163.79-gtk2fix.patch
|
||||
"
|
||||
|
||||
builddir="$srcdir"/$pkgname-$pkgver
|
||||
@ -107,6 +117,14 @@ case "${CARCH}" in
|
||||
arm) target_arch=arm;;
|
||||
esac
|
||||
|
||||
if [ -n "$DEBUG" ]; then
|
||||
_buildtype=Debug
|
||||
_is_debug=true
|
||||
else
|
||||
_buildtype=Release
|
||||
_is_debug=false
|
||||
fi
|
||||
|
||||
prepare() {
|
||||
cd "$builddir"
|
||||
|
||||
@ -114,12 +132,12 @@ prepare() {
|
||||
cd "$builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p0 -i "$srcdir"/$i || return 1;;
|
||||
*.patch) msg $i; patch -p0 -i "$srcdir"/$i;;
|
||||
esac
|
||||
done
|
||||
|
||||
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
|
||||
touch chrome/test/data/webui/i18n_process_css_test.html || return 1
|
||||
touch chrome/test/data/webui/i18n_process_css_test.html
|
||||
# Use the file at run time instead of effectively compiling it in
|
||||
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
||||
-i device/usb/BUILD.gn
|
||||
@ -134,23 +152,19 @@ _gn_flags() {
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
# currently does not build with system vpx 1.4
|
||||
# remoting/codec/video_encoder_vpx.cc:308:10: error:
|
||||
# 'vpx_codec_control_VP9E_GET_ACTIVEMAP' was not declared in this scope
|
||||
local vpx=0
|
||||
# reusable system library settings
|
||||
local use_system="
|
||||
flac
|
||||
freetype
|
||||
harfbuzz-ng
|
||||
libevent
|
||||
libdrm
|
||||
libjpeg
|
||||
libpng
|
||||
libwebp
|
||||
libxml
|
||||
libxslt
|
||||
re2
|
||||
snappy
|
||||
yasm
|
||||
zlib
|
||||
"
|
||||
for _lib in ${use_system} libjpeg_turbo; do
|
||||
msg "Removing buildscripts for system provided $_lib"
|
||||
@ -176,7 +190,7 @@ build() {
|
||||
|
||||
msg "Replacing gyp files"
|
||||
python build/linux/unbundle/replace_gn_files.py --system-libraries \
|
||||
${use_system} || return 1
|
||||
${use_system}
|
||||
third_party/libaddressinput/chromium/tools/update-strings.py
|
||||
|
||||
##############################################################
|
||||
@ -195,144 +209,89 @@ build() {
|
||||
use_gconf=false \
|
||||
use_gold=true \
|
||||
use_allocator=\"none\" \
|
||||
use_experimental_allocator_shim=false \
|
||||
use_allocator_shim=false \
|
||||
)
|
||||
|
||||
python tools/gn/bootstrap/bootstrap.py --gn-gen-args "$_c"\
|
||||
|| return 1
|
||||
python tools/gn/bootstrap/bootstrap.py --gn-gen-args "$_c"
|
||||
|
||||
_c=$(_gn_flags \
|
||||
enable_hotwording=false \
|
||||
enable_nacl=false \
|
||||
enable_nacl_nonsfi=false \
|
||||
enable_precompiled_headers=false \
|
||||
ffmpeg_branding=\"Chrome\" \
|
||||
fieldtrial_testing_like_official_build=true \
|
||||
google_api_key=\"$_google_api_key\" \
|
||||
google_default_client_id=\"$_google_default_client_id\" \
|
||||
google_default_client_secret=\"$_google_default_client_secret\" \
|
||||
treat_warnings_as_errors=false \
|
||||
is_clang=false \
|
||||
is_debug=false \
|
||||
symbol_level=0 \
|
||||
linux_link_cups=true \
|
||||
linux_link_gsettings=true \
|
||||
linux_link_libspeechd=false \
|
||||
is_debug=$_is_debug \
|
||||
linux_use_bundled_binutils=false \
|
||||
linux_use_bundled_gold=false \
|
||||
linux_use_gold_flags=false \
|
||||
icu_use_data_file_flag=true \
|
||||
logging_like_official_build=true \
|
||||
libspeechd_h_prefix=\"speech-dispatcher/\" \
|
||||
ffmpeg_branding=\"Chrome\" \
|
||||
proprietary_codecs=true \
|
||||
symbol_level=0 \
|
||||
treat_warnings_as_errors=false \
|
||||
use_allocator=\"none\" \
|
||||
use_experimental_allocator_shim=false \
|
||||
use_gnome_keyring=false \
|
||||
usb_ids_path=\"/usr/share/hwdata/usb.ids\" \
|
||||
use_mojo=false \
|
||||
use_allocator_shim=false \
|
||||
use_gconf=false \
|
||||
use_sysroot=false \
|
||||
use_gnome_keyring=false \
|
||||
use_pulseaudio=false \
|
||||
enable_hotwording=false \
|
||||
disable_fatal_linker_warnings=true \
|
||||
disable_glibc=true \
|
||||
enable_nacl=false \
|
||||
enable_nacl_nonsfi=false \
|
||||
target_arch=\"$target_arch\" \
|
||||
release_extra_cflags=\"$CFLAGS\" \
|
||||
disable_sse2=true \
|
||||
fieldtrial_testing_like_official_build=true \
|
||||
use_sysroot=false \
|
||||
)
|
||||
|
||||
out/Release/gn gen out/Release --args="$_c" || return 1
|
||||
out/Release/gn gen out/$_buildtype --args="$_c"
|
||||
|
||||
# build/gyp_chromium --depth=. \
|
||||
# ${use_system} \
|
||||
# -Dgoogle_api_key="$_google_api_key" \
|
||||
# -Dgoogle_default_client_id="$_google_default_client_id" \
|
||||
# -Dgoogle_default_client_secret="$_google_default_client_secret" \
|
||||
# -Dwerror= \
|
||||
# -Dclang=0 \
|
||||
# -Dpython_ver=2.7 \
|
||||
# -Dlinux_link_cups=1 \
|
||||
# -Dlinux_link_gsettings=1 \
|
||||
# -Dlinux_link_libpci=1 \
|
||||
# -Dlinux_link_libspeechd=0 \
|
||||
# -Dlinux_strip_binary=1 \
|
||||
# -Dlinux_use_bundled_binutils=0 \
|
||||
# -Dlinux_use_bundled_gold=0 \
|
||||
# -Dlinux_use_gold_flags=0 \
|
||||
# -Dicu_use_data_file_flag=1 \
|
||||
# -Dlogging_like_official_build=1 \
|
||||
# -Dlibspeechd_h_prefix=speech-dispatcher/ \
|
||||
# -Dffmpeg_branding=Chrome \
|
||||
# -Dproprietary_codecs=1 \
|
||||
# -Duse_allocator=none \
|
||||
# -Duse_experimental_allocator_shim=false \
|
||||
# -Duse_gnome_keyring=0 \
|
||||
# -Dusb_ids_path=/usr/share/hwdata/usb.ids \
|
||||
# -Duse_mojo=0 \
|
||||
# -Duse_gconf=0 \
|
||||
# -Duse_sysroot=0 \
|
||||
# -Duse_pulseaudio=0 \
|
||||
# -Denable_hotwording=0 \
|
||||
# -Ddisable_fatal_linker_warnings=1 \
|
||||
# -Ddisable_glibc=1 \
|
||||
# -Ddisable_nacl=1 \
|
||||
# -Ddisable_pnacl=1 \
|
||||
# -Dtarget_arch="$target_arch" \
|
||||
# -Drelease_extra_cflags="$CFLAGS" \
|
||||
# -Ddisable_sse2=1 \
|
||||
# || return 1
|
||||
#
|
||||
msg "Ninja turtles GO!"
|
||||
# build mksnapshot and paxmark it
|
||||
ninja -C out/Release mksnapshot || return 1
|
||||
paxmark -m out/Release/mksnapshot || return 1
|
||||
ninja -C out/$_buildtype mksnapshot
|
||||
paxmark -m out/$_buildtype/mksnapshot
|
||||
|
||||
# finish rest of the build
|
||||
ninja -C out/Release chrome chrome_sandbox chromedriver || return 1
|
||||
ninja -C out/$_buildtype chrome chrome_sandbox chromedriver
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
local bin pak
|
||||
# paxmark inside chroot too
|
||||
paxmark -m out/Release/mksnapshot || return 1
|
||||
paxmark -m out/$_buildtype/mksnapshot
|
||||
|
||||
for bin in chrome natives_blob.bin snapshot_blob.bin; do
|
||||
install -Dm755 out/Release/$bin \
|
||||
"$pkgdir"/usr/lib/$pkgname/$bin || return 1
|
||||
install -Dm755 out/$_buildtype/$bin \
|
||||
"$pkgdir"/usr/lib/$pkgname/$bin
|
||||
done
|
||||
paxmark -m "$pkgdir"/usr/lib/$pkgname/chrome || return 1
|
||||
paxmark -m "$pkgdir"/usr/lib/$pkgname/chrome
|
||||
|
||||
install -Dm4755 "$builddir"/out/Release/chrome_sandbox \
|
||||
"$pkgdir"/usr/lib/$pkgname/chrome-sandbox || return 1
|
||||
install -Dm4755 "$builddir"/out/$_buildtype/chrome_sandbox \
|
||||
"$pkgdir"/usr/lib/$pkgname/chrome-sandbox
|
||||
|
||||
install -m644 "$builddir"/out/Release/icudtl.dat \
|
||||
"$pkgdir"/usr/lib/$pkgname/icudtl.dat || return 1
|
||||
install -m644 "$builddir"/out/$_buildtype/icudtl.dat \
|
||||
"$pkgdir"/usr/lib/$pkgname/icudtl.dat
|
||||
|
||||
for pak in out/Release/*.pak; do
|
||||
for pak in out/$_buildtype/*.pak; do
|
||||
install -Dm644 $pak \
|
||||
"$pkgdir"/usr/lib/$pkgname/${pak##*/} || return 1
|
||||
"$pkgdir"/usr/lib/$pkgname/${pak##*/}
|
||||
done
|
||||
|
||||
install -Dm755 "$srcdir"/chromium-launcher.sh \
|
||||
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh || return 1
|
||||
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh
|
||||
|
||||
cp -r out/Release/locales "$pkgdir"/usr/lib/$pkgname/ || return 1
|
||||
cp -r out/$_buildtype/locales "$pkgdir"/usr/lib/$pkgname/
|
||||
|
||||
install -Dm644 out/Release/chrome.1 \
|
||||
"$pkgdir"/usr/share/man/man1/chrome.1 || return 1
|
||||
install -Dm644 out/$_buildtype/chrome.1 \
|
||||
"$pkgdir"/usr/share/man/man1/chrome.1
|
||||
|
||||
install -Dm644 out/Release/chrome.1 \
|
||||
"$pkgdir"/usr/share/man/man1/chromium.1 || return 1
|
||||
install -Dm644 out/$_buildtype/chrome.1 \
|
||||
"$pkgdir"/usr/share/man/man1/chromium.1
|
||||
|
||||
# It is important that we name the target "chromium-browser",
|
||||
# xdg-utils expect it; bug #355517.
|
||||
mkdir -p "$pkgdir"/usr/bin || return 1
|
||||
cd "$pkgdir"/usr/bin || return 1
|
||||
ln -sf /usr/lib/$pkgname/chromium-launcher.sh \
|
||||
chromium-browser || return 1
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
cd "$pkgdir"/usr/bin
|
||||
ln -sf /usr/lib/$pkgname/chromium-launcher.sh chromium-browser
|
||||
cd "$builddir"
|
||||
|
||||
install -Dm644 "$srcdir"/chromium.conf \
|
||||
"$pkgdir"/etc/chromium/chromium.conf || return 1
|
||||
"$pkgdir"/etc/chromium/chromium.conf
|
||||
|
||||
install -Dm644 "$srcdir"/chromium.desktop \
|
||||
"$pkgdir"/usr/share/applications/chromium.desktop
|
||||
@ -347,20 +306,20 @@ package() {
|
||||
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
||||
done
|
||||
|
||||
install -Dm755 "$builddir"/out/Release/chromedriver \
|
||||
"$pkgdir"/usr/lib/$pkgname/chromedriver || return 1
|
||||
ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/ || return 1
|
||||
install -Dm755 "$builddir"/out/$_buildtype/chromedriver \
|
||||
"$pkgdir"/usr/lib/$pkgname/chromedriver
|
||||
ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
chromedriver() {
|
||||
pkgdesc="WebDriver driver for the Chromium Browser"
|
||||
mkdir -p "$subpkgdir"/usr/lib/$pkgname "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/$pkgname/chromedriver \
|
||||
"$subpkgdir"/usr/lib/$pkgname/ || return 1
|
||||
mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin || return 1
|
||||
"$subpkgdir"/usr/lib/$pkgname/
|
||||
mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin
|
||||
}
|
||||
|
||||
sha512sums="f30d54dedd43ba11321db1bcd443bb44a550ffca24ebb579727b98a15b6a3f6f598f20f0ef0889eab6820e6faacba0aa567927fd36d5ed0e61d7bd4f760e9993 chromium-59.0.3071.115.tar.xz
|
||||
sha512sums="3729c4888737824937386b73e17ffce0c8c902582e0395da20d2ea86eb179bf0edc2be0d2ea780a6fc76accdeb8967a66392bea5069c7ebb71322c750f614d61 chromium-61.0.3163.79.tar.xz
|
||||
a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h
|
||||
b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh
|
||||
f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf
|
||||
@ -368,16 +327,26 @@ e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b3
|
||||
2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys
|
||||
55921cc33d623e0751e94d4fef2ddd69afb57381da6115995b1f318e2398978b9173e80f6ffbc6e6c0c0c55a04e934e0e34a46c32e03947cc31f0f5a226e7725 chromium-widevine.patch
|
||||
05fb6d9434565a7a73f5c18d470ae600bf4afbe15d0e4a7c2770bf2596a0bd2788cdfeb37e0b566fc3d26ff2d0791b70488b2c184e3286cff5a1fa25e17582cd default-pthread-stacksize.patch
|
||||
077ad46b90305306789a833f22e263d9ada5abcd9f1cd5799782f807c6872378a2000dcc0f29e93c32393b1b305de236a814e099f401727aae29502add9cf062 fix-gn_bootstrap.patch
|
||||
88928afcc33843e17daa082435a4b88c2106b0252a202ad19f684021c027859366a0c12970700c0d1b010211eef95d295362dc6afdea1b00199dd8d2efbdcfe7 gcc6.patch
|
||||
0a15b178fadffdc31f1f7bc814b95817cbcea9dd90b1ed84f7bab2d840f36453573742bd8501d79edecfa38c0ec2147843aef03c7b2c9bcfd0e3d22b72c25c4b gn_bootstrap.patch
|
||||
902aeffaf0a755dd856a7d96c390adafd53ff23aed0a3693acc86a680d8c001f0f565f50caafd8bac4bba6f5e04011ebd9c27cda3264fd2ffc27df2803b738b1 gn_bootstrap.patch
|
||||
8fbfd67a0b6bbdf08364e810bd85b4a80dda9af73fefe3aba8010d9b33022d458a785c628515bbda9c743b8a0293d57cfe18fcc5aa2313c845c6fb948c2335f9 last-commit-position.patch
|
||||
6b4225ce8971db5a8fa86099c7399ba06509f6056772948f9a1ececaa501a7e9b19b568ea59f315cd66c8dc7869b70f363f0af9a42a0282381888da6b0b1c7a9 musl-fixes.patch
|
||||
17164a6b38409f466bd7da6bf0d4e71f3114bec38950414c924f57da6b7f536203e368100c7f3d8239ae52a8edf6f588e7b07281a71b5fc5847460da409af0e3 musl-hacks.patch
|
||||
ce8276bb35a8d72cf58868a6331e85286b350a1aad694525ebf637499819219dd4d87ab67dd3b938830a6bd3e7172fc9bcd9c8971820d0ed95c0d141867a24fe musl-sandbox.patch
|
||||
7230e468931da704d5f3e19d9ef2b123e1ac5194b1858bd9ddcf21acc6c4eb22639c13119f1243769872ab96093c8ce3b5a1167ca689fc269cf1466b6a6565f2 no-execinfo.patch
|
||||
c78e868ec5b902e5fd5febca8aaf9649bd598c747d8e260683552d29bb322e2e4cb1e71d92750e3209096e24416297396cca47a6a855b657cb7685b39d06b0f0 musl-fixes.patch
|
||||
507a8db2317f1f6ec18dec6cb5894b716e9b2542b58887bab9319bc6d4c66fe4a4d09b200ca8e3f11b32e380b282442a27e7a1b358d3c25eef0fa7655e9dc134 musl-hacks.patch
|
||||
c38e3e30512f6f5d494bcd905b314dea52e09214f8fc779b66193f5eb3af8f1afb5cdf2d096aa4590e6a1dd28c289d26812d7268abf4459209fb8bdc8806a0be musl-libc++.patch
|
||||
9b75d6ac720d1b8ddc597f0f472bc400ff866a733f12b3a4cd3e7e18e724549c5f8e056c7e0d0462ef083bff5e677f8cef6b89b22f4740a40ad6398978269373 musl-sandbox.patch
|
||||
fe2cee01d07e5dc638dad0c5453397eb03e30867c1e54591d7f612034366c96ccaa35216d2bcedbe796863eeb5b90dcf71c75e5391c266df4cb27b44e59bb040 no-execinfo.patch
|
||||
a57858e45cfbb7e97f77b3b308502e377543d61d3d0085798ed73bc53da456828f5e010308d0de05fee4fe52071362d074f5af205f98f41d67222d997857d626 no-getcontext.patch
|
||||
bd3645eb466e7bb3696fec5e71782b5db0a6ae7a0cca5c8e58781d9a29432cbbbea70129038726ad93b9d2332a66e8b99797ff481765314c20647c54a37a5c59 no-mallinfo.patch
|
||||
d60407a8faadfd2a8294570163b4d1b1112c8a70a6f8e778fc3aff25d20613a2e26c66cd87e69c54953cc1b984e4038015ad04797b0495df13932541b05398fe resolver.patch
|
||||
7a3a4ba4479a22a13126a78ad3d9991188ef030389026c4293d45b4440711751d68e43d28687653d5670d7f00ed5f1b820a8df50a3a08ce06e454f0cad9dbd3c no-mallinfo.patch
|
||||
ac0c9d7780ac897ea8ad5d909616d3aa29eed720353c7a660c850ee1404c80f51f5db274b3c5d3c730561a7c3cd138624e1901ece329926b5dc5ca15195d9abf resolver.patch
|
||||
27dd7916be3324294a0a913c43c856e9c00be767a2aec4f3da2455fb84e74ebb0017d1aa586b40dd9d989ada6b60fc531522f503d57e04324726a2171bf3a85e unset-madv_free.patch
|
||||
6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch"
|
||||
6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch
|
||||
67eea8e13c85aca7db5c85f5b0d33e5798e8063ab7f5b2f0a5c7f6fee8266e58bee4e72f4542472ef6634634ca0f4359a2d1113fa310a991373404320c784730 secure_getenv.patch
|
||||
0d6935117e3531a33aab5d09093e854c7e82e799340222cd75e3a1d7e054fbe02524f59c56d01a36649da5c89042a6ce7af2313917d3d5a3947ee7c890b99ba6 gcc-fixes.patch
|
||||
aa44cbc1857f407d897fba8c64faa6401aa9c30f4de0a6c79e0fb63086b0ee518e411335a53c0bd75c3023f3f064aff57270a47ffe4f8f31c251aa318570e0c2 fix-atk.patch
|
||||
2e9496aa9ccd6fed2d0df4b659d55e87abb67b1be4e3cc7cb0483ccb458b9071bed9939132a2345bf15192b4dcfe5da9474d7f653ae2f4b4d46d2f3c032b3a3f chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
|
||||
197ca3fd315e15c3e0b796615afbd01f65e2040027a2cde6304dea500cfaf18372ce2be88f4030bcd26651b913dd4af741a4df8803cdf9ff062a8eef9ab6c5db chromium-60.0.3112.78-gn-system.patch
|
||||
e9fcc976d2ac1b2e73d310790e76dae15111e78cd8e3efa5febd702fd9492d7d68b1b57d95bca88d5e16c0627594a00ebdeaf570df52be6e9b23a4212906c141 chromium-60.0.3112.78-jpeg-nomangle.patch
|
||||
9b08e895826fdd14fd6334662b8d07807beabab7368f3fcff3fcebe76baba4c7714c55042b379da6dab1ea0b1c4e5d657bf972b644089f00b418b7c2f5b6ef1b chromium-60.0.3112.78-no-libpng-prefix.patch
|
||||
87a0c6ff4906f0c4b6f6b471ec9bf0b2e2d28431122e99a68f957474cf27ec6b073ebca14660c8858817219521d74a184b8444cf2885db21d28fa4599fcaa66f chromium-60.0.3112.78-no-zlib-mangle.patch
|
||||
b39701c208d2786cc4b68ea033807a8663358173442ce0884dbfdebaa4b784d3eae8d7c1fe96c71ce8919fea35c50e1951c6a12193c23ae3e520604b3374ca38 chromium-61.0.3163.79-gcc5-r1.patch
|
||||
3820f10d6c857d2727bcb862745d4f00b217c585e7a19db56c390c3331939fdf22bee758c3ccfb4b360d75a1c05b65e3406fd27a23d69492f86d907830223063 chromium-61.0.3163.79-gtk2fix.patch"
|
||||
|
@ -0,0 +1,15 @@
|
||||
diff -up chromium-48.0.2564.116/device/usb/usb_context.cc.modern-libusbx chromium-48.0.2564.116/device/usb/usb_context.cc
|
||||
--- device/usb/usb_context.cc.modern-libusbx 2016-02-24 10:21:10.534996028 -0500
|
||||
+++ device/usb/usb_context.cc 2016-02-24 10:22:28.270499864 -0500
|
||||
@@ -57,7 +57,11 @@ void UsbContext::UsbEventHandler::Run()
|
||||
|
||||
void UsbContext::UsbEventHandler::Stop() {
|
||||
base::subtle::Release_Store(&running_, 0);
|
||||
+#ifdef LIBUSB_API_VERSION >= 0x01000105
|
||||
+ libusb_interrupt_event_handler(context_);
|
||||
+#else
|
||||
libusb_interrupt_handle_event(context_);
|
||||
+#endif
|
||||
}
|
||||
|
||||
UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
|
221
community/chromium/chromium-60.0.3112.78-gn-system.patch
Normal file
221
community/chromium/chromium-60.0.3112.78-gn-system.patch
Normal file
@ -0,0 +1,221 @@
|
||||
diff -up chromium-60.0.3112.78/build/linux/unbundle/libjpeg.gn.gnsystem chromium-60.0.3112.78/build/linux/unbundle/libjpeg.gn
|
||||
--- build/linux/unbundle/libjpeg.gn.gnsystem 2017-07-25 15:04:48.000000000 -0400
|
||||
+++ build/linux/unbundle/libjpeg.gn 2017-07-31 10:38:25.879951641 -0400
|
||||
@@ -16,6 +16,10 @@ source_set("libjpeg") {
|
||||
libs = [ "jpeg" ]
|
||||
}
|
||||
|
||||
+config("system_libjpeg") {
|
||||
+ defines = [ "USE_SYSTEM_LIBJPEG=1" ]
|
||||
+}
|
||||
+
|
||||
source_set("simd") {
|
||||
}
|
||||
|
||||
diff -up chromium-60.0.3112.78/build/linux/unbundle/libusb.gn.gnsystem chromium-60.0.3112.78/build/linux/unbundle/libusb.gn
|
||||
--- build/linux/unbundle/libusb.gn.gnsystem 2017-07-31 10:38:25.880951622 -0400
|
||||
+++ build/linux/unbundle/libusb.gn 2017-07-31 10:38:25.879951641 -0400
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libusb") {
|
||||
+ packages = [ "libusb-1.0" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libusb_shim") {
|
||||
+ root_path = "src/libusb"
|
||||
+ headers = [
|
||||
+ "libusb.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("libusb") {
|
||||
+ deps = [
|
||||
+ ":libusb_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_libusb" ]
|
||||
+}
|
||||
diff -up chromium-60.0.3112.78/build/linux/unbundle/opus.gn.gnsystem chromium-60.0.3112.78/build/linux/unbundle/opus.gn
|
||||
--- build/linux/unbundle/opus.gn.gnsystem 2017-07-25 15:04:48.000000000 -0400
|
||||
+++ build/linux/unbundle/opus.gn 2017-07-31 10:38:25.880951622 -0400
|
||||
@@ -1,3 +1,164 @@
|
||||
+# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+import("//testing/test.gni")
|
||||
+
|
||||
+pkg_config("system_opus") {
|
||||
+ packages = [ "opus" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("opus_shim") {
|
||||
+ root_path = "src/include"
|
||||
+ headers = [
|
||||
+ "opus_custom.h",
|
||||
+ "opus_defines.h",
|
||||
+ "opus_multistream.h",
|
||||
+ "opus_types.h",
|
||||
+ "opus.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("opus") {
|
||||
+ deps = [
|
||||
+ ":opus_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_opus" ]
|
||||
+}
|
||||
+
|
||||
+config("opus_test_config") {
|
||||
+ include_dirs = [
|
||||
+ "src/celt",
|
||||
+ "src/silk",
|
||||
+ ]
|
||||
+
|
||||
+ if (is_win) {
|
||||
+ defines = [ "inline=__inline" ]
|
||||
+ }
|
||||
+ if (is_android) {
|
||||
+ libs = [ "log" ]
|
||||
+ }
|
||||
+ if (is_clang) {
|
||||
+ cflags = [ "-Wno-absolute-value" ]
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+executable("opus_compare") {
|
||||
+ sources = [
|
||||
+ "src/src/opus_compare.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ "//build/config/sanitizers:deps",
|
||||
+ "//build/win:default_exe_manifest",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+executable("opus_demo") {
|
||||
+ sources = [
|
||||
+ "src/src/opus_demo.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ "//build/config/sanitizers:deps",
|
||||
+ "//build/win:default_exe_manifest",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+test("test_opus_api") {
|
||||
+ sources = [
|
||||
+ "src/tests/test_opus_api.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+test("test_opus_encode") {
|
||||
+ sources = [
|
||||
+ "src/tests/test_opus_encode.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+# GN orders flags on a target before flags from configs. The default config
|
||||
+# adds -Wall, and this flag have to be after -Wall -- so they need to
|
||||
+# come from a config and can't be on the target directly.
|
||||
+config("test_opus_decode_config") {
|
||||
+ # test_opus_decode passes a null pointer to opus_decode() for an argument
|
||||
+ # marked as requiring a non-null value by the nonnull function attribute,
|
||||
+ # and expects opus_decode() to fail. Disable the -Wnonnull option to avoid
|
||||
+ # a compilation error if -Werror is specified.
|
||||
+ if (is_posix) {
|
||||
+ cflags = [ "-Wno-nonnull" ]
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+test("test_opus_decode") {
|
||||
+ sources = [
|
||||
+ "src/tests/test_opus_decode.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ":test_opus_decode_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+test("test_opus_padding") {
|
||||
+ sources = [
|
||||
+ "src/tests/test_opus_padding.c",
|
||||
+ ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:no_chromium_code",
|
||||
+ ":opus_test_config",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":opus",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
# Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
diff -up chromium-60.0.3112.78/build/linux/unbundle/replace_gn_files.py.gnsystem chromium-60.0.3112.78/build/linux/unbundle/replace_gn_files.py
|
||||
--- build/linux/unbundle/replace_gn_files.py.gnsystem 2017-07-31 10:38:25.880951622 -0400
|
||||
+++ build/linux/unbundle/replace_gn_files.py 2017-07-31 10:39:58.067159914 -0400
|
||||
@@ -26,6 +26,7 @@ REPLACEMENTS = {
|
||||
'libevent': 'base/third_party/libevent/BUILD.gn',
|
||||
'libjpeg': 'build/secondary/third_party/libjpeg_turbo/BUILD.gn',
|
||||
'libpng': 'third_party/libpng/BUILD.gn',
|
||||
+ 'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libvpx': 'third_party/libvpx/BUILD.gn',
|
||||
'libwebp': 'third_party/libwebp/BUILD.gn',
|
||||
'libxml': 'third_party/libxml/BUILD.gn',
|
14
community/chromium/chromium-60.0.3112.78-jpeg-nomangle.patch
Normal file
14
community/chromium/chromium-60.0.3112.78-jpeg-nomangle.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -up chromium-60.0.3112.78/third_party/libjpeg_turbo/jpeglib.h.nomangle chromium-60.0.3112.78/third_party/libjpeg_turbo/jpeglib.h
|
||||
--- chromium-60.0.3112.78/third_party/libjpeg_turbo/jpeglib.h.nomangle 2017-08-01 15:29:00.870759406 -0400
|
||||
+++ third_party/libjpeg_turbo/jpeglib.h 2017-08-01 15:29:09.326593414 -0400
|
||||
@@ -18,10 +18,6 @@
|
||||
#ifndef JPEGLIB_H
|
||||
#define JPEGLIB_H
|
||||
|
||||
-/* Begin chromium edits */
|
||||
-#include "jpeglibmangler.h"
|
||||
-/* End chromium edits */
|
||||
-
|
||||
/*
|
||||
* First we include the configuration files that record how this
|
||||
* installation of the JPEG library is set up. jconfig.h can be
|
@ -0,0 +1,17 @@
|
||||
diff -up chromium-60.0.3112.78/third_party/libpng/pnglibconf.h.noprefix chromium-60.0.3112.78/third_party/libpng/pnglibconf.h
|
||||
--- chromium-60.0.3112.78/third_party/libpng/pnglibconf.h.noprefix 2017-08-01 14:42:54.321986758 -0400
|
||||
+++ third_party/libpng/pnglibconf.h 2017-08-01 14:43:01.493845832 -0400
|
||||
@@ -225,13 +225,4 @@
|
||||
#define PNG_USER_CHUNK_MALLOC_MAX 4000000L
|
||||
/* end of chromium settings */
|
||||
|
||||
-/* chromium prefixing */
|
||||
-/*
|
||||
- * This is necessary to build multiple copies of libpng. We need this while pdfium builds
|
||||
- * its own copy of libpng.
|
||||
- */
|
||||
-#define PNG_PREFIX
|
||||
-#include "pngprefix.h"
|
||||
-/* end of chromium prefixing */
|
||||
-
|
||||
#endif /* PNGLCONF_H */
|
@ -0,0 +1,13 @@
|
||||
diff -up chromium-60.0.3112.78/third_party/zlib/zconf.h.nozmangle chromium-60.0.3112.78/third_party/zlib/zconf.h
|
||||
--- chromium-60.0.3112.78/third_party/zlib/zconf.h.nozmangle 2017-08-04 10:45:17.509152089 -0400
|
||||
+++ third_party/zlib/zconf.h 2017-08-04 10:45:30.451902380 -0400
|
||||
@@ -8,9 +8,6 @@
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
-/* This include does prefixing as below, but with an updated set of names */
|
||||
-#include "names.h"
|
||||
-
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
67
community/chromium/chromium-61.0.3163.79-gcc5-r1.patch
Normal file
67
community/chromium/chromium-61.0.3163.79-gcc5-r1.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff -up chromium-61.0.3163.79/chrome/browser/devtools/devtools_file_system_indexer.cc.gcc5fix chromium-61.0.3163.79/chrome/browser/devtools/devtools_file_system_indexer.cc
|
||||
--- chrome/browser/devtools/devtools_file_system_indexer.cc.gcc5fix 2017-09-06 16:32:34.496782451 -0400
|
||||
+++ chrome/browser/devtools/devtools_file_system_indexer.cc 2017-09-06 16:33:22.053865242 -0400
|
||||
@@ -34,7 +34,6 @@ using base::TimeDelta;
|
||||
using base::TimeTicks;
|
||||
using content::BrowserThread;
|
||||
using std::map;
|
||||
-using std::set;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
@@ -191,7 +190,7 @@ vector<FilePath> Index::Search(const str
|
||||
if (trigram != kUndefinedTrigram)
|
||||
trigrams.push_back(trigram);
|
||||
}
|
||||
- set<FileId> file_ids;
|
||||
+ std::set<FileId> file_ids;
|
||||
bool first = true;
|
||||
vector<Trigram>::const_iterator it = trigrams.begin();
|
||||
for (; it != trigrams.end(); ++it) {
|
||||
@@ -203,7 +202,7 @@ vector<FilePath> Index::Search(const str
|
||||
first = false;
|
||||
continue;
|
||||
}
|
||||
- set<FileId> intersection = base::STLSetIntersection<set<FileId> >(
|
||||
+ std::set<FileId> intersection = base::STLSetIntersection<std::set<FileId> >(
|
||||
file_ids, index_[trigram]);
|
||||
file_ids.swap(intersection);
|
||||
}
|
||||
diff -up chromium-61.0.3163.79/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h.gcc5fix chromium-61.0.3163.79/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
|
||||
--- third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h.gcc5fix 2017-09-06 16:33:35.213611900 -0400
|
||||
+++ third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h 2017-09-06 16:34:34.471469606 -0400
|
||||
@@ -63,7 +63,7 @@ class WTF_EXPORT ArrayBufferContents {
|
||||
allocation_length_(0),
|
||||
data_(data),
|
||||
data_length_(0),
|
||||
- kind_(AllocationKind::kNormal),
|
||||
+ kind_(WTF::ArrayBufferContents::AllocationKind::kNormal),
|
||||
deleter_(deleter) {}
|
||||
DataHandle(void* allocation_base,
|
||||
size_t allocation_length,
|
||||
@@ -94,11 +94,11 @@ class WTF_EXPORT ArrayBufferContents {
|
||||
reinterpret_cast<uintptr_t>(allocation_base_) +
|
||||
allocation_length_);
|
||||
switch (kind_) {
|
||||
- case AllocationKind::kNormal:
|
||||
+ case WTF::ArrayBufferContents::AllocationKind::kNormal:
|
||||
DCHECK(deleter_);
|
||||
deleter_(data_);
|
||||
return;
|
||||
- case AllocationKind::kReservation:
|
||||
+ case WTF::ArrayBufferContents::AllocationKind::kReservation:
|
||||
ReleaseReservedMemory(allocation_base_, allocation_length_);
|
||||
return;
|
||||
}
|
||||
diff -up chromium-61.0.3163.79/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5fix chromium-61.0.3163.79/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
|
||||
--- third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5fix 2017-09-06 16:34:51.959131969 -0400
|
||||
+++ third_party/webrtc/modules/audio_processing/aec3/aec_state.cc 2017-09-06 16:35:03.027919336 -0400
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/audio_processing/aec3/aec_state.h"
|
||||
|
||||
-#include <math.h>
|
||||
+#include <cmath>
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
23
community/chromium/chromium-61.0.3163.79-gtk2fix.patch
Normal file
23
community/chromium/chromium-61.0.3163.79-gtk2fix.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -up chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc.gtk2fix chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
--- chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc.gtk2fix 2017-09-07 15:40:40.904966476 -0400
|
||||
+++ chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 15:42:23.829987464 -0400
|
||||
@@ -1052,11 +1052,19 @@ float GtkUi::GetRawDeviceScaleFactor() {
|
||||
if (display::Display::HasForceDeviceScaleFactor())
|
||||
return display::Display::GetForcedDeviceScaleFactor();
|
||||
|
||||
+#if GTK_MAJOR_VERSION == 2
|
||||
+ GtkSettings* gtk_settings = gtk_settings_get_default();
|
||||
+ gint gtk_dpi = -1;
|
||||
+ g_object_get(gtk_settings, "gtk-xft-dpi", >k_dpi, nullptr);
|
||||
+ const float scale_factor = gtk_dpi / (1024 * kDefaultDPI);
|
||||
+#else
|
||||
GdkScreen* screen = gdk_screen_get_default();
|
||||
gint scale = gtk_widget_get_scale_factor(fake_window_);
|
||||
gdouble resolution = gdk_screen_get_resolution(screen);
|
||||
const float scale_factor =
|
||||
resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
+#endif
|
||||
+
|
||||
// Blacklist scaling factors <120% (crbug.com/484400) and round
|
||||
// to 1 decimal to prevent rendering problems (crbug.com/485183).
|
||||
return scale_factor < 1.2f ? 1.0f : roundf(scale_factor * 10) / 10;
|
12
community/chromium/fix-atk.patch
Normal file
12
community/chromium/fix-atk.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up chromium-61.0.3163.79/content/browser/accessibility/browser_accessibility_auralinux.cc.fixvarname chromium-61.0.3163.79/content/browser/accessibility/browser_accessibility_auralinux.cc
|
||||
--- content/browser/accessibility/browser_accessibility_auralinux.cc.fixvarname 2017-09-08 13:36:14.985804754 -0400
|
||||
+++ content/browser/accessibility/browser_accessibility_auralinux.cc 2017-09-08 13:36:25.050611274 -0400
|
||||
@@ -571,7 +571,7 @@ static AtkStateSet* browser_accessibilit
|
||||
// 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;
|
@ -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',
|
48
community/chromium/gcc-fixes.patch
Normal file
48
community/chromium/gcc-fixes.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff -up chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h.fixgccagain chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h
|
||||
--- chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h.fixgccagain 2017-09-06 15:48:27.560803028 -0400
|
||||
+++ base/numerics/safe_math_clang_gcc_impl.h 2017-09-06 15:50:08.715853695 -0400
|
||||
@@ -126,6 +126,7 @@ struct ClampedAddFastOp {
|
||||
}
|
||||
};
|
||||
|
||||
+#if defined(__clang__) // Not supported on GCC.
|
||||
// This is the fastest negation on Intel, and a decent fallback on arm.
|
||||
__attribute__((always_inline)) inline int8_t ClampedNegate(uint8_t value) {
|
||||
uint8_t carry;
|
||||
@@ -169,6 +170,7 @@ __attribute__((always_inline)) inline in
|
||||
__attribute__((always_inline)) inline int64_t ClampedNegate(int64_t value) {
|
||||
return ClampedNegate(static_cast<uint64_t>(value));
|
||||
}
|
||||
+#endif
|
||||
|
||||
template <typename T, typename U>
|
||||
struct ClampedSubFastOp {
|
||||
@@ -180,6 +182,7 @@ struct ClampedSubFastOp {
|
||||
return ClampedSubFastAsmOp<T, U>::template Do<V>(x, y);
|
||||
}
|
||||
|
||||
+#if defined(__clang__) // Not supported on GCC.
|
||||
// Fast path for generic clamped negation.
|
||||
if (std::is_same<T, U>::value && std::is_same<U, V>::value &&
|
||||
IsCompileTimeConstant(x) && x == 0 && !IsCompileTimeConstant(y)) {
|
||||
@@ -190,6 +193,7 @@ struct ClampedSubFastOp {
|
||||
IntegerBitsPlusSign<T>::value, std::is_signed<T>::value>::type>(
|
||||
y));
|
||||
}
|
||||
+#endif
|
||||
|
||||
V result;
|
||||
return !__builtin_sub_overflow(x, y, &result)
|
||||
diff -up chromium-61.0.3163.79/base/numerics/safe_math_shared_impl.h.fixgcc3 chromium-61.0.3163.79/base/numerics/safe_math_shared_impl.h
|
||||
--- base/numerics/safe_math_shared_impl.h.fixgcc3 2017-09-06 16:30:15.898454585 -0400
|
||||
+++ base/numerics/safe_math_shared_impl.h 2017-09-06 16:30:27.570229539 -0400
|
||||
@@ -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
|
@ -1,15 +1,33 @@
|
||||
--- 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 @@
|
||||
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
|
||||
index 1390560..5ce7832 100755
|
||||
--- tools/gn/bootstrap/bootstrap.py
|
||||
+++ tools/gn/bootstrap/bootstrap.py
|
||||
@@ -20,6 +20,7 @@ import errno
|
||||
import logging
|
||||
import optparse
|
||||
import os
|
||||
+import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -31,6 +32,7 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT))
|
||||
|
||||
is_win = sys.platform.startswith('win')
|
||||
is_linux = sys.platform.startswith('linux')
|
||||
+is_gnu_linux = is_linux and platform.libc_ver()[0].startswith('glibc')
|
||||
is_mac = sys.platform.startswith('darwin')
|
||||
is_aix = sys.platform.startswith('aix')
|
||||
is_posix = is_linux or is_mac or is_aix
|
||||
@@ -167,7 +169,7 @@ def build_gn_with_ninja_manually(tempdir, options):
|
||||
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': 'true' if is_gnu_linux else 'false'})
|
||||
|
||||
write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
|
||||
{'ENABLE_PROFILING': 'false'})
|
||||
@@ -366,8 +366,6 @@
|
||||
{
|
||||
@@ -395,8 +397,6 @@ def write_gn_ninja(path, root_gen_dir, options):
|
||||
'base/third_party/superfasthash/superfasthash.c',
|
||||
])
|
||||
static_libraries['base']['sources'].extend([
|
||||
@ -18,80 +36,36 @@
|
||||
'base/at_exit.cc',
|
||||
'base/base_paths.cc',
|
||||
'base/base_switches.cc',
|
||||
@@ -541,29 +539,9 @@
|
||||
'base/time/time_posix.cc',
|
||||
'base/trace_event/heap_profiler_allocation_register_posix.cc',
|
||||
@@ -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',
|
||||
@@ -653,10 +654,11 @@ def write_gn_ninja(path, root_gen_dir, options):
|
||||
'base/threading/platform_thread_linux.cc',
|
||||
])
|
||||
- static_libraries['libevent'] = {
|
||||
- 'sources': [
|
||||
- 'base/third_party/libevent/buffer.c',
|
||||
- 'base/third_party/libevent/evbuffer.c',
|
||||
- 'base/third_party/libevent/evdns.c',
|
||||
- 'base/third_party/libevent/event.c',
|
||||
- 'base/third_party/libevent/event_tagging.c',
|
||||
- 'base/third_party/libevent/evrpc.c',
|
||||
- 'base/third_party/libevent/evutil.c',
|
||||
- 'base/third_party/libevent/http.c',
|
||||
- 'base/third_party/libevent/log.c',
|
||||
- 'base/third_party/libevent/poll.c',
|
||||
- 'base/third_party/libevent/select.c',
|
||||
- 'base/third_party/libevent/signal.c',
|
||||
- 'base/third_party/libevent/strlcpy.c',
|
||||
- ],
|
||||
- 'tool': 'cc',
|
||||
- 'include_dirs': [],
|
||||
- 'cflags': cflags + ['-DHAVE_CONFIG_H'],
|
||||
- }
|
||||
|
||||
if is_linux:
|
||||
- libs.extend(['-lrt', '-latomic'])
|
||||
+ libs.extend(['-lrt', '-levent'])
|
||||
ldflags.extend(['-pthread'])
|
||||
|
||||
static_libraries['xdg_user_dirs'] = {
|
||||
@@ -573,8 +551,6 @@
|
||||
'tool': 'cxx',
|
||||
}
|
||||
static_libraries['base']['sources'].extend([
|
||||
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:
|
||||
--- 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 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
-#include "base/third_party/libevent/event.h"
|
||||
+#include "event.h"
|
||||
#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 {
|
||||
- ])
|
||||
+ if is_gnu_linux:
|
||||
+ static_libraries['base']['sources'].extend([
|
||||
+ 'base/allocator/allocator_shim.cc',
|
||||
+ 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
|
||||
+ ])
|
||||
libs.extend(['-lrt', '-latomic'])
|
||||
static_libraries['libevent']['include_dirs'].extend([
|
||||
os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
|
||||
|
@ -105,17 +105,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,19 +115,22 @@
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
--- ./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
|
||||
index 9067e84..1c47b2a 100644
|
||||
--- 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 <gnu/libc-version.h>
|
||||
+#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)
|
||||
@ -146,24 +138,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 @@
|
||||
@ -174,17 +148,6 @@
|
||||
|
||||
#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
|
||||
@ -197,23 +160,59 @@ index a80ea16..55a2abf 100644
|
||||
#include <arpa/inet.h>
|
||||
#include <stdint.h>
|
||||
#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__) || OS(ANDROID) || OS(FREEBSD)
|
||||
+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD)
|
||||
-#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).
|
||||
// If so, a conservative size estimate is returned.
|
||||
@@ -95,7 +95,7 @@
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
void* GetStackStart() {
|
||||
-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
|
||||
+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD)
|
||||
-#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;
|
||||
#if OS(FREEBSD)
|
||||
--- ./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 {
|
||||
|
@ -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();
|
||||
|
68
community/chromium/musl-libc++.patch
Normal file
68
community/chromium/musl-libc++.patch
Normal file
@ -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<char>::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<char>::mask*
|
||||
@@ -1136,12 +1136,10 @@ ctype<char>::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<char>::classic_table() is not implemented
|
||||
- printf("ctype<char>::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) {
|
@ -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:
|
||||
|
@ -1,97 +1,95 @@
|
||||
--- base/debug/stack_trace_posix.cc.orig
|
||||
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
|
||||
index 7696be8..20ebe67 100644
|
||||
--- a/base/debug/stack_trace_posix.cc
|
||||
+++ base/debug/stack_trace_posix.cc
|
||||
@@ -26,7 +26,7 @@
|
||||
#if !defined(USE_SYMBOLIZE)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
-#if !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
@@ -82,7 +82,7 @@ void DemangleSymbols(std::string* text) {
|
||||
// Note: code in this function is NOT async-signal safe (std::string uses
|
||||
// malloc internally).
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
|
||||
std::string::size_type search_from = 0;
|
||||
while (search_from < text->size()) {
|
||||
@@ -116,7 +116,7 @@
|
||||
search_from = mangled_start + 2;
|
||||
}
|
||||
}
|
||||
-#endif // !defined(__UCLIBC__)
|
||||
+#endif // defined(__GLIBC__)
|
||||
}
|
||||
#endif // !defined(USE_SYMBOLIZE)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
// Look for the start of a mangled symbol, from search_from.
|
||||
@@ -129,7 +129,7 @@ class BacktraceOutputHandler {
|
||||
virtual ~BacktraceOutputHandler() {}
|
||||
};
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
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 @@
|
||||
}
|
||||
#endif // defined(USE_SYMBOLIZE)
|
||||
}
|
||||
-#endif // !defined(__UCLIBC__)
|
||||
+#endif // defined(__GLIBC__)
|
||||
@@ -705,6 +705,10 @@ class SandboxSymbolizeHelper {
|
||||
} // namespace
|
||||
|
||||
void PrintToStderr(const char* output) {
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
@@ -722,7 +722,7 @@
|
||||
bool EnableInProcessStackDumping() {
|
||||
+#if defined(OS_LINUX) && !defined(__GLIBC__)
|
||||
+// let system handler deal with the dumps
|
||||
+ return true;
|
||||
+#else
|
||||
#if defined(USE_SYMBOLIZE)
|
||||
SandboxSymbolizeHelper::GetInstance();
|
||||
#endif // USE_SYMBOLIZE
|
||||
@@ -738,6 +742,7 @@ bool EnableInProcessStackDumping() {
|
||||
#endif // !defined(OS_LINUX)
|
||||
|
||||
return success;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SetStackDumpFirstChanceCallback(bool (*handler)(int, void*, void*)) {
|
||||
@@ -749,7 +754,7 @@ StackTrace::StackTrace(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__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
count = std::min(arraysize(trace_), count);
|
||||
|
||||
// Though the backtrace API man page does not list any possible negative
|
||||
@@ -737,13 +737,13 @@
|
||||
@@ -764,13 +769,13 @@ void StackTrace::Print() 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__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
PrintBacktraceOutputHandler handler;
|
||||
ProcessBacktrace(trace_, count_, &handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__)
|
||||
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
|
||||
diff --git a/third_party/WebKit/Source/platform/wtf/Assertions.cpp b/third_party/WebKit/Source/platform/wtf/Assertions.cpp
|
||||
index 9bdece7..0c76188 100644
|
||||
--- a/third_party/WebKit/Source/platform/wtf/Assertions.cpp
|
||||
+++ third_party/WebKit/Source/platform/wtf/Assertions.cpp
|
||||
@@ -60,7 +60,7 @@
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <windows.h>
|
||||
#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 <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
#include <execinfo.h>
|
||||
@@ -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
|
||||
diff --git a/third_party/webrtc/rtc_base/checks.cc b/third_party/webrtc/rtc_base/checks.cc
|
||||
index 533240f..08b3f3e 100644
|
||||
--- a/third_party/webrtc/rtc_base/checks.cc
|
||||
+++ third_party/webrtc/rtc_base/checks.cc
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
@ -101,7 +99,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
@@ -55,7 +55,7 @@ void PrintError(const char* format, ...)
|
||||
@@ -60,7 +60,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() {
|
||||
|
@ -1,14 +1,3 @@
|
||||
--- 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 {
|
||||
@ -20,64 +9,35 @@
|
||||
size_t GetMemoryUsageKB() {
|
||||
struct mallinfo minfo = mallinfo();
|
||||
uint64_t mem_usage =
|
||||
--- content/renderer/render_thread_impl.cc.orig
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -1699,6 +1699,49 @@
|
||||
}
|
||||
--- 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);
|
||||
|
||||
} // 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
|
||||
|
||||
bool RenderThreadImpl::GetRendererMemoryMetrics(
|
||||
@@ -1719,7 +1762,7 @@
|
||||
blink_stats.partition_alloc_total_allocated_bytes / 1024;
|
||||
memory_metrics->blink_gc_kb =
|
||||
blink_stats.blink_gc_total_allocated_bytes / 1024;
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) && defined(__GLIBC__) || defined(OS_ANDROID)
|
||||
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)
|
||||
size_t malloc_usage = minfo.uordblks;
|
||||
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
|
||||
|
@ -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 <resolv.h>
|
||||
|
||||
--- ./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);
|
||||
|
38
community/chromium/secure_getenv.patch
Normal file
38
community/chromium/secure_getenv.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/third_party/angle/src/vulkan_support/BUILD.gn b/third_party/angle/src/vulkan_support/BUILD.gn
|
||||
index 51c8c10..fb70649 100644
|
||||
--- third_party/angle/src/vulkan_support/BUILD.gn
|
||||
+++ third_party/angle/src/vulkan_support/BUILD.gn
|
||||
@@ -204,8 +204,8 @@ config("vulkan_loader_config") {
|
||||
cflags = [ "/wd4201" ]
|
||||
}
|
||||
if (is_linux) {
|
||||
- # assume secure_getenv() is available
|
||||
- defines += [ "HAVE_SECURE_GETENV" ]
|
||||
+ # assume getauxval() is available
|
||||
+ defines += [ "HAVE_GETAUXVAL" ]
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/third_party/vulkan-validation-layers/src/loader/loader.c b/third_party/vulkan-validation-layers/src/loader/loader.c
|
||||
index facddc1..b6a8ee9 100644
|
||||
--- third_party/vulkan-validation-layers/src/loader/loader.c
|
||||
+++ third_party/vulkan-validation-layers/src/loader/loader.c
|
||||
@@ -31,6 +31,9 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
+#if defined(HAVE_GETAUXVAL)
|
||||
+#include <sys/auxv.h>
|
||||
+#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if defined(_WIN32)
|
||||
@@ -218,6 +221,8 @@ static inline char *loader_secure_getenv(const char *name, const struct loader_i
|
||||
return secure_getenv(name);
|
||||
#elif defined(HAVE___SECURE_GETENV)
|
||||
return __secure_getenv(name);
|
||||
+#elif defined(HAVE_GETAUXVAL)
|
||||
+ return getauxval(AT_SECURE) ? NULL : getenv(name);
|
||||
#else
|
||||
#pragma message("Warning: Falling back to non-secure getenv for environmental lookups! Consider" \
|
||||
" updating to a different libc.")
|
Loading…
Reference in New Issue
Block a user