GDC on psptoolchain
FreekSh0w86
perfectcell14 at yahoo.com
Sat Jul 26 19:33:32 PDT 2008
That's how I have it setup now, but someone reminded me that GDC
actually supports the old gcc-style of inline assembly. So it _may_
actually be possible to port those macros to D after all. I'd rather not
try it though, right now I am busy wrestling with png.h trying to
convert it to D, but it is the worst C header file I've ever tried to
look at...
Kostas Karanikolas wrote:
> 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