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: Re: Re: Bootstrap failure on Sparc Solaris2.8


> Here is the line from the pre-processed eh_alloc.ii file
>
> static __gthread_mutex_t emergency_mutex ={{0,0,0,0,0}, {{{0}}}, 0};
>
> It looks like __gthread_mutex_t is typedef'd from pthread_mutex_t, which
> on my system (in /usr/include/sys/types.h) is defined as follows (note the
> first struct has four members, as compared to the five zeroes in the first
> initializer above):
>
> typedef	struct	_pthread_mutex {		/* = mutex_t in synch.h */
> 	struct {
> 		uint16_t	__pthread_mutex_flag1;
> 		uint8_t		__pthread_mutex_flag2;
> 		uint8_t		__pthread_mutex_ceiling;
> 		uint32_t 	__pthread_mutex_type;
> 	} __pthread_mutex_flags;
> 	union {
> 		struct {
> 			uint8_t	__pthread_mutex_pad[8];
> 		} __pthread_mutex_lock64;
> 		upad64_t __pthread_mutex_owner64;
> 	} __pthread_mutex_lock;
> 	upad64_t __pthread_mutex_data;
> } pthread_mutex_t;
>
> I don't know enough about how everything hangs together to know for sure
> that's what being used, but it looks like a possible culprit.

There is obviously a mismatch between /usr/include/pthread.h and 
/usr/include/sys/types.h on your system.

My version of /usr/include/sys/types.h is

#pragma ident   "@(#)types.h    1.68    02/06/10 SMI

and contains:

typedef struct _pthread_mutex {         /* = mutex_t in synch.h */
        struct {
                uint16_t        __pthread_mutex_flag1;
                uint8_t         __pthread_mutex_flag2;
                uint8_t         __pthread_mutex_ceiling;
                uint16_t        __pthread_mutex_type;
                uint16_t        __pthread_mutex_magic;
        } __pthread_mutex_flags;
        union {
                struct {
                        uint8_t __pthread_mutex_pad[8];
                } __pthread_mutex_lock64;
                struct {
                        uint32_t __pthread_ownerpid;
                        uint32_t __pthread_lockword;
                } __pthread_mutex_lock32;
                upad64_t __pthread_mutex_owner64;
        } __pthread_mutex_lock;
        upad64_t __pthread_mutex_data;
} pthread_mutex_t;


and my version of /usr/include/pthread.h is

#pragma ident   "@(#)pthread.h  1.29    01/07/07 SMI"

and contains (the unfixed macro)

#define PTHREAD_MUTEX_INITIALIZER       {{0, 0, 0, 0, 0}, {{{0}}}, 0}


What are your versions?


> I'm wondering if I'm doing something wrong at config time or build time.
> Note as well, it appears that this is happening during the 64-bit compile
> of libstdc++.

Maybe simply a Solaris 8 bug.

-- 
Eric Botcazou


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