Event Timeline
Thanks Ravi. How is this?
The kernel as a standalone target does not link libgcc or libcompiler-rt. On platforms (e.g., MIPS and RISCV) that do not have a direct assembly implementation of the relevant builtin functions that zstd references, the compiler converts them into calls to the runtime library intrinsics.
The goal of all of this macro redefinition is to use supported kernel constructs to implement the same functionality, without adding diff to contrib code.
And then for the commit message only:
A subsequent enhancement might create a mini compiler-rt library for kernel use and implement e.g., __ctzsi2 (for use by __builtin_ctz) there instead.
The kernel as a standalone target does not link against libgcc or libcompiler-rt. On platforms (e.g., MIPS and RISCV) that do not have a direct assembly implementation of the relevant builtin functions that zstd references, the compiler converts them into calls to the runtime library intrinsics. Since the kernel doesn't link against the libraries, this results in a failure to link the kernel.
The goal of all of this macro redefinition is to use supported kernel constructs to implement the same functionality, without adding a diff to contrib code.
A one-sentence description of what each of the functions does would be good too (i.e. expand ctz => Count Trailing Zeros, etc).