]> git.ipfire.org Git - thirdparty/gcc.git/commit
[sanitizer_common] Fix build on ppc64+musl (#120036)
authorJeff Law <jlaw@ventanamicro.com>
Fri, 27 Jun 2025 21:11:41 +0000 (15:11 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Fri, 27 Jun 2025 21:13:53 +0000 (15:13 -0600)
commit5111ea055f5699ad47605890fb45af5c3db1de4f
treee81dbf37bad1952c03084c6abe91583c4bb23ab8
parentddff83b3dde4a8308d0e156f85693e7176b85524
[sanitizer_common] Fix build on ppc64+musl (#120036)

Cherry picked from LLVM commit 801b519dfd01e21da0be17aa8f8dc2ceb0eb9e77.

In powerpc64-unknown-linux-musl, signal.h does not include asm/ptrace.h,
which causes "member access into incomplete type 'struct pt_regs'"
errors. Include the header explicitly to fix this.

Also in sanitizer_linux_libcdep.cpp, there is a usage of TlsPreTcbSize
which is not defined in such a platform. Guard the branch with macro.
libsanitizer/sanitizer_common/sanitizer_linux.cpp
libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp