foss-for-synopsys-dwc-arc-processors / linux

Helpful resources for users & developers of Linux kernel for ARC
22 stars 13 forks source link

ARCv3: use generic integer arithmetic funcs form kernel lib #130

Closed pavelvkozlov closed 8 months ago

pavelvkozlov commented 1 year ago

Change kernel configuration for ARCv3 targets to use generic implementaions of ASHLDI3, ASHRDI3, LSHRDI3, CMPDI2, UCMPDI2 integer arithmetic funcs from kernel lib. This patch fixes build of XFS, BTRFS and some other modules for ARCv3 targets:

ERROR: modpost: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
ERROR: modpost: "__lshrdi3" [fs/btrfs/btrfs.ko] undefined!
ERROR: modpost: "__ashldi3" [fs/btrfs/btrfs.ko] undefined!
ERROR: modpost: "__ashldi3" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__ashrdi3" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__ucmpdi2" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__lshrdi3" [fs/xfs/xfs.ko] undefined!

This patch is required because ARCv3 compiler adds calls for integer arithmetic functions, but ARCv3 libgcc doesn't have such functions.

pavelvkozlov commented 1 year ago

I've changed the approach. Finally, I've found correct list of exported symbols from libgcc. No need for generic kernel implementations.

pavelvkozlov commented 8 months ago

Sure, I'll do it. Thank you for review.