Skip to content

Commit c47484a

Browse files
committed
Add an optional patch to fix missing symbol link error
Similar in nature to rust-lang/rust#105967 I was getting the following at the final chrome link stage :- ld.lld: error: version script assignment of 'global' to symbol \ '__libc_csu_fini' failed: symbol not defined ld.lld: error: version script assignment of 'global' to symbol \ '__libc_csu_init' failed: symbol not defined The explanation at https://reviews.llvm.org/D140591#4014995 seems to point to my self-compiled llvm/clang perhaps lacking one or both of libcxx and libcxxabi (-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi"), which may have avoided the issue. Bundled clang users probably won't need to enable the patch.
1 parent 44056e2 commit c47484a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--- a/build/config/compiler/BUILD.gn
2+
+++ b/build/config/compiler/BUILD.gn
3+
@@ -520,6 +520,14 @@
4+
}
5+
}
6+
7+
+ if (use_lld) {
8+
+ # Workaround for missing symbol link errors similar in form to the one at
9+
+ # https://github.com/llvm/llvm-project/issues/59660 and described at
10+
+ # https://reviews.llvm.org/D140591#4014995.
11+
+ ldflags += [ "-Wl,--undefined-version" ]
12+
+ }
13+
+
14+
+
15+
# Enable text section splitting only on linux when using lld for now. Other
16+
# platforms can be added later if needed.
17+
if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {

debian/patches/series.debian

+1
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ various/vanadium/disable-article-suggestions-feature-by-default.patch
131131
#optional/system/unstable/roll-src-third_party-ffmpeg-102.patch
132132
#optional/system/unstable/roll-src-third_party-ffmpeg-106.patch
133133
#optional/system/unstable/v8-enhance-Date-parser-to-take-Unicode-SPACE.patch
134+
#optional/fix-missing-symbols.patch

0 commit comments

Comments
 (0)