build: set SONAME for shared library in uv.gyp

For autoconf the libuv shared library SONAME is libuv.so.1.0
but gyp builds in UNIX were missing the proper SONAME. gyp
does not have an explicit setting for SONAME. Changing the
output file extensions triggers the use of SONAME.

The previous gyp configuration also also caused issue
joyent/libuv#1382, that prevented building the tests against
a shared library - the issue is now fixed for UNIX.

PR-URL: https://github.com/libuv/libuv/pull/329
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Rui Abreu Ferreira 2015-04-22 16:27:00 +01:00 committed by Saúl Ibarra Corretgé
parent 74990f3af2
commit e49ebd696e

9
uv.gyp
View File

@ -167,11 +167,10 @@
'cflags': [ '-fPIC' ],
}],
['uv_library=="shared_library" and OS!="mac"', {
'link_settings': {
# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
# in include/uv-version.h
'libraries': [ '-Wl,-soname,libuv.so.1.0' ],
},
# This will cause gyp to set soname
# Must correspond with UV_VERSION_MAJOR
# in include/uv-version.h
'product_extension': 'so.1',
}],
],
}],