Linking against static lib which needs __addvsi3, __subvsi3, __mulvsi3, __subvdi3

howdy, i am writing a tool that depends on a static library provided by the distro, and this library uses a bunch of these operations, what’s the easiest to make this link? as a workaround i was thinking of writing a c module which provides these symbols and simply forwards them to these intrinsics and instead of using zig to compile this c module i use clang and then link the object file in my project, is there anything simpler than that?

actually i found osdev/cc-runtime: Freestanding, integer-only, easy to integrate subset of LLVM's compiler-rt libgcc-compatibility functions. - Codeberg.org which i’m now linking to the project. but would be nice if this would be part of compiler_rt.zig natively if that is possible?

Please file an issue on ziglang/zig and we can investigate whether adding these to compiler-rt makes sense.

thx, see here: compiler_rt missing symbols: __addvsi3, __subvsi3, __mulvsi3, __subvdi3 · Issue #23909 · ziglang/zig · GitHub

1 Like