arm-wince D crosscompiler on the way, request help with mmap

Chad J "gamerChad\" at spamIsBad gmail.com
Sun Apr 23 14:05:46 PDT 2006


Chad J > wrote:
> 
> One problem still remains though, 
> how do I suppress the checking of functions like mmap so that I can 
> build phobos and install the compiler?
> 

Nevermind the suppression of checking, I figured that out.  I ran into 
another issue, probably also related to the configure scripts.

I managed to get it to start compiling phobos by commenting out some 
stuff in the d/phobos/configure script, and also had to add a case for 
the fragment files (it would only take premade frag- files from mingw... 
I had to change that).  At that point I noticed that $target_os was set 
to "pe".  I'm not sure, but that looks like it could cause issues.  When 
I got phobos to start compiling, it ran into some errors, namely missing 
definitions for wchar_t in std/c/process.d.  I noticed that those 
definitions were OS dependant.  So I plopped the following into the 
std/c/process.d file:

version( Win32 )
{
     pragma(msg, "OS version is Win32");
}
else version( Windows )
{
     pragma(msg, "OS version is Windows");
}
else version( linux )
{
     pragma(msg, "OS version is linux");
}
else version( Unix )
{
     pragma(msg, "OS version is Unix");
}
else
{
     pragma(msg, "OS version is unknown!");
}

Please let me know if I missed an important version.

I ran make again, and surely enough it printed out "OS version is 
unknown!".

I'd imagine not knowing what the OS is would kill a phobos build very 
fast.  I also wonder if this problem is caused by what $target_os was 
set to in the configure script.  I just looked and I don't see a GCC 
configure switch that lets me specify what the name of the OS is, and to 
do that so globally might be a bad idea anyways.

So that leaves me with another question, how would I go about setting 
the reserved version identifiers for the D compiler?

At some point I'll probably look through the configure scripts some 
more, but I find those things really difficult to follow at times, so 
it'd help if I at least knew where to look.



More information about the D.gnu mailing list