Skip to contentSkip to conversation

package/gcc: Disable libsanitizer on arm920t/thumb

PATCH In review Alexander Sverdlin 3 participants 3 messages Jun 4, 2023 – Sep 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: Disable libsanitizer on arm920t/thumb

libsanitizer is broken for Thumb1, sanitizer_linux.cc contains unconditional "ldr ip, [sp], #8", which causes:

....s: Assembler messages:
....s:4190: Error: lo register required -- `ldr ip,[sp],#8'

---
 package/gcc/gcc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/gcc/gcc.mk +8 -0
index 25cb4ce8e2..1ecbf7e9b4 100644
@@ -154,6 +154,14 @@ ifeq ($(BR2_mips)$(BR2_mipsel):$(BR2_TOOLCHAIN_GCC_AT_LEAST_12),y:y)
 HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
 endif
 
+# libsanitizer is broken for Thumb1, sanitizer_linux.cc contains unconditional
+# "ldr ip, [sp], #8", which causes:
+# ....s: Assembler messages:
+# ....s:4190: Error: lo register required -- `ldr ip,[sp],#8'
+ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
+HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
+endif
+
 # The logic in libbacktrace/configure.ac to detect if __sync builtins
 # are available assumes they are as soon as target_subdir is not
 # empty, i.e when cross-compiling. However, some platforms do not have
Signature · 6 lines
2.40.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · On Sun, 4 Jun 2023 18:35:35 +0200 Alexander Sverdlin…

libsanitizer is broken for Thumb1, sanitizer_linux.cc contains unconditional "ldr ip, [sp], #8", which causes:

....s: Assembler messages:
....s:4190: Error: lo register required -- `ldr ip,[sp],#8'

---
 package/gcc/gcc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Sorry for the long delay, this is absolutely correct. I've only added a reference to an autobuilder issue fixed by this commit in the commit log. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:

Quoted 6 lines · On Sun, 4 Jun 2023 18:35:35 +0200 Alexander Sverdlin…

libsanitizer is broken for Thumb1, sanitizer_linux.cc contains unconditional "ldr ip, [sp], #8", which causes:

....s: Assembler messages:
....s:4190: Error: lo register required -- `ldr ip,[sp],#8'

Quoted 8 lines
Quoted 4 lines

---
package/gcc/gcc.mk | 8 ++++++++

1 file changed, 8 insertions(+)

Sorry for the long delay, this is absolutely correct. I've only added a reference to an autobuilder issue fixed by this commit in the commit log. Thanks!

Committed to 2023.02.x and 2023.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot