diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2016-11-30 21:08:30 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2016-11-30 21:08:30 +0300 |
commit | 9e38af5c5521d07a914a03175bf7b7f5d88d3c89 (patch) | |
tree | c5a2737c29a2282ad9665f202a1374c48bced574 /libgomp | |
parent | f96b7f1f47e7dccf7f1da0cab913efb3fe855db8 (diff) | |
download | gcc-9e38af5c5521d07a914a03175bf7b7f5d88d3c89.tar.gz |
libgomp: introduce LIBGOMP_OFFLOADED_ONLY macro
* configure.ac [nvptx*-*-*] (libgomp_offloaded_only): Set and use it...
(LIBGOMP_OFFLOADED_ONLY): ...here; new define.
* configure: Regenerate.
* config.h.in: Likewise.
From-SVN: r243040
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 7 | ||||
-rw-r--r-- | libgomp/config.h.in | 3 | ||||
-rwxr-xr-x | libgomp/configure | 8 | ||||
-rw-r--r-- | libgomp/configure.ac | 7 |
4 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 636226c53df..1fafab8682f 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,12 @@ 2016-11-30 Alexander Monakov <amonakov@ispras.ru> + * configure.ac [nvptx*-*-*] (libgomp_offloaded_only): Set and use it... + (LIBGOMP_OFFLOADED_ONLY): ...here; new define. + * configure: Regenerate. + * config.h.in: Likewise. + +2016-11-30 Alexander Monakov <amonakov@ispras.ru> + * Makefile.in: Regenerate with automake-1.11.6. * aclocal.m4: Likewise. * configure: Likewise. diff --git a/libgomp/config.h.in b/libgomp/config.h.in index b54dd87c2a6..583b9b48250 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -115,6 +115,9 @@ /* Define to 1 if GNU symbol versioning is used for libgomp. */ #undef LIBGOMP_GNU_SYMBOL_VERSIONING +/* Define to 1 if building libgomp for an accelerator-only target. */ +#undef LIBGOMP_OFFLOADED_ONLY + /* Define to 1 if libgomp should use POSIX threads. */ #undef LIBGOMP_USE_PTHREADS diff --git a/libgomp/configure b/libgomp/configure index cfce5602a9b..6355ad90ba4 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -15074,6 +15074,8 @@ case "$host" in nvptx*-*-*) # NVPTX does not support Pthreads, has its own code replacement. libgomp_use_pthreads=no + # NVPTX is an accelerator-only target + libgomp_offloaded_only=yes ;; *) # Check to see if -pthread or -lpthread is needed. Prefer the former. @@ -15125,6 +15127,12 @@ $as_echo "#define LIBGOMP_USE_PTHREADS 1" >>confdefs.h fi +if test x$libgomp_offloaded_only = xyes; then + +$as_echo "#define LIBGOMP_OFFLOADED_ONLY 1" >>confdefs.h + +fi + # Plugins for offload execution, configure.ac fragment. -*- mode: autoconf -*- # # Copyright (C) 2014-2016 Free Software Foundation, Inc. diff --git a/libgomp/configure.ac b/libgomp/configure.ac index 5f1db7e1e0e..4086d3f8263 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -182,6 +182,8 @@ case "$host" in nvptx*-*-*) # NVPTX does not support Pthreads, has its own code replacement. libgomp_use_pthreads=no + # NVPTX is an accelerator-only target + libgomp_offloaded_only=yes ;; *) # Check to see if -pthread or -lpthread is needed. Prefer the former. @@ -208,6 +210,11 @@ if test x$libgomp_use_pthreads != xno; then [Define to 1 if libgomp should use POSIX threads.]) fi +if test x$libgomp_offloaded_only = xyes; then + AC_DEFINE(LIBGOMP_OFFLOADED_ONLY, 1, + [Define to 1 if building libgomp for an accelerator-only target.]) +fi + m4_include([plugin/configfrag.ac]) # Check for functions needed. |