This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure on Sparc Solaris2.8
- From: Josh <sundog at mindspring dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 27 May 2003 14:02:16 -0400 (EDT)
- Subject: Re: Bootstrap failure on Sparc Solaris2.8
Eric--
There is in fact a pthread.h header file in my $(objdir)/gcc/include directory, as well as the block of code you list below in ${srcdir}/gcc/fixinc/inclhack.def...standing by for further instructions. ;>
--Josh
-------Original Message-------
From: Eric Botcazou <ebotcazou@libertysurf.fr>
Sent: 05/27/03 01:46 PM
To: Josh <sundog@mindspring.com>
Subject: Re: Bootstrap failure on Sparc Solaris2.8
>
> > I have now tried to bootstrap with the snapshot dated 20030526, with the
> same result: eh_alloc.cc fails at line 81, with or without LIBCXXFLAGS
> set. I probably shouldn't have, but I did, go in and change the files
> listed below, commenting out initializations of the __gthread_mutex_t
> type. This allowed the bootstrap to finish.
>
> In directory libstdc++-v3/include/libsupc++: eh_alloc.cc
> In directory libstdc++-v3/include/bits: stl_alloc.h, stl_threads.h
I should have thought about it earlier: there are these lines in
fixinc/inclhack.def:
/*
* Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
* __STDC__ defined (e.g. by -ansi) it is a union. So change the
* initializer to "{0}" instead
*/
fix = {
hackname = solaris_mutex_init_2;
select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = pthread.h;
c_fix = format;
c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"%0\n"
"#else\n"
"%1, {0}}%3\n"
"#endif";
c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[
\t]+{.*)"
",[ \t]*0}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
"#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
"#define PTHREAD_RWLOCK_INITIALIZER\t"
"{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
};
which means that GCC is supposed to fix alone a problem that is very
similar
to the one you encountered.
Could you see if there is a pthread.h header file in
$(objdir)/gcc/include?
--
Eric Botcazou
>