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: 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


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