public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Re: Re: Bootstrap failure on Sparc Solaris2.8
@ 2003-05-28 19:22 Josh Loeb
  2003-05-28 19:27 ` Eric Botcazou
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Loeb @ 2003-05-28 19:22 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

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.  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++.

--Josh

-------Original Message-------
From: Eric Botcazou <ebotcazou@libertysurf.fr>
Sent: 05/27/03 04:39 PM
To: Josh <sundog@mindspring.com>
Subject: Re: Re: Bootstrap failure on Sparc Solaris2.8

> 
> > /* = DEFAULTMUTEX */
> #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
> #define PTHREAD_MUTEX_INITIALIZER       {{0, 0, 0, 0, 0}, {{{0}}}, 0}
> #else
> #define PTHREAD_MUTEX_INITIALIZER       {{0, 0, 0, 0, 0}, {{{0}}}, {0}}
> #endif

They look correct (I have the same lines on a Solaris 8 box that
bootstraps 
without a hitch). Weird.

We need to see the preprocessed file build for eh_alloc.cc: could you
issue 
the complete command line for compiling eh_alloc.cc (it is in your first 
message) with an addtional --save-temps argument? It should give you a .i 
file.

Then identify the new form of the line 81

static __gthread_mutex_t emergency_mutex =__GTHREAD_MUTEX_INIT;

and try to identify the error.

-- 
Eric Botcazou
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: Re: Bootstrap failure on Sparc Solaris2.8
  2003-05-28 19:22 Re: Re: Bootstrap failure on Sparc Solaris2.8 Josh Loeb
@ 2003-05-28 19:27 ` Eric Botcazou
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2003-05-28 19:27 UTC (permalink / raw)
  To: Josh Loeb; +Cc: gcc

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-28 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-28 19:22 Re: Re: Bootstrap failure on Sparc Solaris2.8 Josh Loeb
2003-05-28 19:27 ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).