ICE due to unsupported target

Mike none at none.com
Fri Mar 7 23:52:09 PST 2014


I'm getting an ICE in d-target.cc/critsecsize when I create a 
synchronized block.  Looking at the source code, it's pretty 
obvious why - my target (ARM Cortex-M bare metal) isn't any of 
the ones listed:

if (global.params.isWindows)
   ...
else if (global.params.isLinux)
   ...
else if (global.params.isFreeBSD)
   ...
else if (global.params.isOpenBSD)
   ...
else if (global.params.isOSX)
   ...
else if (global.params.isSolaris)
   ...

gcc_unreachable();  //ARM cortex-M (ARM Thumb): Ouch!

Interestingly, it only lists OSs, not CPU architectures.  If I 
look at the Param struct in mars.h, it seems there is no 
parameter that suits my target.

I may be able to submit a pull request to change this (at least 
partially), but I'm looking for advice on how to add support for 
my target.

* Does GDC/DMD need a new isARMThumb/isBareMetal/isWhatever param?
* Should critsecsize return sizeof(target's size_t) if not 
otherwise specified instead of calling gcc_unreachable()?

I realize there is a broader problem here than support for 
synchronized.  What's the correct way to go about adding support 
for my target platform.

Thanks,
Mike





More information about the D.gnu mailing list