Skip to content

Commit 153f632

Browse files
authored
Ignore the __tls_base undefined symbol (#498)
Currently if `-g` is specified with build flags then wasi-libc fails to build. I'm not certain why it shows up in object files, but it appears to be a spurious error so this commit adds it to the list of variables to ignore.
1 parent a3ef152 commit 153f632

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ check-symbols: startup_files libc
836836
for undef_sym in $$("$(NM)" --undefined-only "$(SYSROOT_LIB)"/libc.a "$(SYSROOT_LIB)"/libc-*.a "$(SYSROOT_LIB)"/*.o \
837837
|grep ' U ' |sed 's/.* U //' |LC_ALL=C sort |uniq); do \
838838
grep -q '\<'$$undef_sym'\>' "$(DEFINED_SYMBOLS)" || echo $$undef_sym; \
839-
done | grep -E -v "^__mul|__memory_base|__indirect_function_table" > "$(UNDEFINED_SYMBOLS)"
839+
done | grep -E -v "^__mul|__memory_base|__indirect_function_table|__tls_base" > "$(UNDEFINED_SYMBOLS)"
840840
grep '^_*imported_wasi_' "$(UNDEFINED_SYMBOLS)" \
841841
> "$(SYSROOT_LIB)/libc.imports"
842842

expected/wasm32-wasip1-threads/undefined-symbols.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ __netf2
6666
__stack_pointer
6767
__subtf3
6868
__tls_align
69-
__tls_base
7069
__tls_size
7170
__trunctfdf2
7271
__trunctfsf2

0 commit comments

Comments
 (0)