From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id B700238515E3; Thu, 25 Mar 2021 11:17:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B700238515E3 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-10] OpenMP 5.0: requires directive: adjust libgomp HSA plugin X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/devel/omp/gcc-10 X-Git-Oldrev: ff77b4a0db75bc82a5519e31a882f9a25a02cd56 X-Git-Newrev: 4ef4921cb10693c59b488002179db131683af8bc Message-Id: <20210325111700.B700238515E3@sourceware.org> Date: Thu, 25 Mar 2021 11:17:00 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2021 11:17:00 -0000 https://gcc.gnu.org/g:4ef4921cb10693c59b488002179db131683af8bc commit 4ef4921cb10693c59b488002179db131683af8bc Author: Thomas Schwinge Date: Wed Mar 3 22:51:01 2021 +0100 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. Diff: --- 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 03ca74c8f3d..19f48dc6120 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 abd3bc64163..bddb690ca14 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); +}