Re: [PATCH] ARC: Strip libgcc debug information when generating BTF

From: Arnd Bergmann

Date: Sun Nov 01 2026 - 06:10:40 EST


On Sun, Nov 1, 2026, at 02:04, Vineet Gupta wrote:
> On 10/15/26 08:40, Sasha Levin wrote:

>> diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
>> index 30158ae69fd4a..2807ee24f27e6 100644
>> --- a/arch/arc/lib/Makefile
>> +++ b/arch/arc/lib/Makefile
>> @@ -13,3 +13,11 @@ lib-$(CONFIG_ISA_ARCV2) +=memcpy-archs-unaligned.o
>> else
>> lib-$(CONFIG_ISA_ARCV2) +=memcpy-archs.o
>> endif
>> +
>> +# libgcc can contain complex floating-point debug types unsupported by BTF.
>> +# Strip only the debug information from a local copy of the selected archive.
>> +always-$(CONFIG_DEBUG_INFO_BTF) += libgcc.a
>> +OBJCOPYFLAGS_libgcc.a := --strip-debug
>> +
>> +$(obj)/libgcc.a: $(LIBGCC) FORCE
>> + $(call if_changed,objcopy)
>
> I'm working on getting rid of libgcc linking for ARC.
> This requires adding some GENERIC_LIB_* routines, but as part of that
> series I'll propose a revert of this and then the dropping the first link.
> Don't intend to revert this per se, but revert just makes it cleaner.

Have you seen Simon's series?

https://lore.kernel.org/all/20261030-nios2-remove-usage-of-libgcc-v1-3-4e341c66082e@xxxxxxxxxxxxxxxxxx/

I hope there is some overlap with what you need for arc in the
lib/*.c functions. I can take both through the asm-generic tree
to reduce the dependencies if that helps.

Arnd