Hi Gerald! On Fri, 16 Jan 2015 13:32:10 +0100 (CET), Gerald Pfeifer <[email protected]> wrote: > On Thursday 2015-01-15 21:20, Thomas Schwinge wrote: > > In r219682, I have committed to trunk our current set of OpenACC changes, > > which we had prepared on gomp-4_0-branch. Thanks to everyone who has > > been contributing! > > this breaks bootstrap on FreeBSD 8/amd64 from what I can tell:
Sorry for that. And, thanks for fixing the num_devices issue.
> /scratch/tmp/gerald/gcc-HEAD/libgomp/oacc-parallel.c:37:20: fatal error:
> alloca. h: No such file or directory compilation terminated.
>
>
> % find /usr/include/ -name alloca.h
> %
>
> i.e., FreeBSD does not feature the alloca.h header and declares
> alloca() in stdlib.h.
The fix is simple enough; committed to trunk in r219771, as obvious:
commit a6f19a7c6b55f96d0c6dc65914857fc8e9b30aaf
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Jan 16 20:05:21 2015 +0000
libgomp: Don't use <alloca.h>.
libgomp/
* oacc-parallel.c: Don't include <alloca.h>.
(GOACC_parallel): Use gomp_alloca instead of alloca.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219771
138bc75d-0d04-0410-961f-82ee72b054a4
---
libgomp/ChangeLog | 5 +++++
libgomp/oacc-parallel.c | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git libgomp/ChangeLog libgomp/ChangeLog
index 7c106d4..065dfd4 100644
--- libgomp/ChangeLog
+++ libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-16 Thomas Schwinge <[email protected]>
+
+ * oacc-parallel.c: Don't include <alloca.h>.
+ (GOACC_parallel): Use gomp_alloca instead of alloca.
+
2015-01-16 Gerald Pfeifer <[email protected]>
* target.c (num_devices): Guard with PLUGIN_SUPPORT.
diff --git libgomp/oacc-parallel.c libgomp/oacc-parallel.c
index 6d5386b..b5e8060 100644
--- libgomp/oacc-parallel.c
+++ libgomp/oacc-parallel.c
@@ -34,7 +34,6 @@
#include <string.h>
#include <stdarg.h>
#include <assert.h>
-#include <alloca.h>
static int
find_pset (int pos, size_t mapnum, unsigned short *kinds)
@@ -151,7 +150,7 @@ GOACC_parallel (int device, void (*fn) (void *), const void
*offload_table,
tgt = gomp_map_vars (acc_dev, mapnum, hostaddrs, NULL, sizes, kinds, true,
false);
- devaddrs = alloca (sizeof (void *) * mapnum);
+ devaddrs = gomp_alloca (sizeof (void *) * mapnum);
for (i = 0; i < mapnum; i++)
devaddrs[i] = (void *) (tgt->list[i]->tgt->tgt_start
+ tgt->list[i]->tgt_offset);
Grüße,
Thomas
signature.asc
Description: PGP signature
