This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't build Go support in gcc-4.8.1 on OpenBSD


On Sat, Sep 28, 2013 at 12:20 AM, niXman <i.nixman@gmail.com> wrote:
>
> I successfully build gcc-4.8.1 with c,c++,fortran support on OpenBSD
> pre-5.4 using patches from ports, but I can't build with Go support.
> Also I successfully build gcc-4.6.x with c,c++,fortran,go support.
> The problem is that OpenBSD has no ucontext.h header.
>
> Error message:
> In file included from ../../../../unpack/gcc-4.8.1/libgo/runtime/go-main.c:17:0:
> ../../../../unpack/gcc-4.8.1/libgo/runtime/runtime.h:18:22: fatal
> error: ucontext.h: No such file or directory
>  #include <ucontext.h>
>                       ^
> compilation terminated.

The current implementation of goroutines in gccgo requires the
makecontext, getcontext, and setcontext functions.  Those functions
were standardized in POSIX-1.2001 but then removed in POSIX-1.2008
with no replacement.  Most systems provide them for backward
compatibility.  However, it is possible that OpenBSD does not.  I
really don't know.

It's possible to fix this by writing processor-dependent functions
that would serve the same purpose as the *context functions, and in
fact that would be more efficient.  But I have not actually done this.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]