From 4ef4921cb10693c59b488002179db131683af8bc Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 3 Mar 2021 22:51:01 +0100 Subject: [PATCH 2/2] OpenMP 5.0: requires directive: adjust libgomp HSA plugin Fix-up for og10 commit c2e4a17adc0989f216c7fc3f93f150c66adba23a "OpenMP 5.0: requires directive". libgomp: while loading libgomp-plugin-hsa.so.1: [...]/libgomp-plugin-hsa.so.1: undefined symbol: GOMP_OFFLOAD_supported_features libgomp/ * plugin/plugin-hsa.c (GOMP_OFFLOAD_supported_features): New function. --- libgomp/ChangeLog.omp | 3 +++ libgomp/plugin/plugin-hsa.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 03ca74c8f3d5..19f48dc61202 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2021-03-25 Thomas Schwinge + * plugin/plugin-hsa.c (GOMP_OFFLOAD_supported_features): New + function. + * target.c (__requires_mask_table, __requires_mask_table_end): Add '__attribute__((weak))'. diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index abd3bc64163b..bddb690ca14f 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -1869,3 +1869,11 @@ GOMP_OFFLOAD_dev2dev (int ord, void *dst, const void *src, size_t n) "it should never be called"); return false; } + +/* Indicate which GOMP_REQUIRES_* features are supported, currently none. */ + +bool +GOMP_OFFLOAD_supported_features (unsigned int *mask) +{ + return (*mask == 0); +} -- 2.30.2