]> gcc.gnu.org Git - gcc.git/commitdiff
libgomp: introduce LIBGOMP_OFFLOADED_ONLY macro
authorAlexander Monakov <amonakov@ispras.ru>
Wed, 30 Nov 2016 18:08:30 +0000 (21:08 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Wed, 30 Nov 2016 18:08:30 +0000 (21:08 +0300)
* 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

libgomp/ChangeLog
libgomp/config.h.in
libgomp/configure
libgomp/configure.ac

index 636226c53df3c8cfd34d951e6284ef5066e4f054..1fafab8682fa7bc9395d1d5685ec67324e1f2f50 100644 (file)
@@ -1,3 +1,10 @@
+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.
index b54dd87c2a676b99e52684eadc8637b0d56290d2..583b9b482502907b0d6868bad90ebcac0e55374c 100644 (file)
 /* 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
 
index cfce5602a9b74c42e63dfae3f08300472c3e875b..6355ad90ba42e3eb4a607065a199a03b51087887 100755 (executable)
@@ -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.
index 5f1db7e1e0e0dd160ed190fac48fc1af61523e69..4086d3f8263effde489e16e6a0fff3cc05102f1e 100644 (file)
@@ -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.
This page took 0.089875 seconds and 5 git commands to generate.