Skip to content

Commit a4343fe

Browse files
authored
fix: fix linux so link issue. (#733)
1 parent e3c4c3b commit a4343fe

File tree

3 files changed

+36
-15
lines changed

3 files changed

+36
-15
lines changed

webrtc-sys/libwebrtc/build_linux.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,22 @@ cd build
7575

7676
git apply "$COMMAND_DIR/patches/force_gcc.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
7777

78-
cd ../..
78+
cd ..
7979

80+
cd third_party
81+
82+
git apply "$COMMAND_DIR/patches/david_disable_gun_source_macro.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
83+
84+
cd ../..
8085

8186
mkdir -p "$ARTIFACTS_DIR/lib"
8287

8388
python3 "./src/build/linux/sysroot_scripts/install-sysroot.py" --arch="$arch"
8489

90+
if [ "$arch" = "arm64" ]; then
91+
sudo sed -i 's/__GLIBC_USE_ISOC2X[[:space:]]*1/__GLIBC_USE_ISOC2X\t0/' /usr/aarch64-linux-gnu/include/features.h
92+
fi
93+
8594
debug="false"
8695
if [ "$profile" = "debug" ]; then
8796
debug="true"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dav1d/BUILD.gn b/dav1d/BUILD.gn
2+
index 9348e15c3c..f34db7ff98 100644
3+
--- a/dav1d/BUILD.gn
4+
+++ b/dav1d/BUILD.gn
5+
@@ -101,7 +101,7 @@ if (is_win) {
6+
dav1d_copts += [ "-D_DARWIN_C_SOURCE" ]
7+
}
8+
if (is_linux || is_chromeos || is_android || current_os == "aix") {
9+
- if (!is_clang) {
10+
+ if (!is_clang && (current_cpu == "x86" || current_cpu == "x64")) {
11+
dav1d_copts += [ "-D_GNU_SOURCE" ]
12+
}
13+
}
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
diff --git a/config/c++/c++.gni b/config/c++/c++.gni
2-
index c29d898fb..5ef014e51 100644
3-
--- a/config/c++/c++.gni
4-
+++ b/config/c++/c++.gni
5-
@@ -62,7 +62,7 @@ declare_args() {
6-
# case.
7-
# We disable that on LibFuzzer builds because it breaks the libfuzzer
8-
# runtime. See crbug.com/411020147.
9-
- use_llvm_libatomic = !is_apple && !is_nacl && !use_libfuzzer
10-
+ use_llvm_libatomic = !is_apple && !is_nacl && !use_libfuzzer && !is_linux
11-
}
1+
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
2+
index fca6c9295..31b76f722 100644
3+
--- a/config/compiler/BUILD.gn
4+
+++ b/config/compiler/BUILD.gn
5+
@@ -656,6 +656,7 @@ config("compiler") {
6+
# standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
7+
# to -std=c*.
8+
standard_prefix = "gnu"
9+
+ defines += [ "_DEFAULT_SOURCE" ]
10+
}
1211

13-
if (use_implicit_libcxx_modules) {
12+
cflags_c += [ "-std=${standard_prefix}11" ]
1413
diff --git a/config/linux/BUILD.gn b/config/linux/BUILD.gn
15-
index 131bb71d1..36c86c48e 100644
14+
index 131bb71d1..a928badd0 100644
1615
--- a/config/linux/BUILD.gn
1716
+++ b/config/linux/BUILD.gn
1817
@@ -15,6 +15,7 @@ group("linux") {
1918
# is applied to all targets. It is here to separate out the logic that is
2019
# Linux-only. This is not applied to Android, but is applied to ChromeOS.
2120
config("compiler") {
22-
+ cflags_cc = [ "-Wno-changes-meaning" ]
21+
+ cflags_cc = [ "-Wno-changes-meaning", "-Wno-unknown-pragmas" ]
2322
if (current_cpu == "arm64") {
2423
import("//build/config/arm.gni")
2524
cflags = []

0 commit comments

Comments
 (0)