libgo assumes -pthread

Ian Lance Taylor iant@google.com
Fri Dec 3 16:41:00 GMT 2010


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:

> xgcc: error: unrecognized option '-pthread'

> Indeed, cris-elf does not support threads, like many
> bare-iron/newlib ports. :)  (Except that some ports chose to
> silently ignore unsupported options.)
>
> Should I turn off go/libgo in configure for cris-elf or should
> libgo be buildable without thread support or something else?

Always using -pthread is a portability bug.  But libgo, and Go code in
general, will always require some sort of threads.  Go is by design a
multi-threaded language.  It will be entirely appropriate to disable Go
on systems which do not have threads.

Ian



More information about the Gcc-patches mailing list