From owner-freebsd-ports Wed May 29 21:50:44 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 68BA437B41E for ; Wed, 29 May 2002 21:50:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4U4o2A76272; Wed, 29 May 2002 21:50:02 -0700 (PDT) (envelope-from gnats) Received: from anholt.dyndns.org (d184-101.uoregon.edu [128.223.184.101]) by hub.freebsd.org (Postfix) with ESMTP id 97D5737B405 for ; Wed, 29 May 2002 21:49:38 -0700 (PDT) Received: from anholt.dyndns.org (anholt@localhost [127.0.0.1]) by anholt.dyndns.org (8.12.3/8.12.3) with ESMTP id g4U4nX2r007283 for ; Wed, 29 May 2002 21:49:33 -0700 (PDT) (envelope-from anholt@anholt.dyndns.org) Received: (from anholt@localhost) by anholt.dyndns.org (8.12.3/8.12.3/Submit) id g4U4nWwp007282; Wed, 29 May 2002 21:49:32 -0700 (PDT) Message-Id: <200205300449.g4U4nWwp007282@anholt.dyndns.org> Date: Wed, 29 May 2002 21:49:32 -0700 (PDT) From: Eric Anholt Reply-To: Eric Anholt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/38729: Partially fix compile of XF86-4 on -current Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 38729 >Category: ports >Synopsis: Partially fix compile of XF86-4 on -current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 29 21:50:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Eric Anholt >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD anholt.dyndns.org 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Thu May 23 12:38:28 PDT 2002 anholt@anholt.dyndns.org:/usr/src/current/sys/i386/compile/MYKERNEL i386 >Description: XFree86-4-Server fails to compile on -current because it doesn't like the #pragmas. __attribute__ is supposed to be the recommended way to do this. I still have compiling errors, but this should be progress. >How-To-Repeat: >Fix: --- thrstubsdiff begins here --- --- lib/XThrStub/UIThrStubs.c.orig Sat May 25 16:01:07 2002 +++ lib/XThrStub/UIThrStubs.c Sat May 25 16:28:25 2002 @@ -99,6 +99,26 @@ #else #include typedef pthread_t xthread_t; +#if __GNUC__ >= 3 +static xthread_t _Xthr_self_stub_(); +static int _Xthr_zero_stub_(); + +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_"))); +/* These are added for libGL */ +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_"))); +/*int pthread_equal __attribute__ ((__weak__)) = _Xthr_equal_stub_;*/ /* See Xthreads.h! */ +#else #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 +133,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 --- thrstubsdiff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message