From owner-freebsd-current Tue Jun 4 5:44: 7 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.mk.bsdclub.org (l209160.ppp.asahi-net.or.jp [218.219.209.160]) by hub.freebsd.org (Postfix) with ESMTP id D994037B404 for ; Tue, 4 Jun 2002 05:44:00 -0700 (PDT) Received: from sakura.mk.bsdclub.org (sakura.mk.bsdclub.org [2001:200:341:0:2a0:c9ff:fe20:9aff]) by mail.mk.bsdclub.org (8.11.6+3.4W/3.7W/smtpfeed 1.18) with ESMTP/inet6 id g54ChxG73520; Tue, 4 Jun 2002 21:43:59 +0900 (JST) Received: from sakura.mk.bsdclub.org (localhost [127.0.0.1]) by sakura.mk.bsdclub.org (8.11.6+3.4W/3.7W) with ESMTP/inet id g54Chxc16331; Tue, 4 Jun 2002 21:43:59 +0900 (JST) Message-Id: <200206041243.g54Chxc16331@sakura.mk.bsdclub.org> To: "Michael D. Harnois" Cc: "Marc G. Fournier" , Stanislav Grozev , freebsd-current@FreeBSD.ORG Subject: Re: GCC3.1 internal compiler error when compiling XFree86-4-libraries From: Motoyuki Konno References: <20020603211621.V2522-100000@mail1.hub.org> <1023192513.4197.8.camel@mharnois.mdharnois.net> User-Agent: EMH/1.10.0 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryomae) APEL/10.3 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Tue_Jun__4_21:43:59_2002-1" Date: Tue, 04 Jun 2002 21:43:59 +0900 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --Multipart_Tue_Jun__4_21:43:59_2002-1 Content-Type: text/plain; charset=US-ASCII Hi, "Michael D. Harnois" wrote: > > > if __GNUC__ >= 3 > > > int foo() __attribute__ ((weak, alias ("bar"))); > > > #endif /* __GNUC__ */ > > > . > > I tried the quotation mark fix, and all it does is change the error > message to > > UIThrStubs.c:102: warning: malformed #pragma weak, ignored [snip] > UIThrStubs.c:139: warning: `_Xthr_zero_stub_' defined but not used > > which doesn't really seem to be a solution. Please try the following patch. -- ------------------------------------------------------------------------ Motoyuki Konno motoyuki@bsdclub.org (Home) motoyuki@FreeBSD.ORG (FreeBSD Project) http://www.freebsd.org/~motoyuki/ (WWW) --Multipart_Tue_Jun__4_21:43:59_2002-1 Content-Type: text/plain; charset=US-ASCII --- lib/XThrStub/UIThrStubs.c.old Mon Nov 19 06:13:26 2001 +++ lib/XThrStub/UIThrStubs.c Tue Jun 4 11:39:19 2002 @@ -99,6 +99,21 @@ #else #include typedef pthread_t xthread_t; +#if __GNUC__ >= 3 +xthread_t pthread_self() __attribute__ ((weak, alias ("_Xthr_self_stub_"))); +int pthread_mutex_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_lock() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_unlock() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_wait() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_signal() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_broadcast() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_key_create() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +void *pthread_getspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_setspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +#else /* __GNUC__ */ #pragma weak pthread_self = _Xthr_self_stub_ #pragma weak pthread_mutex_init = _Xthr_zero_stub_ #pragma weak pthread_mutex_destroy = _Xthr_zero_stub_ @@ -113,6 +128,7 @@ #pragma weak pthread_key_create = _Xthr_zero_stub_ #pragma weak pthread_getspecific = _Xthr_zero_stub_ #pragma weak pthread_setspecific = _Xthr_zero_stub_ +#endif /* __GNUC__ */ #if defined(_DECTHREADS_) || defined(linux) #pragma weak pthread_equal = _Xthr_equal_stub_ /* See Xthreads.h! */ int --Multipart_Tue_Jun__4_21:43:59_2002-1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message