gcc/libgomp
Tom de Vries fe0827eed0 [libgomp, nvptx] Fix libgomp.c/target-5.c compilation
Libgomp test-case libgomp.c/target-5.c is failing to compile when building for
x86_64 with nvptx accelerator due to missing:
- getpid
- gethostname
- isatty (pulled in by fwrite)
in the nvptx newlib.

This patch fixes the build failure by:
- adding a function gomp_print_string which limits the use of fwrite to a single
  location (in affinity-fmt.c), and
- creating an nvptx version of affinity-fmt.c, which:
  - overrides the configure test results HAVE_GETPID and HAVE_GETHOSTNAME, and
  - implements fwrite using write.

Build and reg-tested on x86_64 with nvptx accelerator.

2018-12-13  Tom de Vries  <tdevries@suse.de>

	* affinity-fmt.c (gomp_print_string): New function, factored out of ...
	(omp_display_affinity, gomp_display_affinity_thread): ... here, and ...
	* fortran.c (omp_display_affinity_): ... here.
	* libgomp.h (gomp_print_string): Declare.
	* config/nvptx/affinity-fmt.c: New file.  Include affinity-fmt.c,
	undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to
	write.

From-SVN: r267100
2018-12-13 18:04:05 +00:00
..
config [libgomp, nvptx] Fix libgomp.c/target-5.c compilation 2018-12-13 18:04:05 +00:00
plugin [nvptx] Remove use of CUDA unified memory in libgomp 2018-09-18 08:41:54 -07:00
testsuite re PR libgomp/88460 ([nvptx] FAIL: libgomp.c++/for-24.C (internal compiler error)) 2018-12-13 13:53:19 +01:00
acinclude.m4
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
affinity-fmt.c [libgomp, nvptx] Fix libgomp.c/target-5.c compilation 2018-12-13 18:04:05 +00:00
affinity.c Fix Solaris build with OpenMP 5.0 2018-11-08 21:39:11 +00:00
alloc.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
atomic.c
barrier.c
ChangeLog [libgomp, nvptx] Fix libgomp.c/target-5.c compilation 2018-12-13 18:04:05 +00:00
ChangeLog.graphite
config.h.in builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure.ac builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure.tgt builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
critical.c
env.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
error.c
fortran.c [libgomp, nvptx] Fix libgomp.c/target-5.c compilation 2018-12-13 18:04:05 +00:00
hashtab.h
icv-device.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
icv.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
iter_ull.c
iter.c
libgomp_f.h.in
libgomp_g.h builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
libgomp-plugin.c
libgomp-plugin.h
libgomp.h [libgomp, nvptx] Fix libgomp.c/target-5.c compilation 2018-12-13 18:04:05 +00:00
libgomp.map builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
libgomp.spec.in
libgomp.texi
lock.c
loop_ull.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
loop.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
Makefile.am builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
Makefile.in Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu. 2018-11-26 22:03:41 +01:00
oacc-async.c
oacc-cuda.c
oacc-host.c
oacc-init.c
oacc-int.h
oacc-mem.c 2018-11-06 Chung-Lin Tang <cltang@codesourcery.com> 2018-11-06 13:09:52 +00:00
oacc-parallel.c [PR88288, OpenACC, libgomp] Adjust offsets for present data clauses 2018-11-30 21:39:49 +01:00
oacc-plugin.c
oacc-plugin.h
omp_lib.f90.in builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
omp_lib.h.in builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
omp.h.in builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
openacc_lib.h 2018-11-06 Chung-Lin Tang <cltang@codesourcery.com> 2018-11-06 13:09:52 +00:00
openacc.f90 2018-11-06 Chung-Lin Tang <cltang@codesourcery.com> 2018-11-06 13:09:52 +00:00
openacc.h 2018-11-06 Chung-Lin Tang <cltang@codesourcery.com> 2018-11-06 13:09:52 +00:00
ordered.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
parallel.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
priority_queue.c
priority_queue.h
sections.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
secure_getenv.h
single.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
splay-tree.c
splay-tree.h
target.c Coalesce host to device transfers in libgomp: not for link pointer 2018-12-09 13:47:23 +01:00
task.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
team.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
teams.c Fix Solaris build with OpenMP 5.0 2018-11-08 21:39:11 +00:00
work.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00