diff --git a/libgomp/allocator.c b/libgomp/allocator.c index 90f2dcb60d64b97d68a8280d58cc82587ba5370a..b4e50e2ad72a72513d21b65648c27a5ff249b481 100644 --- a/libgomp/allocator.c +++ b/libgomp/allocator.c @@ -118,6 +118,17 @@ gomp_init_libnuma (void) dlclose (handle); return; } + if (handle) + { + int (*numa_available) (void); + numa_available + = (__typeof (numa_available)) dlsym (handle, "numa_available"); + if (!numa_available || numa_available () != 0) + { + dlclose (handle); + handle = NULL; + } + } if (!handle) { __atomic_store_n (&libnuma_data, data, MEMMODEL_RELEASE);