diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-29 21:46:12 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-30 13:06:19 +0200 |
commit | 1cedbaf13778de02e38b5dc80a7af246b7ec83e5 (patch) | |
tree | 152ab4ec39c677eb1a349c290952acff641c52f8 /libdm/datastruct | |
parent | 1a17a5ab80b1699ac086ad34852116e7728cc378 (diff) | |
download | lvm2-1cedbaf13778de02e38b5dc80a7af246b7ec83e5.tar.gz |
configure: support builds without versioning
Not all libc (like musl, uclibc dietlibc) libraries support full symbol
version resolution in runtime like glibc.
Add support to not generate symbol versions when compiling against them.
Additionally libdevmapper.so was broken when compiled against
uclibc. Runtime linker loader caused calling dm_task_get_info_base()
function recursively, leading to segmentation fault.
Introduce --with-symvers=STYLE option, which allows to choose
between gnu and disabled symbol versioning. By default gnu symbol
versioning is used.
__GNUC__ check is replaced now with GNU_SYMVER.
Additionally ld version script is included only in
case of gnu option, which slightly reduces output size.
Providing --without-symvers to configure script when building against
uclibc library fixes segmentation fault error described above, due to
lack of several versions of the same symbol in libdevmapper.so
library.
Based on:
https://patchwork.kernel.org/project/dm-devel/patch/20180831144817.31207-1-m.niestroj@grinn-global.com/
Suggested-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Diffstat (limited to 'libdm/datastruct')
-rw-r--r-- | libdm/datastruct/bitset.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c index 06bd31a9d..8f36ec715 100644 --- a/libdm/datastruct/bitset.c +++ b/libdm/datastruct/bitset.c @@ -242,7 +242,7 @@ bad: return NULL; } -#if defined(__GNUC__) +#if defined(GNU_SYMVER) /* * Maintain backward compatibility with older versions that did not * accept a 'min_num_bits' argument to dm_bitset_parse_list(). @@ -254,6 +254,4 @@ dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem) } DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129); -#else /* if defined(__GNUC__) */ - #endif |