mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libsanitizer: Restore local sanitizer_redefine_builtins.h patch
The recent libsanitizer update broke the Solaris/SPARC build with the native assembler: many files don't compile any longer like /usr/bin/as: "/var/tmp//ccYsT60a.s", line 5: error: unknown opcode ".set" /usr/bin/as: "/var/tmp//ccYsT60a.s", line 5: error: statement syntax /usr/bin/as: "/var/tmp//ccYsT60a.s", line 6: error: unknown opcode ".set" /usr/bin/as: "/var/tmp//ccYsT60a.s", line 6: error: statement syntax /usr/bin/as: "/var/tmp//ccYsT60a.s", line 7: error: unknown opcode ".set" /usr/bin/as: "/var/tmp//ccYsT60a.s", line 7: error: statement syntax This happens because sanitizer_common/sanitizer_redefine_builtins.h lost a local patch that guards use of .set in asm by HAVE_AS_SYM_ASSIGN. This patch restores that patch. Although the Darwin assembler accepts .set (thus HAVE_AS_SYM_ASSIGN is defined), the __APPLE__ guard is kept to guard against the link failures that prompted its upstreadm addition in LLVM commit commit cfdbbb8fcc62f75dcf0b251dfab63353f3921227 Author: Dan Blackwell <dan_blackwell@apple.com> Date: Fri Aug 15 09:13:26 2025 +0100 [sanitizer_common] Disable sanitizer_redefine_builtins on Apple platforms (#153381) even though they didn't happen in the GCC build. It also keeps the _AIX guard due to LLVM commit commit d7c6cad744bc7ed28535dc6f75629902eda559ea Author: Jake Egan <Jake.egan@ibm.com> Date: Wed Jun 11 20:22:15 2025 -0400 [sanitizer_common] Implement interception on AIX (#138606) Bootstrapped without regressions on sparc-sun-solaris2.11 with gas and as, i386-pc-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin25.1.0.
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
# define SANITIZER_REDEFINE_BUILTINS_H
|
||||
|
||||
// The asm hack only works with GCC and Clang.
|
||||
# if !defined(_WIN32) && !defined(_AIX) && !defined(__APPLE__)
|
||||
#if !defined(_WIN32) && !defined(_AIX) && !defined(__APPLE__) && \
|
||||
defined(HAVE_AS_SYM_ASSIGN)
|
||||
|
||||
asm(R"(
|
||||
.set memcpy, __sanitizer_internal_memcpy
|
||||
|
||||
Reference in New Issue
Block a user