Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 951539

Summary: llvm-runtimes/compiler-rt-sanitizers-20.1.0: build failure on riscv/musl
Product: Gentoo Linux Reporter: Michael Orlitzky <mjo>
Component: Current packagesAssignee: LLVM support project <llvm>
Status: CONFIRMED ---    
Severity: normal CC: me, mjo
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=945920
https://github.com/llvm/llvm-project/pull/120036
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Michael Orlitzky gentoo-dev 2025-03-18 12:58:09 UTC
Created attachment 921080 [details]
build.log

The same thing happens with gcc-15 in bug #945920, so I'm guessing sanitizer_common is shared code.

/usr/lib/llvm/20/bin/riscv64-unknown-linux-musl-clang++ -DHAVE_RPC_XDR_H=0 -I/var/lib/portage/tmp/portage/llvm-runtimes/compiler-rt-sanitizers-20.1.0/work/compiler-rt/lib/sanitizer_common/..  -DNDEBUG -O3 -pipe -mabi=lp64d -march=rv64gc -Werror=odr -Werror=strict-aliasing -flto -Wall -Wno-unused-parameter -std=c++17 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.riscv64.dir/sanitizer_linux_libcdep.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.riscv64.dir/sanitizer_linux_libcdep.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.riscv64.dir/sanitizer_linux_libcdep.cpp.o -c /var/lib/portage/tmp/portage/llvm-runtimes/compiler-rt-sanitizers-20.1.0/work/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
/var/lib/portage/tmp/portage/llvm-runtimes/compiler-rt-sanitizers-20.1.0/work/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:627:29: error: use of undeclared identifier 'TlsPreTcbSize'
  627 |   const uptr pre_tcb_size = TlsPreTcbSize();
      |                             ^
1 error generated.
Comment 1 Michael Orlitzky gentoo-dev 2025-03-18 14:49:23 UTC
Fixed by https://github.com/llvm/llvm-project/pull/120036
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-07 11:23:24 UTC
mgorny: can you cherry-pick https://github.com/llvm/llvm-project/pull/120036?