Skip to content

Commit c701567

Browse files
authored
chromium-stable: dummy hid service (#32)
[skip ci]
1 parent ecfdd47 commit c701567

File tree

3 files changed

+169
-5
lines changed

3 files changed

+169
-5
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
https://github.com/chromium/chromium/commit/75fc93ec9b3a5c7398f80119cd28b5736ae609f2
2+
https://github.com/chromium/chromium/commit/9f16b9e9b8cb1ea47de33b6c491c55c69d410620
3+
https://github.com/chromium/chromium/commit/ec95ddd5c8ab54fa42e817049f09696bea8166ac
4+
5+
--- a/build/install-build-deps.py
6+
+++ b/build/install-build-deps.py
7+
@@ -148,7 +148,7 @@
8+
distro_id = subprocess.check_output(["lsb_release", "--id",
9+
"--short"]).decode().strip()
10+
11+
- supported_codenames = ["bionic", "focal", "jammy", "noble"]
12+
+ supported_codenames = ["focal", "jammy", "noble"]
13+
supported_ids = ["Debian"]
14+
15+
if (distro_codename() not in supported_codenames
16+
@@ -156,11 +156,12 @@
17+
print(
18+
"WARNING: The following distributions are supported,",
19+
"but distributions not in the list below can also try to install",
20+
- "dependencies by passing the `--unsupported` parameter",
21+
- "\tUbuntu 18.04 LTS (bionic with EoL April 2028)",
22+
- "\tUbuntu 20.04 LTS (focal with EoL April 2030)",
23+
- "\tUbuntu 22.04 LTS (jammy with EoL April 2032)",
24+
- "\tUbuntu 24.04 LTS (noble with EoL June 2029)",
25+
+ "dependencies by passing the `--unsupported` parameter.",
26+
+ "EoS refers to end of standard support and does not include",
27+
+ "extended security support.",
28+
+ "\tUbuntu 20.04 LTS (focal with EoS April 2025)",
29+
+ "\tUbuntu 22.04 LTS (jammy with EoS June 2027)",
30+
+ "\tUbuntu 24.04 LTS (noble with EoS June 2029)",
31+
"\tDebian 10 (buster) or later",
32+
sep="\n",
33+
file=sys.stderr,
34+
@@ -332,7 +333,6 @@
35+
# List of required run-time libraries
36+
def lib_list():
37+
packages = [
38+
- "libasound2",
39+
"libatk1.0-0",
40+
"libatspi2.0-0",
41+
"libc6",
42+
@@ -399,7 +399,9 @@
43+
elif package_exists("libffi6"):
44+
packages.append("libffi6")
45+
46+
- if package_exists("libpng16-16"):
47+
+ if package_exists("libpng16-16t64"):
48+
+ packages.append("libpng16-16t64")
49+
+ elif package_exists("libpng16-16"):
50+
packages.append("libpng16-16")
51+
else:
52+
packages.append("libpng12-0")
53+
@@ -420,12 +422,16 @@
54+
if package_exists("libinput10"):
55+
packages.append("libinput10")
56+
57+
- # Work around for dependency On Ubuntu 24.04 LTS (noble)
58+
- if distro_codename() == "noble":
59+
+ if package_exists("libncurses6"):
60+
packages.append("libncurses6")
61+
else:
62+
packages.append("libncurses5")
63+
64+
+ if package_exists("libasound2t64"):
65+
+ packages.append("libasound2t64")
66+
+ else:
67+
+ packages.append("libasound2")
68+
+
69+
return packages
70+
71+
72+
@@ -478,8 +484,7 @@
73+
pattern = re.compile(r"g\+\+-[0-9.]+-multilib")
74+
packages += re.findall(pattern, lines)
75+
76+
- # Work around for 32-bit dependency On Ubuntu 24.04 LTS (noble)
77+
- if distro_codename() == "noble":
78+
+ if package_exists("libncurses6:i386"):
79+
packages.append("libncurses6:i386")
80+
else:
81+
packages.append("libncurses5:i386")
82+
@@ -613,37 +618,12 @@
83+
84+
# arm cross toolchain packages needed to build chrome on armhf
85+
packages = [
86+
+ "g++-arm-linux-gnueabihf",
87+
+ "gcc-arm-linux-gnueabihf",
88+
"libc6-dev-armhf-cross",
89+
"linux-libc-dev-armhf-cross",
90+
- "g++-arm-linux-gnueabihf",
91+
]
92+
93+
- # Work around for dependency issue Ubuntu: http://crbug.com/435056
94+
- if distro_codename() == "bionic":
95+
- packages.extend([
96+
- "g++-5-multilib-arm-linux-gnueabihf",
97+
- "gcc-5-multilib-arm-linux-gnueabihf",
98+
- "gcc-arm-linux-gnueabihf",
99+
- ])
100+
- elif distro_codename() == "focal":
101+
- packages.extend([
102+
- "g++-10-multilib-arm-linux-gnueabihf",
103+
- "gcc-10-multilib-arm-linux-gnueabihf",
104+
- "gcc-arm-linux-gnueabihf",
105+
- ])
106+
- elif distro_codename() == "jammy":
107+
- packages.extend([
108+
- "gcc-arm-linux-gnueabihf",
109+
- "g++-11-arm-linux-gnueabihf",
110+
- "gcc-11-arm-linux-gnueabihf",
111+
- ])
112+
- elif distro_codename() == "noble":
113+
- packages.extend([
114+
- "gcc-arm-linux-gnueabihf",
115+
- "g++-13-arm-linux-gnueabihf",
116+
- "gcc-13-arm-linux-gnueabihf",
117+
- ])
118+
-
119+
return packages
120+
121+
122+
@@ -709,12 +689,14 @@
123+
else:
124+
packages.append("libudev0:i386")
125+
126+
- # Work around for nacl dependency On Ubuntu 24.04 LTS (noble)
127+
- if distro_codename() == "noble":
128+
+ if package_exists("libncurses6:i386"):
129+
packages.append("libncurses6:i386")
130+
- packages.append("lib32ncurses-dev")
131+
else:
132+
packages.append("libncurses5:i386")
133+
+
134+
+ if package_exists("lib32ncurses-dev"):
135+
+ packages.append("lib32ncurses-dev")
136+
+ else:
137+
packages.append("lib32ncurses5-dev")
138+
139+
return packages
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- a/build/gn_run_binary.py
2+
+++ b/build/gn_run_binary.py
3+
@@ -23,7 +23,19 @@
4+
# The rest of the arguments are passed directly to the executable.
5+
args = [path] + sys.argv[2:]
6+
7+
-ret = subprocess.call(args)
8+
+# Modified by Termux: When building for termux, this wrapper will
9+
+# be used to run the binary which is built for host machine, using
10+
+# the rootfs provided by Google. We need to set LD_PRELOAD with
11+
+# libffi.so.7 as the host machine (Ubuntu 24.04) doesn't provide it.
12+
+envs = os.environ.copy()
13+
+if "./clang_x86_v8_arm/" in path or "./clang_x86/" in path:
14+
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_i386-sysroot")
15+
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/i386-linux-gnu/libffi.so.7"
16+
+elif "./host/" in path or "./clang_x64_v8_arm64/" in path or "./clang_x64/" in path:
17+
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_amd64-sysroot")
18+
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/x86_64-linux-gnu/libffi.so.7"
19+
+
20+
+ret = subprocess.call(args, env=envs)
21+
if ret != 0:
22+
if ret <= -100:
23+
# Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to

tur-chromium/chromium-stable/build.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ termux_step_configure() {
5757
# Install amd64 rootfs and deps
5858
env -i PATH="$PATH" sudo apt update
5959
env -i PATH="$PATH" sudo apt install lsb-release -yq
60-
env -i PATH="$PATH" sudo apt install libfontconfig1 libffi7 -yq
60+
env -i PATH="$PATH" sudo apt install libfontconfig1 libffi8 -yq
6161
env -i PATH="$PATH" sudo ./build/install-build-deps.sh --no-syms --no-android --no-arm --no-chromeos-fonts --no-nacl --no-prompt
6262
build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
6363
local _amd64_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'amd64-sysroot')"
@@ -109,8 +109,6 @@ termux_step_configure() {
109109
# This is needed to build cups
110110
cp -Rf $TERMUX_PREFIX/bin/cups-config usr/bin/
111111
chmod +x usr/bin/cups-config
112-
# Cherry-pick LWG3545 for NDK r26
113-
patch -p1 < $TERMUX_SCRIPTDIR/common-files/chromium-patches/sysroot-patches/libcxx-17-lwg3545.diff
114112
popd
115113
mv $TERMUX_PKG_TMPDIR/sysroot $TERMUX_PKG_CACHEDIR/sysroot-$TERMUX_ARCH
116114
fi
@@ -129,7 +127,7 @@ termux_step_configure() {
129127
_v8_toolchain_name="clang_x64_v8_arm64"
130128
elif [ "$TERMUX_ARCH" = "arm" ]; then
131129
# Install i386 rootfs and deps
132-
env -i PATH="$PATH" sudo apt install libfontconfig1:i386 libffi7:i386 -yq
130+
env -i PATH="$PATH" sudo apt install libfontconfig1:i386 libffi8:i386 -yq
133131
env -i PATH="$PATH" sudo ./build/install-build-deps.sh --lib32 --no-syms --no-android --no-arm --no-chromeos-fonts --no-nacl --no-prompt
134132
build/linux/sysroot_scripts/install-sysroot.py --arch=i386
135133
local _i386_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'i386-sysroot')"
@@ -166,7 +164,7 @@ target_rpath = \"$TERMUX_PREFIX/lib\"
166164
target_sysroot = \"$_target_sysroot\"
167165
custom_toolchain = \"//build/toolchain/linux/unbundle:default\"
168166
custom_toolchain_clang_base_path = \"$TERMUX_STANDALONE_TOOLCHAIN\"
169-
custom_toolchain_clang_version = "17"
167+
custom_toolchain_clang_version = "18"
170168
host_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:host\"
171169
v8_snapshot_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:$_v8_toolchain_name\"
172170
clang_use_chrome_plugins = false
@@ -181,6 +179,10 @@ use_custom_libcxx = false
181179
use_custom_libcxx_for_host = true
182180
use_allocator_shim = false
183181
use_partition_alloc_as_malloc = false
182+
enable_backup_ref_ptr_slow_checks = false
183+
enable_dangling_raw_ptr_checks = false
184+
enable_dangling_raw_ptr_feature_flag = false
185+
backup_ref_ptr_extra_oob_checks = false
184186
enable_backup_ref_ptr_support = false
185187
enable_pointer_compression_support = false
186188
use_nss_certs = true

0 commit comments

Comments
 (0)