here's a patch containing the stuff I had to do to corebase to get it
working here without frobing the shared library link order...
Index: objc_interface.h
===================================================================
--- objc_interface.h	(revision 33793)
+++ objc_interface.h	(working copy)
@@ -28,7 +28,7 @@
 #define __OBJC_INTERFACE_H__ 1
 
 #include "CoreFoundation/CFRuntime.h"
-#include <GNUstepBase/preface.h>
+#include <objc/runtime.h>
 
 
 
Index: NSCFType.m
===================================================================
--- NSCFType.m	(revision 33793)
+++ NSCFType.m	(working copy)
@@ -43,11 +43,6 @@
 
 @implementation NSCFType
 
-+ (void) load
-{
-  CFInitialize();
-}
-
 - (id) retain
 {
   return (id)CFRetain(self);
Index: CFRuntime.m
===================================================================
--- CFRuntime.m	(revision 33793)
+++ CFRuntime.m	(working copy)
@@ -379,7 +379,7 @@
 extern void CFTimeZoneInitialize (void);
 extern void CFUUIDInitialize (void);
 
-void CFInitialize (void)
+void __attribute__((constructor(65535))) CFInitialize (void)
 {
   // Initialize CFRuntimeClassTable
   __CFRuntimeClassTable = (CFRuntimeClass **) calloc (__CFRuntimeClassTableSize,
Index: CFUUID.c
===================================================================
--- CFUUID.c	(revision 33793)
+++ CFUUID.c	(working copy)
@@ -28,6 +28,7 @@
 #include "CoreFoundation/CFBase.h"
 #include "CoreFoundation/CFString.h"
 #include "CoreFoundation/CFUUID.h"
+#include <objc/runtime.h>
 
 /* Some of the code in CFUUID is based on Etoile's ETUUID class.
    Copyright (C) 2007 Yen-Ju Check <yjchenx AT gmail DOT com> */
Index: CFBase.m
===================================================================
--- CFBase.m	(revision 33793)
+++ CFBase.m	(working copy)
@@ -250,7 +250,8 @@
 void CFNullInitialize (void)
 {
   _kCFNullTypeID = _CFRuntimeRegisterClass (&CFNullClass);
-  ((CFRuntimeBase*)kCFNull)->_isa = [NSNull class];
+  /* don't use [NSNull class] before autorelease pool setup. */
+  ((CFRuntimeBase*)kCFNull)->_isa = objc_getClass("NSNull");
 }
 
 CFTypeID
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to