[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GCC and -pthread



It is odd that gcc supports this on some platforms and not on others.  On
i386, it appears to merely add -lpthread to the command line.  It doesn't
even produce a warning.

ii  gcc-3.0        3.0.4-0pre0201 The GNU C compiler.

When building on hppa, the configure script seems to decide that -pthread is
OK:

checking if compiler recognizes -pthread... yes

Presumably because the compiler only emits a warning, and
exits successfully:

mdz@sarti:~$ gcc -pthread -c hello.c
gcc: unrecognized option `-pthread'
mdz@sarti:~$ echo $?
0

ii  gcc-3.0        3.0.3-1        The GNU C compiler.

The versions of gcc are also different in this case, so it is possible that
this could be fixed with a newer version of gcc-3.0.  If not, then either
gcc should be fixed to report an error (if appropriate) or the configure
test in libmikmod should be changed to detect this some other way.

(gcc-3.0 maintainer CC'd)

-- 
 - mdz



Reply to: