libgo assumes -pthread
Dave Korn
dave.korn.cygwin@gmail.com
Fri Dec 3 16:07:00 GMT 2010
On 03/12/2010 15:37, Hans-Peter Nilsson wrote:
> /tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/xgcc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/ -nostdinc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/ -isystem /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/targ-include -isystem /tmp/hpautotest-gcc1/gcc/newlib/libc/include -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/cris -L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/libnosys -L/tmp/hpautotest-gcc1/gcc/libgloss/cris -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/bin/ -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/lib/ -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/include -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/sys-include -DHAVE_CONFIG_H -I. -I/tmp/hpautotest-gcc1/gcc/libgo -I /tmp/hpautotest-gcc1/gcc/libgo/runtime -I/tmp/hpautotest-gcc1/gcc/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -I /tmp/hpautotest-gcc1/gcc/libgo/../gcc
-I
> ../../gcc/include -g -O2 -MT go-main.o -MD -MP -MF .deps/go-main.Tpo -c -o go-main.o `test -f 'runtime/go-main.c' || echo '/tmp/hpautotest-gcc1/gcc/libgo/'`runtime/go-main.c
> xgcc: error: unrecognized option '-pthread'
> make[4]: *** [go-main.o] Error 1
>
> Indeed, cris-elf does not support threads, like many
> bare-iron/newlib ports. :)
And indeed some fullly-hosted ports, such as cygwin and mingw. The -pthread
option can't be assumed to exist on any given target, even some of those that
actually support pthreads functionality. It needs to be added only where
actually needed, subject to some kind of autoconf test or other.
cheers,
DaveK
More information about the Gcc-patches
mailing list