The attached patch corrects the building for shared libs with OpenBSD. The patch is for Samba 3.5 although the same issue exists with 3.4 and future releases.
Created attachment 5849 [details]
the removal of the SONAMEFLAG definition looks a bit odd. Doesn't the correction of DYNEXP alone fix your ploblems?
Can you please post the errors that you see?
OpenBSD does not use SONAME so it should not be passed on the commandline.
As already asked before: Can you please post the errors that you see?
Can you also point to some documentation about that? At least http://www.openbsd.org/cgi-bin/man.cgi?query=ld&sektion=1 lists -soname as a valid option on OpenBSD.
There are no errors to show. It'll link a library at the moment but the parameters being used are not correct for OpenBSD.
There is no documentation mentioning the OpenBSD specific behavior of the linker. The man pages are the standard GNU binutils man pages.
This is what we use in our port/package already..
if there are "no errors" and if there is no documentation about the use or misuse of the parameter in OpenBSD, I personally don't want to change anything here. Currently we are along with the documentation and we see no error, so I actually also don't see anything to fix. Two OpenBSD machines in the build farm also show no error in this regard. Not that I don't trust what you say but "fixing" something undocumented that does not even show up in any error seems not to be a good thing to do. I might change my mind if there is any documentation about this telling that discourages the use of soname or any error that results in the current way the soname option is used.