On Thu, Jun 09, 2022 at 01:57:52PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jun 09, 2022 at 12:11:28PM +0200, Thomas Schwinge wrote: > > On 2022-06-09T10:19:03+0200, Jakub Jelinek via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > > > This patch adds support for dlopening libmemkind.so > > > > Instead of 'dlopen'ing literally 'libmemkind.so': > > > > > --- libgomp/allocator.c.jj 2022-06-08 08:21:03.099446883 +0200 > > > +++ libgomp/allocator.c 2022-06-08 13:41:45.647133610 +0200 > > > > > + void *handle = dlopen ("libmemkind.so", RTLD_LAZY); > > > > ..., shouldn't this instead 'dlopen' 'libmemkind.so.0'? At least for > > Debian/Ubuntu, the latter ('libmemkind.so.0') is shipped in the "library" > > package: > > I agree and I've actually noticed it too right before committing, but I > thought > I'll investigate and tweak incrementally because "libmemkind.so" > is what I've actually tested (it is what llvm libomp uses).
And here is what I've committed after bootstrapping/regtesting it on x86_64-linux and i686-linux. 2022-06-10 Jakub Jelinek <ja...@redhat.com> * allocator.c (gomp_init_memkind): Call dlopen with "libmemkind.so.0" rather than "libmemkind.so". --- libgomp/allocator.c.jj 2022-06-09 10:14:33.470973961 +0200 +++ libgomp/allocator.c 2022-06-09 14:05:33.665803457 +0200 @@ -99,7 +99,7 @@ static pthread_once_t memkind_data_once static void gomp_init_memkind (void) { - void *handle = dlopen ("libmemkind.so", RTLD_LAZY); + void *handle = dlopen ("libmemkind.so.0", RTLD_LAZY); struct gomp_memkind_data *data; int i; static const char *kinds[] = { Jakub