On 1 December 2013 10:17, Iain Buclaw <ibuc...@gdcproject.org> wrote: > > On Dec 1, 2013 8:25 AM, "Mike" <n...@none.com> wrote: >> >> I finally got a GDC cross-compiler compiled, and I'm currently trying to >> test it. My simple "hello world" program does not use any D runtime >> features, and I was able to compile it with LDC -noruntime -nodefaultlib. >> >> However, when I try to use GDC, I get... >> >> "cannot find source code for runtime library file 'object.d'" >> >> Are there similar options in GDC to disable the D runtime, or will I have >> to write stubs? >> >> And, does GDC have any D-specific options? >> > > You will require at least an object.d file to provide stubs - minilibd > sbould be sufficient IIRC. > > There is -nodefaultlibs, or -nostdlib (which bypasses libgcc also). However, > the compiler may generate calls to memcmp, memset, memcpy and memmove. So > these should be provided for if you are not linking against some sort of > libc. > > If you are linking against libc, and just don't want phobos, then there is > -nophoboslib. This will also omit linking to druntime as currently there > are bundled as one library. > > You also have -nostartfiles if you wish to also provide for the > crtstart.o/crtend.o startup files. > > Currently there is no way to interface with dmd's -betterC switch. So if you
The interface with dmd's -betterC is -fno-emit-moduleinfo Regards Iain.