This is the mail archive of the gcc@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: [tree-ssa] libmudflap on NetBSD 1.6.1


fche@redhat.com (Frank Ch. Eigler) writes:

> linus@alcom.aland.fi (Linus Sjöberg) writes:
>> I have set up an old 486-box with NetBSD and it has spent the past few days
>> bootstrapping gcc. Today it stopped in libmudflap sicne it couldn't find the
>> requisite pthread.h. [...]
> libmudflap's autoconf machinery is intended to detect the presence of pthread.h,
> and avoid building libmudflapth (the thread-aware version) automatically.

I am afraid it is broken to some extent then....

I cvs up'd and rebuilt without any extra flags and got the same error.

config.h:
/* Define if you have the <pthread.h> header file.  */
/* #undef HAVE_PTHREAD_H */

make:
/usr/gcc.obj/gcc/xgcc -B/usr/gcc.obj/gcc/ -B/usr/gcc.install/i386-unknown-netbsdelf1.6.1/bin/ -B/usr/gcc.install/i386-unknown-netbsdelf1.6.1/lib/ -isystem /usr/gcc.install/i386-unknown-netbsdelf1.6.1/include -isystem /usr/gcc.install/i386-unknown-netbsdelf1.6.1/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc/libmudflap -I. -O2 -g -O2 -Wall -O2 -g -O2 -DLIBMUDFLAPTH -c ../../../gcc/libmudflap/mf-runtime.c -o pth/mf-runtime.o
In file included from ../../../gcc/libmudflap/mf-runtime.c:43:
../../../gcc/libmudflap/mf-impl.h:23:2: #error "Cannot build libmudflapth without pthread.h."
../../../gcc/libmudflap/mf-impl.h:203: error: syntax error before "__mf_biglock"
../../../gcc/libmudflap/mf-impl.h:203: warning: type defaults to `int' in declaration of `__mf_biglock'
../../../gcc/libmudflap/mf-impl.h:203: warning: data definition has no type or storage class
../../../gcc/libmudflap/mf-runtime.c:100: error: syntax error before "__mf_biglock"
../../../gcc/libmudflap/mf-runtime.c:100: warning: type defaults to `int' in declaration of `__mf_biglock'
../../../gcc/libmudflap/mf-runtime.c:104: error: `PTHREAD_MUTEX_INITIALIZER' undeclared here (not in a function)
(...)


If I manually edit config.h and set HAVE_PTHREAD_H to 1 and edit the Makefile so
that -I/usr/pkg/pthreads/include is added to the buildcommand everything works.


Something is wrong with the pthread-detection...

/LS


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