diff mbox series

package/gcc: Disable libsanitizer on arm920t/thumb

Message ID 20230604163535.1102239-1-alexander.sverdlin@gmail.com
State Accepted
Headers show
Series package/gcc: Disable libsanitizer on arm920t/thumb | expand

Commit Message

Alexander Sverdlin June 4, 2023, 4:35 p.m. UTC
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'

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/gcc/gcc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Thomas Petazzoni Aug. 7, 2023, 8:14 p.m. UTC | #1
On Sun,  4 Jun 2023 18:35:35 +0200
Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:

> 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'
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
>  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
Peter Korsgaard Sept. 11, 2023, 9:33 a.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Sun,  4 Jun 2023 18:35:35 +0200
 > Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:

 >> 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'
 >> 
 >> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
 >> ---
 >> 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.
diff mbox series

Patch

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 25cb4ce8e2..1ecbf7e9b4 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -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