[openbsd] Fetching versioned library
Hi zig developers, as i mention yesterday, Zig can't be able to fetch as well shared library on OpenBSD, because no symlink are available. I made up a little patch for OpenBSD making Zig compilator link shared versioned library as well.
#18465
Sorry for disturbing you again, i'm just a novice on Zig who want to help/contribute, not to harass you what openbsd or by our idiomatic.
Could you remove the else block? Makes it clearer that this is a special case for the openBSD dynamic libs.
Is it more clear like this @Vexu ? or should i move somehting ?
Edit : Seems caught an error with src/Compilation.zig at 2062, i'll try to check it out too...
Compiling works well, i forgot to put path in test_path too.. sorry !
Update Done !
Or, provide evidence that it is supposed to work this way in another compiler's codebase, or OpenBSD documentation.
oh my god, they actually patched LLD to do this logic https://github.com/openbsd/ports/blob/master/devel/llvm/17/patches/patch-lld_ELF_DriverUtils_cpp
To make coherent with the patch of LLD, i put find_maj_min_sh_lib to run after main_check.
Sorry if the use of fatal function is incorrect on catch block of fs.cwd().openDir or with std.fmt.parseInt.
Thanks for working on this.
I have a feeling this is going to require a few back and forths, so if you get tired of working on it, just let me know and I can finish it for you.
You're welcome ! i should be the first one which should thank you, for helping us to use Zig on OpenBSD ! :smile:
(i forgot to answer you, sorry of the late), i had no problem to help at all, but if you see i'm struggling a lot (as error handling because idk how to manage, or which message i should print) you can help or even commit on my branch !
@andrewrk does this changes seems good ?
(OpenBSD dev here), from OpenBSD point of vue, it LGTM.
(OpenBSD dev here), from OpenBSD point of vue, it LGTM.
Thank you for your approval! sorry for the latest commit (i forgot to remove the stupid switch(link_mode) case i putted here)