[gcc r16-6008] libsanitizer: Restore local sanitizer_redefine_builtins.h patch
Rainer Orth
ro@gcc.gnu.org
Wed Dec 10 08:25:13 GMT 2025
https://gcc.gnu.org/g:203d4dd09ba83121e447ce93ba98175b68d955f6
commit r16-6008-g203d4dd09ba83121e447ce93ba98175b68d955f6
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Wed Dec 10 09:24:53 2025 +0100
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.
Diff:
---
libsanitizer/sanitizer_common/sanitizer_redefine_builtins.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libsanitizer/sanitizer_common/sanitizer_redefine_builtins.h b/libsanitizer/sanitizer_common/sanitizer_redefine_builtins.h
index 7d8891117657..26f4b48e4fd2 100644
--- a/libsanitizer/sanitizer_common/sanitizer_redefine_builtins.h
+++ b/libsanitizer/sanitizer_common/sanitizer_redefine_builtins.h
@@ -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
More information about the Gcc-cvs
mailing list