Am Sun, 11 Nov 2012 17:38:08 -0800 schrieb Dan Olson <zans.is.for.c...@yahoo.com>:
> Ok, D is not there yet, but I managed to build a crippled gcc-4.8 > (with D) targeting arm-apple-darwin and I can compile simple C > functions to .o files and link them into an iphone app. And run it > on my iphone. The D and C++ compilers built, but I have probably a > potpourri of issues since I gave 4.8 a arm-darwin target by > selectively copying apple's 4.2 changes for arm-darwin. gcc-4.8 was > configured to use tools (as, ld) in the apple iphone SDK. > > The biggest hassle is that apple's version of arm as is different than > binutils as. So I am learning what it wants for debug and pseudo op > differences. > > Even a simple D module with just a extern(C) function depends on > something in druntime, so I have to get part of that to build first. > _Dmodule_ref? You can just declare it as extern(C) __gshared void* _Dmodule_ref; (But IIRC you have to compile with -nophoboslib to make it work) It's used by the runtime/compiler to setup the ModuleInfos but you don't have to initialize it, it just needs to be declared.