You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using GCC 12.2.0 as our compiler as GCC is the only compiler that has support for KOS, which is the development environment used on DC. This does mean we are using the GCC runtime.
Our progress thus far is running objective-c++ code on the dreamcast directly using the runtime. This is some sample code that works. (c++ 20!!)
An example of what code we are using to test libs-base
#import<Foundation/NSObject.h>Classobject_getClass (id object)
{
if (object != nil)
return object->isa;
elsereturnNil;
}
longsysconf(int name) {
switch(name){
case _SC_NPROCESSORS_CONF: return1;
case _SC_NPROCESSORS_ONLN: return1;
default: return0;
}
}
@interfacePerson: NSObject@end@implementationPerson@endintmain(int argc, char **argv, char **envp) {
Person *person = [[Person alloc] init];
return0;
}
The reason we added object_getClass is because it was found to be undefined when compiling this example. There seems to be a mismatch in runtimes when compiling libs-base and our own example code. In GCCs runtime this method isn't inline but in libs-base it is. Is there a way to force gcc's runtime to be used instead?
Now when it comes to libs-base we have got as far as compiling a .a file and then are met with linker errors. We've been working through them as they come up. We had this bizarre one for a while where main was undefined but we tracked it down to NSProcessInfo reimplementing our main function. We have a fork where we store any changes we've been doing to get it to work. Any changes where we comment something out are temporary with the intention to revisit once we get NSObject working on a DC.
I'm wondering if the team has any pointers for doing a cross compile or examples of this being done with GCC that could be pointed to. We would greatly appreciate it because the documentation is scarce on the topic.
If I haven't mentioned it here please reach out to clarify any questions you have about what we have tried.
Hey GNUStep Team.
I'm currently working on porting Objective-C and libs-base to the Sega Dreamcast / SH4 with @gyrovorbis.
We are using GCC 12.2.0 as our compiler as GCC is the only compiler that has support for KOS, which is the development environment used on DC. This does mean we are using the GCC runtime.
Our progress thus far is running objective-c++ code on the dreamcast directly using the runtime. This is some sample code that works. (c++ 20!!)
An example of what code we are using to test libs-base
The reason we added
object_getClass
is because it was found to be undefined when compiling this example. There seems to be a mismatch in runtimes when compiling libs-base and our own example code. In GCCs runtime this method isn't inline but in libs-base it is. Is there a way to force gcc's runtime to be used instead?Now when it comes to libs-base we have got as far as compiling a
.a
file and then are met with linker errors. We've been working through them as they come up. We had this bizarre one for a while where main was undefined but we tracked it down to NSProcessInfo reimplementing our main function. We have a fork where we store any changes we've been doing to get it to work. Any changes where we comment something out are temporary with the intention to revisit once we get NSObject working on a DC.I'm wondering if the team has any pointers for doing a cross compile or examples of this being done with GCC that could be pointed to. We would greatly appreciate it because the documentation is scarce on the topic.
If I haven't mentioned it here please reach out to clarify any questions you have about what we have tried.
Thanks.
cc @gcasa
The text was updated successfully, but these errors were encountered: