Richard Henderson wrote:
On Thu, Jan 19, 2006 at 10:45:39PM +0100, Andreas Tobler wrote:
In team.c solaris fails due to the fact that alloca is defined in alloca.h iso stdlib.h ...
Er, *not* defined did you mean?  This should probably be fixed
with a #define to __builtin_alloca in libgomp.h or so.
Not clear to me.

config/posix/proc.c fails in a similar manner due to the fact that getloadavg is defined in sys/loadavg.h
Easy, more configury near getloadavg detection.
Like this?

#ifdef HAVE_SYS_LOADAVG_H
# include sys/loadavg.h
#endif

or with double guard:

#ifdef HAVE_GETLOADAVG
#ifdef HAVE_SYS_LOADAVG_H
# include sys/loadavg.h
#endif
#endif

The next issue is the -pthread in the config stuff. Solaris does not like it :) -pthreads instead.
Sounds like a typo in the specs for the platform.
Hm, in gcc.c I find a hardcoded -pthread gcc.c:844
Changing it to -pthreads on solaris makes the libgomp test pass except the wrong multilib detection etc. Another topic.
/* Adding -fopenmp should imply pthreads.  This is particularly important
   for targets that use different start files and suchlike.  */
#ifndef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS "%{fopenmp: -pthread}"
#endif

Here I do not know how to address this.

I think I submit piece by piece then.

Thanks,
Andreas

Reply via email to