Re: [PATCH v2] ARC: stop linking libgcc

From: Arnd Bergmann

Date: Mon Nov 23 2026 - 04:03:27 EST


On Mon, Nov 23, 2026, at 01:06, Vineet Gupta wrote:
> With the generic lib/ versions of the shift/multiply/compare helpers,
> the 32-bit divide routines (only needed without hardware div/rem) and
> clz/ctz all provided by the kernel, and the 64/64 divide and floating
> point routines gone, nothing in the kernel or modules resolves against
> libgcc any more.
>
> Drop it from the link so that any new dependency on it (e.g. a raw
> 64-bit division instead of div_u64()) shows up as a build failure
> rather than silently pulling in libgcc code.
>
> libgcc elision can break -Os builds as older gcc generate millicode
> thunks: disable them with -mno-millicode.
>
> Signed-off-by: Vineet Gupta <vgupta@xxxxxxxxxx>

Thanks, I have updated the asm-generic tree to use this version now.

Arnd