[cmake-developers] New no-soname-option topic for e.g. Android

Vadim Zhukov persgray at gmail.com
Thu May 29 12:32:29 EDT 2014


28.05.2014 20:17 пользователь "Nils Gladitz" <nilsgladitz at gmail.com> написал:
>
> On 28.05.2014 18:01, Vadim Zhukov wrote:
>>
>>
>> > I assumed that because people kept removing the soname options for their Android toolchains that SONAMEs aren't supported at all.
>> >
>> > It however looks like they just can't have versioned names.
>> > Perhaps ignoring the VERSION/SOVERSION properties would suffice since the default SONAME should work which would make this topic superfluous at least for android.
>> > It sounds like you probably already have all of that covered.
>> >
>> > Would this be the same in the OpenBSD case perhaps? Do they have/want SONAMEs but don't want them versioned?
>> > If this is the case this topic as-is can probably be removed again.
>>
>> We in OpenBSD fully support SONAME itself. But since we always version shared library file names as libfoo.so.X.Y, SONAME creates more problems than solves (actually, it doesn't solve a one for us). So we prefer to drop SONAME entirely, and do so consistently in our Ports tree, which has full support for building CMake-based software.
>>
>
> Ah thanks, good to know.
> Does that mean you've got no "-Wl,-soname," whatsoever when building CMake based projects or that you let it produce unversioned SONAMEs with e.g. "-Wl,-soname,libfoo.so" (instead of "-Wl,-soname,libfoo.so.X.Y")?

(sorry for the late answer)

The first one. No SONAME being written.

> In case you drop "-Wl,-soname" entirely ... how do you work around the issue of the linker using paths rather than names in NEEDED entries?
> Or does the issue not exist on OpenBSD?

I was not aware of such issue before that question. :) Yes, paths are
written in NEEDED entries if requested, that's what CMake does for
"external" libraries (outside project). Internal libraries are linked
by name, though, allowing to relocate the resulting software package,
if needed.

Given that I'm more a porter than ld.so hacker, I cannot say if
OpenBSD will change anything in this regard; FWIW I don't know about
such plans anything.



More information about the cmake-developers mailing list