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: (bib) libobjc build failure


"H. J. Lu" <hjl@lucon.org> writes:

> On Sun, Dec 01, 2002 at 11:13:50PM -0800, Zack Weinberg wrote:
>> I have reproduced the problem and devised a fix.  I am getting a lot
>> of testsuite failures of the form
>> 
>> libobjc.a(thr-objc.o)(.text+0x46): In function `__objc_init_thread_system':
>> gcc/gthr-posix.h:129: undefined reference to `pthread_key_create'
>> 
>> for no apparent reason.  However, the appended patch improves the
>
> You can't include defaults.h without including some target files. In
> this particular case, defaults.h doesn't know if SUPPORTS_WEAK should
> be defined. It has been a long standing issue that a library may want
> to know what features the target platform supports.

Oh ho; what you're saying is that formerly thr-objc.o would have weak
references to pthread_* and thus wouldn't need libpthread dragged in?
That seems consistent with the content of gthr-posix.h.  In that case
adding #include "tm.h" to thr-objc.c should make the test suite happy
... yes, it does.  Thanks for cluing me in; I've checked in the patch
which follows.

Are the other thr-*.c files in libobjc ever used anymore?

zw

        * thr-objc.c: Include coretypes.h and tm.h.

===================================================================
Index: thr-objc.c
--- thr-objc.c	20 Jul 2000 07:27:26 -0000	1.1
+++ thr-objc.c	2 Dec 2002 22:43:56 -0000
@@ -25,6 +25,8 @@ Boston, MA 02111-1307, USA.  */
 
 #define _LIBOBJC
 #include "tconfig.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "defaults.h"
 #include <objc/thr.h>
 #include "runtime.h"


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