summaryrefslogtreecommitdiff
path: root/libdm/libdm-stats.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-03-29 21:46:12 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-03-30 13:06:19 +0200
commit1cedbaf13778de02e38b5dc80a7af246b7ec83e5 (patch)
tree152ab4ec39c677eb1a349c290952acff641c52f8 /libdm/libdm-stats.c
parent1a17a5ab80b1699ac086ad34852116e7728cc378 (diff)
downloadlvm2-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/libdm-stats.c')
-rw-r--r--libdm/libdm-stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index f8d79d807..49d06802e 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -5069,7 +5069,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
* current dm_stats_create_region() version.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, const char *program_id,