From 44a7d18d95a01b37da666a38188201805c6b578d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 10 Aug 2015 17:53:33 +0200 Subject: [PATCH] Empty libgomp for nvptx * configure.ac (noconfigdirs): Don't add "target-libgomp" for target nvptx*-*-*. * configure: Regenerate. libgomp/ * config/nvptx/affinity.c: New file. * config/nvptx/alloc.c: Likewise. * config/nvptx/bar.c: Likewise. * config/nvptx/barrier.c: Likewise. * config/nvptx/critical.c: Likewise. * config/nvptx/env.c: Likewise. * config/nvptx/error.c: Likewise. * config/nvptx/fortran.c: Likewise. * config/nvptx/iter.c: Likewise. * config/nvptx/iter_ull.c: Likewise. * config/nvptx/libgomp-plugin.c: Likewise. * config/nvptx/lock.c: Likewise. * config/nvptx/loop.c: Likewise. * config/nvptx/loop_ull.c: Likewise. * config/nvptx/mutex.c: Likewise. * config/nvptx/oacc-async.c: Likewise. * config/nvptx/oacc-cuda.c: Likewise. * config/nvptx/oacc-host.c: Likewise. * config/nvptx/oacc-init.c: Likewise. * config/nvptx/oacc-mem.c: Likewise. * config/nvptx/oacc-parallel.c: Likewise. * config/nvptx/oacc-plugin.c: Likewise. * config/nvptx/omp-lock.h: Likewise. * config/nvptx/ordered.c: Likewise. * config/nvptx/parallel.c: Likewise. * config/nvptx/proc.c: Likewise. * config/nvptx/ptrlock.c: Likewise. * config/nvptx/sections.c: Likewise. * config/nvptx/sem.c: Likewise. * config/nvptx/single.c: Likewise. * config/nvptx/splay-tree.c: Likewise. * config/nvptx/target.c: Likewise. * config/nvptx/task.c: Likewise. * config/nvptx/team.c: Likewise. * config/nvptx/time.c: Likewise. * config/nvptx/work.c: Likewise. * configure.ac: Don't probe pthreads support for host nvptx*-*-*. * configure: Regenerate. * configure.tgt (config_path): Set to "nvptx" for target nvptx*-*-*. Co-Authored-By: Jakub Jelinek From-SVN: r226760 --- ChangeLog | 7 +++++ configure | 6 ++-- configure.ac | 6 ++-- libgomp/ChangeLog | 44 +++++++++++++++++++++++++++ libgomp/config/nvptx/affinity.c | 0 libgomp/config/nvptx/alloc.c | 0 libgomp/config/nvptx/bar.c | 0 libgomp/config/nvptx/barrier.c | 0 libgomp/config/nvptx/critical.c | 0 libgomp/config/nvptx/env.c | 0 libgomp/config/nvptx/error.c | 0 libgomp/config/nvptx/fortran.c | 0 libgomp/config/nvptx/iter.c | 0 libgomp/config/nvptx/iter_ull.c | 0 libgomp/config/nvptx/libgomp-plugin.c | 0 libgomp/config/nvptx/lock.c | 0 libgomp/config/nvptx/loop.c | 0 libgomp/config/nvptx/loop_ull.c | 0 libgomp/config/nvptx/mutex.c | 0 libgomp/config/nvptx/oacc-async.c | 0 libgomp/config/nvptx/oacc-cuda.c | 0 libgomp/config/nvptx/oacc-host.c | 0 libgomp/config/nvptx/oacc-init.c | 0 libgomp/config/nvptx/oacc-mem.c | 0 libgomp/config/nvptx/oacc-parallel.c | 0 libgomp/config/nvptx/oacc-plugin.c | 0 libgomp/config/nvptx/omp-lock.h | 12 ++++++++ libgomp/config/nvptx/ordered.c | 0 libgomp/config/nvptx/parallel.c | 0 libgomp/config/nvptx/proc.c | 0 libgomp/config/nvptx/ptrlock.c | 0 libgomp/config/nvptx/sections.c | 0 libgomp/config/nvptx/sem.c | 0 libgomp/config/nvptx/single.c | 0 libgomp/config/nvptx/splay-tree.c | 0 libgomp/config/nvptx/target.c | 0 libgomp/config/nvptx/task.c | 0 libgomp/config/nvptx/team.c | 0 libgomp/config/nvptx/time.c | 0 libgomp/config/nvptx/work.c | 0 libgomp/configure | 3 ++ libgomp/configure.ac | 3 ++ libgomp/configure.tgt | 4 +++ 43 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 libgomp/config/nvptx/affinity.c create mode 100644 libgomp/config/nvptx/alloc.c create mode 100644 libgomp/config/nvptx/bar.c create mode 100644 libgomp/config/nvptx/barrier.c create mode 100644 libgomp/config/nvptx/critical.c create mode 100644 libgomp/config/nvptx/env.c create mode 100644 libgomp/config/nvptx/error.c create mode 100644 libgomp/config/nvptx/fortran.c create mode 100644 libgomp/config/nvptx/iter.c create mode 100644 libgomp/config/nvptx/iter_ull.c create mode 100644 libgomp/config/nvptx/libgomp-plugin.c create mode 100644 libgomp/config/nvptx/lock.c create mode 100644 libgomp/config/nvptx/loop.c create mode 100644 libgomp/config/nvptx/loop_ull.c create mode 100644 libgomp/config/nvptx/mutex.c create mode 100644 libgomp/config/nvptx/oacc-async.c create mode 100644 libgomp/config/nvptx/oacc-cuda.c create mode 100644 libgomp/config/nvptx/oacc-host.c create mode 100644 libgomp/config/nvptx/oacc-init.c create mode 100644 libgomp/config/nvptx/oacc-mem.c create mode 100644 libgomp/config/nvptx/oacc-parallel.c create mode 100644 libgomp/config/nvptx/oacc-plugin.c create mode 100644 libgomp/config/nvptx/omp-lock.h create mode 100644 libgomp/config/nvptx/ordered.c create mode 100644 libgomp/config/nvptx/parallel.c create mode 100644 libgomp/config/nvptx/proc.c create mode 100644 libgomp/config/nvptx/ptrlock.c create mode 100644 libgomp/config/nvptx/sections.c create mode 100644 libgomp/config/nvptx/sem.c create mode 100644 libgomp/config/nvptx/single.c create mode 100644 libgomp/config/nvptx/splay-tree.c create mode 100644 libgomp/config/nvptx/target.c create mode 100644 libgomp/config/nvptx/task.c create mode 100644 libgomp/config/nvptx/team.c create mode 100644 libgomp/config/nvptx/time.c create mode 100644 libgomp/config/nvptx/work.c diff --git a/ChangeLog b/ChangeLog index bd0f35e34ce..6d3a8a04e7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-08-10 Thomas Schwinge + Jakub Jelinek + + * configure.ac (noconfigdirs): Don't add "target-libgomp" for target + nvptx*-*-*. + * configure: Regenerate. + 2015-08-06 Yaakov Selkowitz * Makefile.def (libiconv): Define bootstrap=true. diff --git a/configure b/configure index 6d7152eac67..79257fdc28f 100755 --- a/configure +++ b/configure @@ -3168,9 +3168,8 @@ if test x$enable_static_libjava != xyes ; then fi -# Disable libgomp on non POSIX hosted systems. +# Enable libgomp by default on hosted POSIX systems, and a few others. if test x$enable_libgomp = x ; then - # Enable libgomp by default on hosted POSIX systems. case "${target}" in *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) ;; @@ -3180,6 +3179,8 @@ if test x$enable_libgomp = x ; then ;; *-*-darwin* | *-*-aix*) ;; + nvptx*-*-*) + ;; *) noconfigdirs="$noconfigdirs target-libgomp" ;; @@ -3917,7 +3918,6 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb" ;; nvptx*-*-*) - # nvptx is just a compiler noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" ;; or1k*-*-*) diff --git a/configure.ac b/configure.ac index fbc49ce5b80..452fc057a31 100644 --- a/configure.ac +++ b/configure.ac @@ -529,9 +529,8 @@ if test x$enable_static_libjava != xyes ; then fi AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA) -# Disable libgomp on non POSIX hosted systems. +# Enable libgomp by default on hosted POSIX systems, and a few others. if test x$enable_libgomp = x ; then - # Enable libgomp by default on hosted POSIX systems. case "${target}" in *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) ;; @@ -541,6 +540,8 @@ if test x$enable_libgomp = x ; then ;; *-*-darwin* | *-*-aix*) ;; + nvptx*-*-*) + ;; *) noconfigdirs="$noconfigdirs target-libgomp" ;; @@ -1257,7 +1258,6 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb" ;; nvptx*-*-*) - # nvptx is just a compiler noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" ;; or1k*-*-*) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 3b60290b0bc..084aabddb06 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,47 @@ +2015-08-10 Thomas Schwinge + Jakub Jelinek + + * config/nvptx/affinity.c: New file. + * config/nvptx/alloc.c: Likewise. + * config/nvptx/bar.c: Likewise. + * config/nvptx/barrier.c: Likewise. + * config/nvptx/critical.c: Likewise. + * config/nvptx/env.c: Likewise. + * config/nvptx/error.c: Likewise. + * config/nvptx/fortran.c: Likewise. + * config/nvptx/iter.c: Likewise. + * config/nvptx/iter_ull.c: Likewise. + * config/nvptx/libgomp-plugin.c: Likewise. + * config/nvptx/lock.c: Likewise. + * config/nvptx/loop.c: Likewise. + * config/nvptx/loop_ull.c: Likewise. + * config/nvptx/mutex.c: Likewise. + * config/nvptx/oacc-async.c: Likewise. + * config/nvptx/oacc-cuda.c: Likewise. + * config/nvptx/oacc-host.c: Likewise. + * config/nvptx/oacc-init.c: Likewise. + * config/nvptx/oacc-mem.c: Likewise. + * config/nvptx/oacc-parallel.c: Likewise. + * config/nvptx/oacc-plugin.c: Likewise. + * config/nvptx/omp-lock.h: Likewise. + * config/nvptx/ordered.c: Likewise. + * config/nvptx/parallel.c: Likewise. + * config/nvptx/proc.c: Likewise. + * config/nvptx/ptrlock.c: Likewise. + * config/nvptx/sections.c: Likewise. + * config/nvptx/sem.c: Likewise. + * config/nvptx/single.c: Likewise. + * config/nvptx/splay-tree.c: Likewise. + * config/nvptx/target.c: Likewise. + * config/nvptx/task.c: Likewise. + * config/nvptx/team.c: Likewise. + * config/nvptx/time.c: Likewise. + * config/nvptx/work.c: Likewise. + * configure.ac: Don't probe pthreads support for host nvptx*-*-*. + * configure: Regenerate. + * configure.tgt (config_path): Set to "nvptx" for target + nvptx*-*-*. + 2015-08-10 Thomas Schwinge * testsuite/libgomp.oacc-c-c++-common/vector-type-1.c: New file. diff --git a/libgomp/config/nvptx/affinity.c b/libgomp/config/nvptx/affinity.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/alloc.c b/libgomp/config/nvptx/alloc.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/bar.c b/libgomp/config/nvptx/bar.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/barrier.c b/libgomp/config/nvptx/barrier.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/critical.c b/libgomp/config/nvptx/critical.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/env.c b/libgomp/config/nvptx/env.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/error.c b/libgomp/config/nvptx/error.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/fortran.c b/libgomp/config/nvptx/fortran.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/iter.c b/libgomp/config/nvptx/iter.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/iter_ull.c b/libgomp/config/nvptx/iter_ull.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/libgomp-plugin.c b/libgomp/config/nvptx/libgomp-plugin.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/lock.c b/libgomp/config/nvptx/lock.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/loop.c b/libgomp/config/nvptx/loop.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/loop_ull.c b/libgomp/config/nvptx/loop_ull.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/mutex.c b/libgomp/config/nvptx/mutex.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-async.c b/libgomp/config/nvptx/oacc-async.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-cuda.c b/libgomp/config/nvptx/oacc-cuda.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-host.c b/libgomp/config/nvptx/oacc-host.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-init.c b/libgomp/config/nvptx/oacc-init.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-mem.c b/libgomp/config/nvptx/oacc-mem.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-parallel.c b/libgomp/config/nvptx/oacc-parallel.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/oacc-plugin.c b/libgomp/config/nvptx/oacc-plugin.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/omp-lock.h b/libgomp/config/nvptx/omp-lock.h new file mode 100644 index 00000000000..2ca7c5e1d60 --- /dev/null +++ b/libgomp/config/nvptx/omp-lock.h @@ -0,0 +1,12 @@ +/* This header is used during the build process to find the size and + alignment of the public OpenMP locks, so that we can export data + structures without polluting the namespace. + + When using the Linux futex primitive, non-recursive locks require + one int. Recursive locks require we identify the owning task + and so require in addition one int and a pointer. */ + +typedef int omp_lock_t; +typedef struct { int lock, count; void *owner; } omp_nest_lock_t; +typedef int omp_lock_25_t; +typedef struct { int owner, count; } omp_nest_lock_25_t; diff --git a/libgomp/config/nvptx/ordered.c b/libgomp/config/nvptx/ordered.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/parallel.c b/libgomp/config/nvptx/parallel.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/proc.c b/libgomp/config/nvptx/proc.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/ptrlock.c b/libgomp/config/nvptx/ptrlock.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/sections.c b/libgomp/config/nvptx/sections.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/sem.c b/libgomp/config/nvptx/sem.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/single.c b/libgomp/config/nvptx/single.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/splay-tree.c b/libgomp/config/nvptx/splay-tree.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/target.c b/libgomp/config/nvptx/target.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/task.c b/libgomp/config/nvptx/task.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/team.c b/libgomp/config/nvptx/team.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/time.c b/libgomp/config/nvptx/time.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/config/nvptx/work.c b/libgomp/config/nvptx/work.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libgomp/configure b/libgomp/configure index f1a92ba9de4..867ce40c371 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -15041,6 +15041,9 @@ case "$host" in *-*-rtems*) # RTEMS supports Pthreads, but the library is not available at GCC build time. ;; + nvptx*-*-*) + # NVPTX does not support Pthreads, has its own code replacement. + ;; *) # Check to see if -pthread or -lpthread is needed. Prefer the former. # In case the pthread.h system header is not found, this test will fail. diff --git a/libgomp/configure.ac b/libgomp/configure.ac index 9cf02189665..b1696d05514 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -179,6 +179,9 @@ case "$host" in *-*-rtems*) # RTEMS supports Pthreads, but the library is not available at GCC build time. ;; + nvptx*-*-*) + # NVPTX does not support Pthreads, has its own code replacement. + ;; *) # Check to see if -pthread or -lpthread is needed. Prefer the former. # In case the pthread.h system header is not found, this test will fail. diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index 2970f6f7b82..8fad977a211 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -151,6 +151,10 @@ case "${target}" in XLDFLAGS="${XLDFLAGS} -lpthread" ;; + nvptx*-*-*) + config_path="nvptx" + ;; + *) ;; -- 2.30.2