Commit 9e38af5c by Alexander Monakov Committed by Alexander Monakov

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
parent f96b7f1f
2016-11-30 Alexander Monakov <amonakov@ispras.ru> 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. * Makefile.in: Regenerate with automake-1.11.6.
* aclocal.m4: Likewise. * aclocal.m4: Likewise.
* configure: Likewise. * configure: Likewise.
......
...@@ -115,6 +115,9 @@ ...@@ -115,6 +115,9 @@
/* Define to 1 if GNU symbol versioning is used for libgomp. */ /* Define to 1 if GNU symbol versioning is used for libgomp. */
#undef LIBGOMP_GNU_SYMBOL_VERSIONING #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. */ /* Define to 1 if libgomp should use POSIX threads. */
#undef LIBGOMP_USE_PTHREADS #undef LIBGOMP_USE_PTHREADS
......
...@@ -15074,6 +15074,8 @@ case "$host" in ...@@ -15074,6 +15074,8 @@ case "$host" in
nvptx*-*-*) nvptx*-*-*)
# NVPTX does not support Pthreads, has its own code replacement. # NVPTX does not support Pthreads, has its own code replacement.
libgomp_use_pthreads=no 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. # 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 ...@@ -15125,6 +15127,12 @@ $as_echo "#define LIBGOMP_USE_PTHREADS 1" >>confdefs.h
fi 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 -*- # Plugins for offload execution, configure.ac fragment. -*- mode: autoconf -*-
# #
# Copyright (C) 2014-2016 Free Software Foundation, Inc. # Copyright (C) 2014-2016 Free Software Foundation, Inc.
......
...@@ -182,6 +182,8 @@ case "$host" in ...@@ -182,6 +182,8 @@ case "$host" in
nvptx*-*-*) nvptx*-*-*)
# NVPTX does not support Pthreads, has its own code replacement. # NVPTX does not support Pthreads, has its own code replacement.
libgomp_use_pthreads=no 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. # Check to see if -pthread or -lpthread is needed. Prefer the former.
...@@ -208,6 +210,11 @@ if test x$libgomp_use_pthreads != xno; then ...@@ -208,6 +210,11 @@ if test x$libgomp_use_pthreads != xno; then
[Define to 1 if libgomp should use POSIX threads.]) [Define to 1 if libgomp should use POSIX threads.])
fi 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]) m4_include([plugin/configfrag.ac])
# Check for functions needed. # Check for functions needed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment