]> 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)
committerSam James <sam@gentoo.org>
Thu, 31 Jul 2025 14:39:54 +0000 (15:39 +0100)
commit80f7f229883f28d11da18c75c9a97f89ce00a1ab
treef948740e867f7e856e2b5211614cc4c3701d52fb
parentb3da1801bef08c75f69f4376ffa05f1de2591ca8
[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.

(cherry picked from commit 5111ea055f5699ad47605890fb45af5c3db1de4f)
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