Re: [PATCH 1/2] nios2: remove libgcc for lshrdi3, ashldi3, ashrdi3, muldi3, and ucmpdi2

From: Chung-Lin Tang

Date: Wed Oct 21 2026 - 06:41:06 EST




On 10/20/26 5:41 PM, Arnd Bergmann wrote:
>> On a more practical note, while technically feasible, I'm not sure
>> whether we can actually vendor/copy directly from libgcc; I think all
>> code there is GPLv3 with Runtime Exception. (I'm not a lawyer yadayada),
>> but I guess direct reuse in that way is problematic, given that the
>> kernel is GPLv2 only? So I guess we would need to do a reimplementation?
> Right, the easiest way would be if you can locate a downstream gcc
> (or clang) fork from Altera or Codesourcery before it was merged,
> if that still has GPLv2 or a more liberal license. Reimplementing
> the functions otherwise is of course annoying.
>
> Adding Chung-Lin Tang to Cc, they contributed the original files
> to gcc back in 2013 and may know a copyright holder that can
> provide a GPLv2 compatible copy.

You're in luck, found the old GCC patches still exist online:
https://github.com/openembedded/openembedded/commit/77c8a823d4490619a247b0d4c0897761003acf98

They appear to be GPLv2 branded, hope this is of use.

Chung-Lin