On Mon, 28 Nov 2016, Hahnfeld, Jonas wrote: > Hi, > > find attached a patch that fixes OpenMP offloading to NVPTX for me. Without > the changes, I got errors from the linker for affinity symbols.
> 2016-11-28 Jonas Hahnfeld <hahnf...@itc.rwth-aachen.de> > > * config/linux/affinity.c: Include ../../affinity.c as fallback. Thanks. This is in the #else branch of '#ifdef HAVE_PTHREAD_AFFINITY_NP' (so the ChangeLog entry should have [!HAVE_PTHREAD_AFFINITY_NP]) -- I'm curious why you don't have this defined. One reason I can think of is, if you're building libgomp against musl libc, but libcuda.so has several external symbols that can't be satisfied by musl (only glibc) -- so dynamic linking of libgomp nvptx plugin will fail at runtime. > * config/nvptx/affinity.c: Delete to use fallback implementation. Right. This file was (correctly) deleted on the branch, but I missed the deletion when writing the Changelog and then subsequently missed it again during svn checkin. Sorry about this. I've checked other files, and I see that critical.c needs the same treatment, but the rest of files in libgomp/config/nvptx are in sync with the branch. Jakub, shall I apply this patch on Jonas' behalf, and then remove config/nvptx/critical.c separately? Thanks. Alexander > --- > libgomp/config/linux/affinity.c | 2 +- > libgomp/config/nvptx/affinity.c | 0 > 2 files changed, 1 insertion(+), 1 deletion(-) > delete mode 100644 libgomp/config/nvptx/affinity.c > > diff --git a/libgomp/config/linux/affinity.c b/libgomp/config/linux/affinity.c > index ca6eec04..d8dede6 100644 > --- a/libgomp/config/linux/affinity.c > +++ b/libgomp/config/linux/affinity.c > @@ -394,6 +394,6 @@ ialias(omp_get_place_proc_ids) > > #else > > -#include "../posix/affinity.c" > +#include "../../affinity.c" > > #endif > diff --git a/libgomp/config/nvptx/affinity.c b/libgomp/config/nvptx/affinity.c > deleted file mode 100644 > index e69de29..0000000