GDC on psptoolchain

Kostas Karanikolas k_karanikolas at hotmail.com
Sat Jul 26 18:28:21 PDT 2008


I think it's better if the PSP_* macros are maintained in a user .c file 
that gets compiled along with the user application.

For example:

pspconfig.c:
#include <pspkernel.h>
PSP_MODULE_INFO("my-dmodule", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_MAX();

Note that no c main function is necessary, just the macros.

These declarations do vary per application, and give the option of 
customizing things (thread attributes, kernel/usermode, heap size 
configuration, etc.).

John Grindstaff wrote:
> To clarify, I meant "PSP_MODULE_INFO" macro, and its C wrapper would 
> ideally be built into libgphobos as a patch so that one could write D 
> psp projects without the C source file "glue."
> 
> John Grindstaff wrote:
>> Thanks very much. That actually worked and libgphobos.a appeared where 
>> it should (in psp next to libiberty, libc++ or whatever).
>>
>> Are you using garbage collection without calling Phobos's Cmain 
>> function? I thought it inits GC with gc_init() so how is that possible?
>>
>> I wonder if it is possible to write a C-source function wrapper around 
>> the PSP_MODULE_MACRO so that one could use a D main function (as normal)?


More information about the D.gnu mailing list